IB Maths AA HL
Topic 3 — Geometry & Trigonometry
Paper 1 & 2
~7 min read
HL only
Shortest Distance Between a Point and a Line
The shortest distance from a point to a line is always the perpendicular distance. Two equally good methods get you there: scalar product (parameterise the foot of the perpendicular and minimise) or vector product (one-shot formula).
📘 What you need to know
- Shortest distance = perpendicular distance: drop a perpendicular from the point P to the line.
- Foot of the perpendicular F is the point on the line closest to P; FP ⊥ direction b.
- Scalar product method: parameterise F as a + λb, set b · FP = 0, solve for λ, then |FP|.
- Vector product method: distance = |AP × b||b|, where A is any point on the line.
- Choose any anchor A on the line — the formula gives the same answer.
- Formula not in booklet: memorise both methods.
- If P lies on the line: AP × b = 0 → distance = 0.
Two methods, same answer
Scalar product method
b · FP = 0
find λ at the foot, then |FP|
Vector product method
d = |AP × b||b|
one calculation, no parameter
When to use which: scalar product if you also need the foot of the perpendicular (the closest point on the line). Vector product if you only need the distance — it’s faster.
The vector product formula
Shortest distance from P to line r = a + λb
d = |AP × b||b|
Here A is any point on the line (typically the anchor) and P is the external point. Geometrically, |AP × b| is the area of the parallelogram on AP and b; dividing by |b| (the base) gives the height — which is the perpendicular distance.
🧭 Recipe — shortest distance using scalar product method
- Write F as a function of λ: F = a + λb.
- Compute FP = P − F in terms of λ.
- Set the scalar product = 0: b · FP = 0 (perpendicularity).
- Solve for λ; substitute back to find F (foot of perpendicular).
- Compute |FP| for the shortest distance.
Worked examples
WE 1Shortest distance using the scalar product method
Find the shortest distance from the point P(4, 3, 2) to the line r = (1, 0, 2) + λ(1, 2, 2).
Step 1: General point F on line
F = (1+λ, 2λ, 2+2λ)
Step 2: FP = P − F
FP = (3 − λ, 3 − 2λ, −2λ)
Step 3: Set b · FP = 0
(1)(3−λ) + (2)(3−2λ) + (2)(−2λ) = 0
9 − 9λ = 0 → λ = 1
Step 4: FP at λ = 1, then magnitude
FP = (2, 1, −2); |FP| = √(4+1+4) = √9
Shortest distance = 3
F = (2, 2, 4) is the foot of perpendicular
WE 2Shortest distance using the vector product method
Find the shortest distance from the point P(7, 2, −2) to the line r = (2, 1, −1) + λ(1, 2, −2).
Step 1: A = (2, 1, −1) is on the line; AP = P − A
AP = (5, 1, −1)
Step 2: AP × b
AP × b = (1·(−2) − (−1)·2, −(5·(−2) − (−1)·1), 5·2 − 1·1)
= (0, 9, 9)
Step 3: Magnitudes
|AP × b| = √(0+81+81) = √162 = 9√2
|b| = √(1+4+4) = 3
Distance = 9√2 / 3 = 3√2
vector product is faster when you only need the distance
WE 3Find the foot of the perpendicular and the distance
Find the foot of the perpendicular F from the point P(4, 1, 0) to the line r = (4, 1, −3) + λ(1, −1, 2), and hence the shortest distance from P to the line.
Step 1: F in terms of λ, then FP
F = (4+λ, 1−λ, −3+2λ)
FP = P − F = (−λ, λ, 3 − 2λ)
Step 2: b · FP = 0
(1)(−λ) + (−1)(λ) + (2)(3−2λ) = 0
6 − 6λ = 0 → λ = 1
Step 3: Substitute λ = 1
F = (5, 0, −1); FP = (−1, 1, 1)
|FP| = √3
F = (5, 0, −1), distance = √3
when the question asks for the foot, scalar product is the natural method
WE 4Shortest distance from the origin to a line
Find the shortest distance from the origin O to the line r = (3, −1, 4) + λ(2, 1, −2).
Step 1: A = (3, −1, 4); AO = O − A = (−3, 1, −4)
Step 2: AO × b
AO × b: i-comp = (1)(−2) − (−4)(1) = 2
j-comp = −[(−3)(−2) − (−4)(2)] = −14
k-comp = (−3)(1) − (1)(2) = −5
AO × b = (2, −14, −5)
Step 3: Magnitudes
|AO × b| = √(4 + 196 + 25) = √225 = 15
|b| = √(4+1+4) = 3
Distance = 15 / 3 = 5
treat the origin like any other point — same formula applies
WE 5Distance from a point to a line through two given points
Find the shortest distance from the point P(0, 5, 5) to the line passing through A(1, 0, 2) and B(3, 4, 4).
Step 1: Direction AB and simplify
AB = B − A = (2, 4, 2) → simplify to b = (1, 2, 1)
Step 2: AP = P − A
AP = (−1, 5, 3)
Step 3: AP × b
i: (5)(1) − (3)(2) = −1
j: −[(−1)(1) − (3)(1)] = 4
k: (−1)(2) − (5)(1) = −7
AP × b = (−1, 4, −7)
Step 4: Magnitudes
|AP × b| = √(1+16+49) = √66
|b| = √(1+4+1) = √6
Distance = √66 / √6 = √11
simplifying the direction first keeps the numbers manageable
WE 6Closest approach of a moving particle to a fixed point
A particle moves with position vector r = (2, −1, 4) + t(1, 2, −1), where t is in seconds. A camera is fixed at C(6, 1, 6). Find the time at which the particle is closest to the camera, and find the minimum distance.
Step 1: Particle at time t and FC
F(t) = (2+t, −1+2t, 4−t)
FC = C − F = (4−t, 2−2t, 2+t)
Step 2: Set b · FC = 0 (perpendicular at minimum)
(1)(4−t) + (2)(2−2t) + (−1)(2+t) = 0
6 − 6t = 0 → t = 1
Step 3: Compute FC at t = 1
FC = (3, 0, 3); |FC| = √(9+0+9) = √18 = 3√2
t = 1 second, min distance = 3√2
shortest distance from the path = perpendicular distance, occurring at one instant
💡 Top tips
- Vector product is faster when only the distance is needed — no parameter to solve for.
- Scalar product is essential if the question asks for the foot of the perpendicular.
- Any point A on the line works in the vector product formula — pick the simplest.
- Simplify the direction by removing common factors before computing — fewer arithmetic mistakes.
- Sanity check: b · FP should equal 0 with your final answer plugged in.
⚠ Common mistakes
- Setting b · AP = 0 instead of b · FP = 0 — only FP is perpendicular to the line.
- Sign errors in the vector product — the j-component flips sign in the determinant expansion.
- Computing |AP| as the answer — that’s the distance from A to P, not the perpendicular distance.
- Forgetting to divide by |b| in the vector product method.
- Confusing P − F with F − P — for the magnitude it doesn’t matter, but for the perpendicularity check, write FP = P − F.
Final note in this section: Shortest Distance Between Two Lines. For two skew lines, the shortest distance is along the common perpendicular. Two methods again — vector product of the directions plus a connecting displacement, or two scalar product equations to find the feet of perpendicular on each line.
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 →