Work out relative velocity instantly with clear inputs, formula shown and shareable results.
Relative velocity is a vector subtraction, so its magnitude follows the cosine rule: sqrt(va^2 + vb^2 - 2.va.vb.cos theta). At 90 degrees the cosine term vanishes and 30 m/s against 20 m/s gives 36.06 m/s. Head-on the speeds add to 50 m/s; travelling together they subtract to 10 m/s.
Cosine rule for relative speed
v(rel) = sqrt(vA^2 + vB^2 - 2 vA vB cos theta)
Limiting cases
head-on: vA + vB; same direction: |vA - vB|
Because at 180 degrees the cosine is -1, so the cross term becomes +2.vA.vB and the expression collapses to (vA + vB)^2.
The magnitude is the same either way round; the direction reverses. A relative to B is the negative of B relative to A.