Sub topic 12
Foot of the Perpendicular and Reflections
What you should already know
You should be comfortable with coordinates, straight-line equations, solving linear equations, and the distance from a point to a line. A line in general form is written as ax + by + c = 0.
The foot of the perpendicular from a point to a line is the point where the perpendicular from that point meets the line. A reflection is the mirror image of the point across the line.
The projection formula
Let the point be P(x₀, y₀) and the line be:
ax + by + c = 0
First calculate:
D = (ax₀ + by₀ + c)/(a² + b²)
Then the foot of the perpendicular is:
F = (x₀ - aD, y₀ - bD)
The reflected point is:
P' = (x₀ - 2aD, y₀ - 2bD)
The reflected point lies on the opposite side of the line, and F is the midpoint of PP'.
| Required point | Formula |
|---|---|
| Foot `F` | `(x₀ - aD, y₀ - bD)` |
| Reflection `P'` | `(x₀ - 2aD, y₀ - 2bD)` |
The formula works because (a, b) is a normal vector to the line. A normal vector is perpendicular to the line, so subtracting a suitable multiple of (a, b) moves the point directly toward the line.
Worked example
Find the foot and reflection of P(1, 2) in the line y = x.
Rewrite the line in general form:
x - y = 0
Thus, a = 1, b = -1, and c = 0.
Calculate:
D = (1(1) - 1(2) + 0)/(1² + (-1)²) = -1/2
The foot is:
F = (1 - 1(-1/2), 2 - (-1)(-1/2))
F = (3/2, 3/2)
The reflection is:
P' = (1 - 2(1)(-1/2), 2 - 2(-1)(-1/2))
P' = (2, 1)
This is sensible because reflecting in y = x swaps the coordinates.
def foot_and_reflection(x0, y0, a, b, c):
d = (a * x0 + b * y0 + c) / (a * a + b * b)
foot = (x0 - a * d, y0 - b * d)
reflection = (x0 - 2 * a * d, y0 - 2 * b * d)
return foot, reflection
print(foot_and_reflection(1, 2, 1, -1, 0))> callout note > Always rewrite the line as ax + by + c = 0 before using the formula. Sign errors usually occur when c or the coefficient of y is copied incorrectly.
A quick CAT method
For a reflection question:
- Put the line into general form.
- Compute
D. - Use the reflection formula directly.
- Check that the midpoint of the original and reflected points lies on the line.
For a foot question, use the same calculation but stop after the first formula. If the line is y = x, y = -x, or one of the coordinate axes, symmetry may be faster than the general formula.
Exercise
Find the foot of the perpendicular from (4, 1) to the line 2x - y - 3 = 0.
Show answer
Here D = (2(4) - 1 - 3)/(2² + (-1)²) = 4/5. Therefore the foot is (4 - 2(4/5), 1 - (-1)(4/5)) = (12/5, 9/5).