On this page
Two ships sail at steady speeds in different directions. Will they collide? If not, how close do they get, and when? Solved from the shore, this needs two moving positions and some messy algebra. Solved from the deck of one ship, it becomes a single straight line and a perpendicular. This post shows that method, one full worked example checked two ways, and the errors that cost marks.
Is this on the syllabus?
The JEE (Main) 2026 syllabus lists relative velocity and motion in a plane under Unit 2, Kinematics, and the JEE (Advanced) 2026 brochure lists "Kinematics in one and two dimensions" and "Relative velocity" under mechanics. The rationalised NCERT Class 11 book covers relative velocity only for motion in a straight line, in Section 2.5, so two-dimensional problems like this one are JEE material beyond the school text. Check the syllabus for your exam year.
What does "relative velocity" mean in two dimensions?
The velocity of B relative to A is v_BA = v_B − v_A, a vector subtraction. OpenStax University Physics builds it from position vectors: the position of B seen from A is r_B − r_A, and differentiating gives the velocity relation.
If both velocities are constant, so is v_BA. That is the key: in A's frame, B moves in a straight line at constant speed. The closest approach is then pure geometry.
The three-step method
Freeze A. Write B's starting position relative to A, r₀, and B's relative velocity, v_rel = v_B − v_A.
Draw the line. From B's starting point, draw a line along v_rel. This is B's path as seen from A.
Drop a perpendicular from A to that line. Its length is the minimum distance. The time is the distance along the line to the foot of the perpendicular, divided by |v_rel|.
If you prefer algebra: t_min = −(r₀ · v_rel)/|v_rel|², and the distance is d_min = |r₀ × v_rel|/|v_rel|.
Worked example: two ships
At noon, ship B is 20 km due north of ship A. A sails east at 12 km/h and B sails south at 16 km/h. Find the minimum distance between them and the time it occurs.
Take east as +x and north as +y, with A at the origin.
Relative position: r₀ = (0, 20) km.
Relative velocity: v_rel = v_B − v_A = (0, −16) − (12, 0) = (−12, −16) km/h. Its magnitude is √(144 + 256) = 20 km/h.
In A's frame, B starts 20 km north and moves south-west along a line that makes an angle φ with the line BA, where tan φ = 12/16, so sin φ = 0.6 and cos φ = 0.8.
Minimum distance: d = 20 sin φ = 20 × 0.6 = 12 km.
Distance along the line to the closest point: 20 cos φ = 16 km. Time = 16/20 = 0.8 h = 48 min. They are closest at 12:48.
Check with the formulas. r₀ · v_rel = 0 × (−12) + 20 × (−16) = −320, so t = 320/400 = 0.8 h. The cross product is 0 × (−16) − 20 × (−12) = 240, so d = 240/20 = 12 km.
Check from the shore. At t = 0.8 h, A is at (9.6, 0) and B at (0, 20 − 12.8) = (0, 7.2). The separation is √(9.6² + 7.2²) = √(92.16 + 51.84) = √144 = 12 km.
Check with calculus. The squared separation is D² = (12t)² + (20 − 16t)² = 400t² − 640t + 400. Setting d(D²)/dt = 800t − 640 = 0 gives t = 0.8 h, and D² = 256 − 512 + 400 = 144, so D = 12 km. Four methods, one answer.
When do the two bodies collide?
They collide only if the line of relative motion passes through A, which means v_rel points straight along the line from B to A. In the example, B would need a relative velocity pointing due south. That needs B's eastward velocity to match A's, so B would have to sail with an eastward component of 12 km/h. Any sideways component in v_rel means a near miss, not a collision.
Why do students find this hard?
The difficulty is usually with vectors, not with the geometry. Shaffer and McDermott (2005) studied university students treating velocity and acceleration as vectors in one and two dimensions and reported serious conceptual and reasoning difficulties, which were also common among pre-college teachers and physics graduate students. If subtracting velocity vectors feels shaky, revise it before this topic. Our post on common vector errors is a good place to start.
What mistakes should you avoid?
Subtracting in the wrong order. If r₀ is B relative to A, the velocity must be v_B − v_A too.
Adding speeds instead of vectors. 12 + 16 = 28 km/h is not the relative speed; 20 km/h is.
Accepting a negative time. If t_min comes out negative, the bodies are already moving apart, and the closest distance is the starting distance.
Measuring the angle from the wrong line. The angle φ is between v_rel and the line joining the bodies.
A practice routine
Day 1: Redo the ship example from B's frame. You should get the same 12 km and 48 min.
Day 2: Three river-and-boat problems from our post on river crossing and rain, to keep vector subtraction quick.
Day 3: Four closest-approach problems. Solve each by geometry, then check with the dot-product formula.
Day 4: Two collision-condition problems: find the heading that makes the relative velocity point along the line joining the bodies.
When the vector picture will not come together, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning, so you can see each step of the relative-velocity set-up.
Tonight, change B's speed to 9 km/h and check that the minimum distance becomes 16 km, reached at 12:48 again.



