Considering the Lorentz transformations for the spatial coordinates and time, the velocity transformation from one frame of reference to another can be derived.
Let us consider a spaceship moving along a direction diagonal to the horizontal and vertical axis of the frames of reference of two observers, O and O' as shown in the diagrams below. For the purpose of the analysis, the velocity of the spaceship is constant for the two frames of reference. These frames of reference are moving at the velocity v along the horizontal axis with respect to each other.
Since the velocities are constant, the derivative are not necessaries. To find the relation among the different coordinates, the Lorentz transformations must be used.
For the horizontal components the following derivation results in the final relation,
and the final relation between these two velocities is
The previous result is the addition of velocities for the component of the spaceship velocity along the direction parallel to the relative motion between the two frames of reference.
A similar derivation relates the velocities in the vertical direction,
This result relates the component of the velocities perpendicular to the direction of relative motion between the two frames of reference. Notice that if the velocity is zero along a direction in one frame of reference, the velocity is also zero along any other frame of reference moving parallel to each other. For example in the case presented above the velocity along the Z direction is zero for both frames of reference.
when uz = 0.