Relative motion answers a simple but very important question:
how does one object move as seen from another moving object?
Instead of describing A and B only from the ground, we compare their velocities directly.
The key formula is
\[
\begin{aligned}
\vec v_{A/B} &= \vec v_A - \vec v_B
\end{aligned}
\]
This means the velocity of A relative to B is found by subtracting the velocity of B from the velocity of A.
The same idea works in one dimension and in two dimensions.
Relative motion in 1D
In one dimension, the velocities are signed numbers along a line. If east or right is positive, then
\[
\begin{aligned}
v_{A/B} &= v_A - v_B
\end{aligned}
\]
The sign of the result tells the relative direction. A positive value means A moves east relative to B. A negative
value means A moves west relative to B. If the result is zero, then A and B move together with the same velocity,
so there is no relative motion between them.
Example:
if A moves at
\(20\,\mathrm{m\,s^{-1}}\)
east and B moves at
\(15\,\mathrm{m\,s^{-1}}\)
east, then
\[
\begin{aligned}
v_{A/B} &= 20 - 15 = 5\,\mathrm{m\,s^{-1}}
\end{aligned}
\]
So from B’s point of view, A moves east at
\(5\,\mathrm{m\,s^{-1}}\).
Relative motion in 2D
In two dimensions, velocities are vectors. We subtract them component by component:
\[
\begin{aligned}
\vec v_A &= \langle v_{Ax}, v_{Ay} \rangle \\
\vec v_B &= \langle v_{Bx}, v_{By} \rangle
\end{aligned}
\]
\[
\begin{aligned}
\vec v_{A/B} &= \langle v_{Ax} - v_{Bx},\; v_{Ay} - v_{By} \rangle
\end{aligned}
\]
Once the relative-velocity vector is known, its magnitude is
\[
\begin{aligned}
\left| \vec v_{A/B} \right|
&= \sqrt{(v_{Ax}-v_{Bx})^2 + (v_{Ay}-v_{By})^2}
\end{aligned}
\]
and its direction angle from the positive x-axis is found with
\(\operatorname{atan2}(v_{A/B,y}, v_{A/B,x})\).
This is why the calculator reports both a standard mathematical angle and a compass-style direction such as
“north of east” or “south of west”.
Relative displacement
If the velocities stay constant, then the relative position also follows directly from the relative velocity.
If both objects start from the same origin at
\(t=0\),
then
\[
\begin{aligned}
\vec r_A(t) &= \vec v_A t \\
\vec r_B(t) &= \vec v_B t
\end{aligned}
\]
Therefore
\[
\begin{aligned}
\vec r_{A/B}(t)
&= \vec r_A(t) - \vec r_B(t) \\
&= (\vec v_A - \vec v_B)t \\
&= \vec v_{A/B} t
\end{aligned}
\]
This shows that constant relative velocity produces a relative-displacement vector that grows linearly with time.
That is why the position-component graphs in the calculator are straight lines.
Why the animation is useful
The animation shows two objects moving at the same time, together with the relative-position vector from B to A.
That purple arrow is especially important, because it shows what B “sees” when comparing A’s motion to its own.
The purple relative-velocity arrow then shows how the relative-position vector grows with time.
In 1D mode, the entire motion stays on the x-axis. In 2D mode, the paths can point in different directions,
and the relative vector can have both x- and y-components. The synchronized graphs then display
\(x_A(t)\), \(x_B(t)\), \(x_{A/B}(t)\), \(y_A(t)\), \(y_B(t)\), \(y_{A/B}(t)\), and the magnitude of the
relative displacement.
Worked 1D example
Let
\(v_A = 20\,\mathrm{m\,s^{-1}}\)
east and
\(v_B = 15\,\mathrm{m\,s^{-1}}\)
east.
Step 1. Subtract the velocities.
\[
\begin{aligned}
v_{A/B} &= 20 - 15 = 5\,\mathrm{m\,s^{-1}}
\end{aligned}
\]
Step 2. Interpret the sign.
The result is positive, so A moves east relative to B.
Step 3. Find the relative displacement after 6 seconds.
\[
\begin{aligned}
r_{A/B}(6)
&= v_{A/B} \cdot 6 \\
&= 5 \cdot 6 \\
&= 30\,\mathrm{m}
\end{aligned}
\]
So after 6 seconds, A is 30 meters east of B.
Worked 2D example
Suppose
\(\vec v_A = \langle 12, 8 \rangle\,\mathrm{m\,s^{-1}}\)
and
\(\vec v_B = \langle 5, -4 \rangle\,\mathrm{m\,s^{-1}}\).
Step 1. Subtract component-wise.
\[
\begin{aligned}
\vec v_{A/B}
&= \langle 12-5,\; 8-(-4) \rangle \\
&= \langle 7,\; 12 \rangle\,\mathrm{m\,s^{-1}}
\end{aligned}
\]
Step 2. Compute the magnitude.
\[
\begin{aligned}
\left| \vec v_{A/B} \right|
&= \sqrt{7^2 + 12^2} \\
&= \sqrt{193} \\
&\approx 13.9\,\mathrm{m\,s^{-1}}
\end{aligned}
\]
Step 3. Compute the angle.
\[
\begin{aligned}
\theta &= \tan^{-1}\!\left(\frac{12}{7}\right) \approx 59.7^\circ
\end{aligned}
\]
So the relative velocity points about
\(59.7^\circ\)
above the positive x-axis, or equivalently about
\(59.7^\circ\)
north of east.
Summary
| Quantity |
Formula |
Meaning |
| Relative velocity |
\(\vec v_{A/B} = \vec v_A - \vec v_B\) |
Velocity of A as observed from B |
| 1D relative velocity |
\(v_{A/B} = v_A - v_B\) |
Signed scalar form along one line |
| 2D component form |
\(\langle v_{Ax}-v_{Bx},\,v_{Ay}-v_{By}\rangle\) |
Component-wise subtraction |
| Relative-speed magnitude |
\(\sqrt{v_{A/B,x}^2 + v_{A/B,y}^2}\) |
Length of the relative-velocity vector |
| Relative displacement |
\(\vec r_{A/B}(t) = \vec v_{A/B} t\) |
How far A is from B after time \(t\) |