Relative velocity
Two trains on parallel tracks
You are sitting in a train at a station. The train on the next track starts to move, and for a moment you are not sure which train is moving. Motion depends on who is watching.
Take two trains, A and B, on straight parallel tracks, moving with constant velocities v_A and v_B, measured from the ground.
Their positions are x_A(t) = x_A(0) + v_A t and x_B(t) = x_B(0) + v_B t. On an x–t graph, each train is a straight line.
The position of B as seen from A is the gap between them: x_BA = x_B − x_A. Watch the green line between the two trains stretch or shrink.
How fast does that gap change? The rate is v_BA = v_B − v_A. This is the velocity of B relative to A.
Turn it around and the velocity of A relative to B is v_AB = v_A − v_B. It is the same size, but opposite in sign.
On the graph, relative velocity is the difference between the two slopes. If the lines are parallel, the gap never changes and v_BA = 0.
What you see from the window
Now ride inside train A, moving at 15 m/s, which is 54 km/h. Train B runs next to you at 15 m/s in the same direction.
v_BA = 15 − 15 = 0. Through the window, B seems to stand still, even though both trains are rushing past the trees.
Next, B speeds up to 25 m/s. Now v_BA = 25 − 15 = +10 m/s. B slowly creeps ahead of you.
Now send B the other way at 25 m/s. Its velocity is −25 m/s. So v_BA = −25 − 15 = −40 m/s.
The two speeds add up. B flashes past your window at 40 m/s. That is why a train going the other way seems to vanish in a second or two.
Always measure both velocities from the ground with the same positive direction, then subtract. The signs take care of the rest.
Try it: ride in train A
- Press Play to run 30 s of motion at 3× speed, or drag the Time slider.
- Tick “Ride in train A” to see everything from A. A stands still and the ground sleepers slide backwards.
- In A’s frame, B’s arrow shows v_BA = v_B − v_A.
- The green dashed line on the graph is the gap x_B − x_A. The green circle marks when the trains are level.
- Try v_B = −v_A and see how fast the gap closes.
Quick check
Two parallel rail tracks run north–south. Train A moves north at 54 km/h and train B moves south at 90 km/h. What is the velocity of B relative to A?
- 10 m/s north
- 10 m/s south
- 40 m/s north
- 40 m/s south
Answer
D. Take north as positive. v_A = 54 km/h = +15 m/s and v_B = 90 km/h south = −25 m/s. So v_BA = v_B − v_A = −25 − 15 = −40 m/s, which means 40 m/s towards the south.
Catching up
Car A moves at 20 m/s on a straight highway, 150 m behind car B, which moves at 15 m/s in the same direction. How long does A take to catch up with B?
- 4.3 s
- 7.5 s
- 10 s
- 30 s
Answer
D. Seen from B, car A closes the gap at v_AB = 20 − 15 = 5 m/s. Time = 150 m ÷ 5 m/s = 30 s. (4.3 s would be right only if the cars were moving towards each other, at 35 m/s.)
Summary
- Position of B relative to A:
x_BA = x_B − x_A - Velocity of B relative to A:
v_BA = v_B − v_A - Velocity of A relative to B:
v_AB = v_A − v_B = −v_BA - km/h to m/s:
1 km/h = 5/18 m/s
- Velocity depends on who measures it. Relative velocity is the velocity as seen from the other object.
- Same direction: the speeds subtract. Opposite directions: the speeds add.
- On an x–t graph, parallel lines mean equal velocities: the gap stays the same and each train looks still from the other.
- Always use one positive direction for both velocities before subtracting.