Sub topic 13
Relative velocity in two dimensions
This chapter assumes you can resolve vectors into components, add and subtract vectors, and use basic trigonometry. You should also know relative velocity in one dimension, where the velocity of A relative to B is vA − vB along a line.
The vector rule
In two dimensions the same rule holds, but the subtraction is a vector subtraction:
vAB = vA − v_B
Here v_AB is the velocity of A as seen by an observer moving with B. Both velocities are measured in the ground frame. Subtracting B's velocity from A's removes B's motion, so B appears at rest.
The reverse relation is vBA = −vAB. The two have equal magnitude and opposite direction.
Working in components
The safest method is to pick x and y axes, resolve each velocity, and subtract each component separately.
- Write vA = (Ax, Ay) and vB = (Bx, By).
- Compute vAB = (Ax − Bx, Ay − B_y).
- Find the magnitude with the Pythagorean theorem and the direction with the inverse tangent.
Worked example
Car A moves east at 20 m/s. Car B moves north at 15 m/s. Find the velocity of A relative to B.
Take east as +x and north as +y. Then vA = (20, 0) and vB = (0, 15).
v_AB = (20 − 0, 0 − 15) = (20, −15) m/s
The magnitude is √(20² + 15²) = 25 m/s. The angle below the east direction is tan⁻¹(15/20) ≈ 37°. So B's driver sees A moving at 25 m/s toward the south-east, about 37° south of east.
import math
def relative_velocity(vA, vB):
"""Velocity of A relative to B; each is an (x, y) tuple. Returns (vx, vy, speed, angle_deg)."""
vx = vA[0] - vB[0]
vy = vA[1] - vB[1]
return vx, vy, math.hypot(vx, vy), math.degrees(math.atan2(vy, vx))
vx, vy, speed, angle = relative_velocity((20, 0), (0, 15))
print(f"v_AB = ({vx}, {vy}) m/s, speed = {speed:.1f} m/s, angle = {angle:.1f} deg")The printed angle is −36.9°. The negative sign means the vector points below the +x axis.
Common errors
- Adding vA and vB instead of subtracting. Adding is correct only when you want vA relative to −vB, that is, when B moves opposite to your assumed direction.
- Mixing up vAB and vBA. The question "velocity of A with respect to B" puts B in the subtracted position.
- Subtracting magnitudes. Only components can be subtracted directly, unless the vectors are parallel.
- Giving an angle without stating its reference direction.
Exercise
Exercise
Ship P sails due north at 12 m/s and ship Q sails due east at 9 m/s. What is the speed of P relative to Q, and in which direction does Q's crew see P moving?
Show answer
Take east as +x and north as +y, so vP = (0, 12) and vQ = (9, 0). Then v_PQ = (−9, 12) m/s. The speed is √(81 + 144) = 15 m/s. The direction is tan⁻¹(9/12) ≈ 37° west of north.