IB Maths AI HL Vector Equations of Lines Paper 1 & 2 Perpendicular distance ~9 min read

Shortest Distance Between a Point and a Line

From point P to line l, the shortest path is the perpendicular from P to l. Drop the perpendicular onto l; its foot is point F. The distance is |FP|, and the defining condition is FP · b = 0.

📘 What you need to know

The scalar-product method — step by step

Set up F as a general point on l: F = a + λb. Build FP = p − F (the vector from F to P). Demand that FP is perpendicular to the direction of l: FP · b = 0. Solve that one equation for λ. Plug λ back in, compute |FP|.

Drop a perpendicular from P to line l — foot is F l b A F P FP = d any other path AP is longer FP · b = 0  ⇒  FP ⊥ direction of l distance from P to l = |FP| Scalar-product method① General foot F = a + λb② Vector FP FP = p − F③ Perpendicular FP · b = 0④ Solve for λ one linear equation⑤ Distance d = |FP| substitute λ back, take magnitude
The perpendicular path FP is shorter than any other connection from P to the line. The defining condition is FP · b = 0 — one equation, one unknown (λ).
Shortest distance from point P to line l Scalar method:  FP · b = 0  ⇒  solve for λ  ⇒  d = |FP| Vector-product shortcut:  d = |AP × b||b| A is any point on l; b is the direction. Vector-product shortcut is not in formula booklet.

The vector-product shortcut

One formula, one answer. Pick any point A on the line (use the position vector a), form AP = pa, take the cross product AP × b, divide its magnitude by |b|. No equation to solve — the answer pops out directly.

When to use which: scalar-product method always works and gives you F as well (useful if the question asks for the foot of the perpendicular). Vector-product shortcut is faster when only the distance is needed and your GDC computes cross products easily.

🧭 Recipe — shortest distance from a point to a line

  1. Identify the line r = a + λb and the external point P with position vector p.
  2. Write F as a general point on the line: F = a + λb.
  3. Form FP = p − F (the vector from F to P), in terms of λ.
  4. Set FP · b = 0 (perpendicularity condition).
  5. Solve the resulting linear equation for λ.
  6. Substitute λ back into FP, compute |FP| → that’s the shortest distance.
  7. Or use the shortcut: d = |AP × b| / |b| with any point A on the line.

Worked examples

WE 1

Scalar-product method (from the PDF)

Point A(1, 2, 0). Line l: r = (206) + λ(012). Point B lies on l so that ABl. Find the shortest distance from A to l.

general point B on l OB = (2λ6+2λ) vector AB = OB − OA AB = (1λ − 26 + 2λ) AB ⊥ b ⇒ AB · b = 0 0(1) + 1(λ−2) + 2(6+2λ) = 0 λ − 2 + 12 + 4λ = 0 5λ + 10 = 0 → λ = −2 substitute λ = −2 into AB AB = (1−42) distance = |AB| |AB| = √(1 + 16 + 4) = √21 shortest distance = √21 units
WE 2

Find the foot AND the distance

P(10, 5, −10). Line l: r = (3−1−2) + λ(1−20). Find the foot of the perpendicular F and the shortest distance from P to l.

F = a + λb OF = (3+λ−1−2λ−2) FP = OP − OF FP = (7−λ6+2λ−8) FP · b = 0 (7−λ)(1) + (6+2λ)(−2) + (−8)(0) = 0 7 − λ − 12 − 4λ = 0 −5λ − 5 = 0 → λ = −1 substitute λ = −1 F = (3−1, −1+2, −2) = (2, 1, −2) FP = (8, 4, −8) |FP| = √(64 + 16 + 64) = √144 = 12 F = (2, 1, −2);   d = 12 units
WE 3

Vector-product shortcut

Find the shortest distance from P(3, 0, 1) to the line r = (100) + λ(010) using the vector-product formula.

take A = (1, 0, 0) AP = OP − OA = (2, 0, 1) cross product AP × b AP × b = (201) × (010) = ((0)(0)−(1)(1), (1)(0)−(2)(0), (2)(1)−(0)(0)) = (−1, 0, 2) magnitudes |AP × b| = √(1 + 0 + 4) = √5 |b| = 1 d = √5 / 1 = √5 units geometric check: P is √(2² + 1²) = √5 from the y-axis (which is what the line is). ✓
WE 4

Point already on the line

Find the shortest distance from C(2, 0, −1) to the line r = (40−5) + λ(−102).

F = a + λb OF = (4 − λ, 0, −5 + 2λ) FC = OC − OF FC = (λ − 2, 0, 4 − 2λ) FC · b = 0 (λ−2)(−1) + 0(0) + (4−2λ)(2) = 0 −λ + 2 + 8 − 4λ = 0 −5λ + 10 = 0 → λ = 2 substitute λ = 2 FC = (0, 0, 0) d = 0 → C is on the line if FP comes out as (0, 0, 0), the point lies on the line.
WE 5

Real-world wording — helicopter and tower

A helicopter flies in a straight line. Its position at time t (in seconds) is given by r = (201050) + t(2−10) (metres). A radio tower stands at T(40, 20, 50). Find the closest the helicopter gets to the tower, in metres.

general position F on flight path F = (20+2t, 10−t, 50) FT = OT − OF FT = (20−2t, 10+t, 0) FT · b = 0 (20−2t)(2) + (10+t)(−1) + 0(0) = 0 40 − 4t − 10 − t = 0 30 − 5t = 0 → t = 6 substitute t = 6 FT = (8, 16, 0) |FT| = √(64 + 256) = √320 closest distance = √320 ≈ 17.9 m t plays the same role as λ — just a parameter sliding along the line.
WE 6

Distance using the cross-product shortcut

Find the distance from P(1, 2, 3) to the line r = (000) + λ(111) using the cross-product formula.

A = (0, 0, 0) AP = (1, 2, 3) AP × b = (123) × (111) = (2·1 − 3·1, 3·1 − 1·1, 1·1 − 2·1) = (−1, 2, −1) magnitudes |AP × b| = √(1 + 4 + 1) = √6 |b| = √3 d = |AP × b| / |b| d = √6 / √3 = √2 d = √2 ≈ 1.41 units cross-product shortcut: 3 steps, no equation to solve.

💡 Top tips

⚠ Common mistakes

Next up — Shortest Distance Between Two Lines. Two non-parallel non-intersecting (skew) lines have a unique common perpendicular. Same idea as before, but now you need two parameters (λ and μ) and either the cross product of both directions or two perpendicularity conditions.

Need help with Vector Equations of Lines?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →