# Relative velocity

The relative velocity of an object B relative to an observer A, denoted $\mathbf {v} _{B\mid A}$ (also $\mathbf {v} _{BA}$ or $\mathbf {v} _{B\operatorname {rel} A}$), is the velocity vector of B measured in the rest frame of A. The relative speed $v_{B\mid A}=\|\mathbf {v} _{B\mid A}\|$ is the vector norm of the relative velocity.

## 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 diagram 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:
    $\underbrace {\mathbf {v} _{M\mid E}} _{\text{50 km/h}}=\underbrace {\mathbf {v} _{M\mid T}} _{\text{10 km/h}}+\underbrace {\mathbf {v} _{T\mid E}} _{\text{40 km/h}},$
where:
    $\mathbf {v} _{M\mid E}$ is the velocity of the Man relative to Earth,
    $\mathbf {v} _{M\mid T}$ is the velocity of the Man relative to the Train,
    $\mathbf {v} _{T\mid E}$ is the velocity of the Train relative to Earth.
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:
    $\mathbf {r} _{A}=\mathbf {r} _{Ai}+\mathbf {v} _{A}t,$
    $\mathbf {r} _{B}=\mathbf {r} _{Bi}+\mathbf {v} _{B}t,$
where the subscript i refers to the initial displacement (at time t equal to zero). The difference between the two displacement vectors, $\mathbf {r} _{B}-\mathbf {r} _{A}$, represents the location of B as seen from A.
    $\mathbf {r} _{B}-\mathbf {r} _{A}=\underbrace {\mathbf {r} _{Bi}-\mathbf {r} _{Ai}} _{\text{initial separation}}+\underbrace {(\mathbf {v} _{B}-\mathbf {v} _{A})t} _{\text{relative velocity}}.$
Hence:
    $\mathbf {v} _{B\mid A}=\mathbf {v} _{B}-\mathbf {v} _{A}.$
After making the substitutions $\mathbf {v} _{A|C}=\mathbf {v} _{A}$ and $\mathbf {v} _{B|C}=\mathbf {v} _{B}$, we have:
    $\mathbf {v} _{B\mid A}=\mathbf {v} _{B\mid C}-\mathbf {v} _{A\mid C}\Rightarrow$ $\mathbf {v} _{B\mid C}=\mathbf {v} _{B\mid A}+\mathbf {v} _{A\mid C}.$

### 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:
    $x'=x-vt$
    $t'=t$
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, $dx'=dx-v\,dt$, and what may seem like the obvious statement that $dt'=dt$, we have:
    ${\frac {dx'}{dt'}}={\frac {dx}{dt}}-v$
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 $dx/dt=v_{A\mid O}$ and $dx'/dt=v_{A\mid O'}$, where $O$ and $O'$ 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 $v=v_{O'\mid O}$, and:
    $v_{A\mid O'}=v_{A\mid O}-v_{O'\mid O}\Rightarrow v_{A\mid O}=v_{A\mid O'}+v_{O'\mid O},$
where the latter form has the desired (easily learned) symmetry.

## Special relativity

As in classical mechanics, in special relativity the relative velocity $\mathbf {v} _{\mathrm {B|A} }$ 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
    $\mathbf {v} _{\mathrm {B|A} }=-\mathbf {v} _{\mathrm {A|B} }$
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.
    $\|\mathbf {v} _{\mathrm {B|A} }\|=\|\mathbf {v} _{\mathrm {A|B} }\|=v_{\mathrm {B|A} }=v_{\mathrm {A|B} }$

### 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.
    $\mathbf {v} _{\mathrm {B|A} }={\frac {\mathbf {v} _{\mathrm {B} }-\mathbf {v} _{\mathrm {A} }}{1-{\frac {\mathbf {v} _{\mathrm {A} }\mathbf {v} _{\mathrm {B} }}{c^{2}}}}}$
The relative speed is given by the formula:
    $v_{\mathrm {B|A} }={\frac {\left|\mathbf {v} _{\mathrm {B} }-\mathbf {v} _{\mathrm {A} }\right|}{1-{\frac {\mathbf {v} _{\mathrm {A} }\mathbf {v} _{\mathrm {B} }}{c^{2}}}}}$

### Perpendicular velocities

In the case where two objects are traveling in perpendicular directions, the relativistic relative velocity $\mathbf {v} _{\mathrm {B|A} }$ is given by the formula:
    $\mathbf {v} _{\mathrm {B|A} }={\frac {\mathbf {v} _{\mathrm {B} }}{\gamma _{\mathrm {A} }}}-\mathbf {v} _{\mathrm {A} }$
where
    $\gamma _{\mathrm {A} }={\frac {1}{\sqrt {1-\left({\frac {v_{\mathrm {A} }}{c}}\right)^{2}}}}$
The relative speed is given by the formula
    $v_{\mathrm {B|A} }={\frac {\sqrt {c^{4}-\left(c^{2}-v_{\mathrm {A} }^{2}\right)\left(c^{2}-v_{\mathrm {B} }^{2}\right)}}{c}}$

### General case

The general formula for the relative velocity $\mathbf {v} _{\mathrm {B|A} }$ of an object or observer B in the rest frame of another object or observer A is given by the formula:
    $\mathbf {v} _{\mathrm {B|A} }={\frac {1}{\gamma _{\mathrm {A} }\left(1-{\frac {\mathbf {v} _{\mathrm {A} }\mathbf {v} _{\mathrm {B} }}{c^{2}}}\right)}}\left[\mathbf {v} _{\mathrm {B} }-\mathbf {v} _{\mathrm {A} }+\mathbf {v} _{\mathrm {A} }(\gamma _{\mathrm {A} }-1)\left({\frac {\mathbf {v} _{\mathrm {A} }\cdot \mathbf {v} _{\mathrm {B} }}{v_{\mathrm {A} }^{2}}}-1\right)\right]$
where
    $\gamma _{\mathrm {A} }={\frac {1}{\sqrt {1-\left({\frac {v_{\mathrm {A} }}{c}}\right)^{2}}}}$
The relative speed is given by the formula
    $v_{\mathrm {B|A} }={\sqrt {1-{\frac {\left(c^{2}-v_{\mathrm {A} }^{2}\right)\left(c^{2}-v_{\mathrm {B} }^{2}\right)}{\left(c^{2}-\mathbf {v} _{\mathrm {A} }\cdot \mathbf {v} _{\mathrm {B} }\right)^{2}}}}}\cdot c$