Sub topic 12
Relative velocity in one dimension
This chapter assumes you know scalars and vectors, the sign convention for motion along a line, and the meaning of displacement, velocity and acceleration. It develops relative velocity along a single straight line. The two-dimensional case, which needs vector subtraction, comes in the next chapter.
What relative velocity means
Velocity is always measured with respect to something. When you say a train moves at 20 m/s, you mean 20 m/s with respect to the ground. A passenger walking inside that train has one velocity relative to the train and a different velocity relative to the ground.
The velocity of A relative to B is the velocity of A as seen by an observer who is at rest in B's frame. It is written vAB, or vA/B.
In one dimension, with a positive direction chosen and all velocities measured from the same reference (usually the ground):
vAB = vA − v_B
Read it as: take A's velocity, then remove B's velocity. Imagine you ride along with B and "freeze" B's motion. What remains is A's motion as you see it.
Two immediate consequences:
- vBA = −vAB. The two observers see each other moving with equal speed in opposite directions.
- v_AA = 0. Nothing moves relative to itself.
Sign convention matters
Choose one direction as positive and assign every velocity a sign before substituting. Mixing up signs is the most common source of wrong answers in this topic.
Worked example: two cars
Car A moves east at 30 m/s. Car B moves east at 20 m/s. Take east as positive.
- v_AB = 30 − 20 = +10 m/s. Car B's driver sees A pulling ahead at 10 m/s to the east.
- v_BA = 20 − 30 = −10 m/s. Car A's driver sees B falling back at 10 m/s.
Now let B move west at 20 m/s, so v_B = −20 m/s.
- v_AB = 30 − (−20) = +50 m/s.
Cars approaching or separating head-on have relative speed equal to the sum of their speeds. Cars moving the same way have relative speed equal to the difference.
| Situation | Relative speed |
|---|---|
| Same direction | difference of speeds |
| Opposite directions | sum of speeds |
Relative acceleration
Differentiate vAB = vA − v_B with respect to time:
aAB = aA − a_B
If both bodies have constant acceleration, the relative motion is itself uniformly accelerated, and you can apply the standard equations to it using the relative quantities:
- vAB = uAB + a_AB t
- sAB = uAB t + ½ a_AB t²
- vAB² = uAB² + 2 aAB sAB
Here sAB is the displacement of A as measured from B, which equals xA − x_B.
This turns a two-body problem into a one-body problem. Place yourself on B, and A is the only moving object.
Why this matters for projectiles
If two bodies fall freely under gravity, aA = aB = −g, so a_AB = 0. Their relative velocity stays constant. The relative motion is uniform, and the relative path is a straight line. This is the idea behind the chapter on two projectiles, and it starts here.
Worked example: overtaking
A car moves at 25 m/s. A second car, 100 m behind, moves at 30 m/s in the same direction. How long until the second car catches up?
Take the direction of motion as positive. Let A be the second car and B the first.
- Initial separation: A is 100 m behind B, so the displacement of A relative to B must grow by 100 m.
- v_AB = 30 − 25 = 5 m/s.
- Time = 100 / 5 = 20 s.
You can check this against ground positions. In 20 s, the first car moves 500 m and the second moves 600 m. The second car has gained exactly 100 m.
Worked example: relative acceleration
A train accelerates from rest at 1 m/s². A passenger throws nothing and simply watches a second train on a parallel track moving at a constant 10 m/s in the same direction, starting level with the first at t = 0. When are they level again?
Let A be the accelerating train and B the constant-speed train.
- u_AB = 0 − 10 = −10 m/s
- a_AB = 1 − 0 = 1 m/s²
- Relative displacement s_AB = 0 when they are level again.
Using sAB = uAB t + ½ a_AB t²:
0 = −10t + ½ t², so t(t/2 − 10) = 0.
The roots are t = 0 (the start) and t = 20 s. The accelerating train is level with the other at t = 20 s. Check on the ground: ½ × 1 × 20² = 200 m for A and 10 × 20 = 200 m for B.
def meeting_time(u_a, a_a, u_b, a_b, gap=0.0):
"""Time when A's position minus B's position equals `gap`.
Positions are along one line. `gap` = x_A - x_B wanted at the meeting
(use a negative value if A starts that far behind and must catch up
to a gap of zero: pass gap=0 and start offset via the caller).
Solves 0.5*a_rel*t^2 + u_rel*t - gap = 0 for the smallest t > 0.
"""
import math
u_rel = u_a - u_b
a_rel = a_a - a_b
if abs(a_rel) < 1e-12:
if abs(u_rel) < 1e-12:
return None
t = gap / u_rel
return t if t > 0 else None
disc = u_rel ** 2 + 2 * a_rel * gap
if disc < 0:
return None
roots = [(-u_rel + s * math.sqrt(disc)) / a_rel for s in (1, -1)]
positive = [t for t in roots if t > 1e-12]
return min(positive) if positive else None
# Train example: A starts level with B, so the wanted gap is 0.
print(meeting_time(0, 1, 10, 0, gap=0)) # 20.0
# Overtaking example: A is 100 m behind, so A must gain +100 m.
print(meeting_time(30, 0, 25, 0, gap=100)) # 20.0In the second call, gap is the amount A must gain on B, which is 100 m. In the first call, gap = 0 returns the nonzero root, since the root t = 0 is excluded.
Frames moving with the medium: boats, escalators and wind in one dimension
Relative velocity also handles motion in a moving medium. For motion along the same line, the velocity relative to the ground is:
v (ground) = v (relative to medium) + v (medium)
For example, a boat with speed 5 m/s in still water travels in a river flowing at 3 m/s.
- Downstream: 5 + 3 = 8 m/s relative to the ground.
- Upstream: 5 − 3 = 2 m/s relative to the ground.
This is the same relation rewritten: vBG = vBW + v_WG, where B is the boat, W the water and G the ground. Notice how the inner subscripts cancel: BW then WG gives BG. This chain rule is a reliable way to avoid mistakes.
Round trip
A boat has speed 5 m/s in still water and the river flows at 3 m/s. It travels 40 m downstream and returns.
- Downstream time: 40 / 8 = 5 s
- Upstream time: 40 / 2 = 20 s
- Total: 25 s
If the water were still, the round trip would take 80 / 5 = 16 s. The current always makes the round trip longer, because the boat spends more time at the lower ground speed.
Relative motion with a free-falling object
A balloon rises at 10 m/s. At the moment it is 75 m above the ground, a stone is dropped from it. Take up as positive.
The stone's initial velocity equals the balloon's, +10 m/s, because the stone is carried with the balloon until release. A common mistake is to treat the initial velocity as zero.
Using y = ut + ½at² with y = −75 m, u = +10 m/s, a = −10 m/s²:
−75 = 10t − 5t² 5t² − 10t − 75 = 0 t² − 2t − 15 = 0 (t − 5)(t + 3) = 0
So t = 5 s. The negative root is rejected.
Relative to the balloon, the stone starts at rest, with relative acceleration −10 m/s². The balloon is moving upward at a constant 10 m/s, so after 5 s it is 50 m higher than where it was released, and the stone has moved −75 m from the release point.
Common errors
- Subtracting speeds without signs. Always assign signs first, then subtract.
- Reversing the order. vAB is not vBA. Their magnitudes match, but their signs are opposite.
- Using the wrong initial velocity for an object released from a moving carrier. It keeps the carrier's velocity at the moment of release.
- Forgetting the initial gap when solving "catch up" problems. Relative displacement must equal the initial gap.
- Applying the relative equations when one acceleration changes during the motion. The equations require constant relative acceleration over the interval you use.
Relationship between a relative-velocity diagram and a position-time graph
On an x–t graph, the slope at a given time is the velocity. If two bodies have straight lines with slopes vA and vB, the vertical distance between them changes at a rate vA − vB. The lines meet where the bodies meet. Parallel lines mean zero relative velocity, and the gap stays constant.
Exercises
Exercise
Two trains, 150 m and 100 m long, move on parallel tracks in opposite directions at 20 m/s and 30 m/s. How long do they take to pass each other completely, from the moment the fronts meet to the moment the rears clear?
Show answer
Take the first train's direction as positive, so v1 = +20 m/s and v2 = −30 m/s. The relative speed is |20 − (−30)| = 50 m/s. The distance to cover is the sum of the lengths, 150 + 100 = 250 m. The time is 250 / 50 = 5 s.
Exercise
A lift moves up at 2 m/s. A bolt falls from its ceiling, 2.5 m above the floor, when the lift is moving at this constant speed. Taking g = 10 m/s², how long does the bolt take to hit the floor?
Show answer
In the lift's frame, the lift has zero acceleration, so the frame is inertial. The bolt starts at rest relative to the lift and accelerates downward at g. Then 2.5 = ½ × 10 × t², so t² = 0.5 and t ≈ 0.71 s. The lift's constant velocity does not change the answer.