Relative velocity

The "relative velocity" formula_1 (also formula_2 or formula_3) is the velocity of an object or observer B in the rest frame of another object or observer A.
Classical mechanics.
In one dimension (non-relativistic).
We begin with relative motion in the classical, (or non-relativistic, or the Newtonian approximation) that all speeds are much less than the speed of light. This limit is associated with the Galilean transformation. The figure shows a man on top of a train, at the back edge. At 1:00 pm he begins to walk forward at a walking speed of 10 km/h (kilometers per hour). The train is moving at 40 km/h. The figure depicts the man and train at two different times: first, when the journey began, and also one hour later at 2:00 pm. The figure suggests that the man is 50 km from the starting point after having traveled (by walking and by train) for one hour. This, by definition, is 50 km/h, which suggests that the prescription for calculating relative velocity in this fashion is to add the two velocities.
The figure displays clocks and rulers to remind the reader that while the logic behind this calculation seem flawless, it makes false assumptions about how clocks and rulers behave. (See The train-and-platform thought experiment.) To recognize that this classical model of relative motion violates special relativity, we generalize the example into an equation:
where:
Fully legitimate expressions for "the velocity of A relative to B" include "the velocity of A with respect to B" and "the velocity of A in the coordinate system where B is always at rest". The violation of special relativity occurs because this equation for relative velocity falsely predicts that different observers will measure different speeds when observing the motion of light. 
In two dimensions (non-relativistic).
The figure shows two objects "A" and "B" moving at constant velocity. The equations of motion are:
where the subscript "i" refers to the initial displacement (at time "t" equal to zero). The difference between the two displacement vectors, formula_10, represents the location of B as seen from A.
Hence:
After making the substitutions formula_13 and formula_14, we have:
Galilean transformation (non-relativistic).
To construct a theory of relative motion consistent with the theory of special relativity, we must adopt a different convention. Continuing to work in the (non-relativistic) Newtonian limit we begin with a Galilean transformation in one dimension:
where x' is the position as seen by a reference frame that is moving at speed, v, in the "unprimed" (x) reference frame. Taking the differential of the first of the two equations above, we have, formula_19, and what may seem like the obvious statement that formula_20, we have:
To recover the previous expressions for relative velocity, we assume that particle "A" is following the path defined by dx/dt in the unprimed reference (and hence "dx"′/"dt"′ in the primed frame). Thus formula_22 and formula_23, where formula_24 and formula_25 refer to motion of "A" as seen by an observer in the unprimed and primed frame, respectively. Recall that "v" is the motion of a stationary object in the primed frame, as seen from the unprimed frame. Thus we have formula_26, and:
where the latter form has the desired (easily learned) symmetry.
Special relativity.
As in classical mechanics, in Special Relativity the relative velocity formula_28 is the velocity of an object or observer B in the rest frame of another object or observer A. However, unlike the case of classical mechanics, in Special Relativity, it is generally not the case that
This peculiar lack of symmetry is related to Thomas precession and the fact that two successive Lorentz transformations rotate the coordinate system. This rotation has no effect on the magnitude of a vector, and hence relative speed is symmetrical.
Parallel velocities.
In the case where two objects are traveling in parallel directions, the relativistic formula for relative velocity is similar in form to the formula for addition of relativistic velocities.
The relative speed is given by the formula:
Perpendicular velocities.
In the case where two objects are traveling in perpendicular directions, the relativistic relative velocity formula_28 is given by the formula:
where
The relative speed is given by the formula
General case.
The general formula for the relative velocity formula_28 of an object or observer B in the rest frame of another object or observer A is given by the formula:
where
The relative speed is given by the formula