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 โ