On a Galway map, which point on a straight stretch of railway is closest to you?
You're looking at a map of Galway. You've marked where you are and a straight stretch of railway. You could draw a segment from your point to anywhere along the track. How would you spot the shortest one?
Mark F at four, three and P at seven, seven. From F to P, count three units across and four units up. Those moves form the legs of a right-angled triangle. Add three squared and four squared to get twenty-five. Its square root is five, the straight-line distance.
From P, draw a segment that meets the railway line at a right angle at F. Pick any other point Q on the line. The segment from P to Q is the hypotenuse, so it's longer than P to F. The shortest segment is perpendicular to the line. F is its foot.
F and Q are on the same line. The perpendicular from P meets the line at F and is five units long. Q is three units from F. Is P Q shorter than P F, the same length, or longer? Pick an answer.
Write the line as a x plus b y plus c equals zero. A and b cannot both be zero. For your point, substitute its co-ordinates into the expression on top and take the absolute value. Divide by the square root of a squared plus b squared to get the perpendicular distance.
Find the distance from seven, seven to the line three x plus four y equals twenty-four. Subtract twenty-four from both sides, so c is minus twenty-four. Substitute seven for both co-ordinates. The absolute value on top is twenty-five and the square root below is five. Divide to get five units.
Rearrange for y to read the slope. Take its negative reciprocal and use seven, seven to write the perpendicular. Clear the fraction. Triple the original equation and quadruple the perpendicular equation. Add to eliminate y, then substitute x to find the foot. Pythagoras gives five units, matching the formula.
Try the formula on a new point and line. What's the perpendicular distance from five, six to three x plus four y equals nine? Write the line with zero on the right before you pick an answer.
In three x plus four y equals twenty-four, it's tempting to copy positive twenty-four into the formula. Look at the same line after you subtract twenty-four from both sides. The constant on the left is minus twenty-four. That's the value you use for c.
An exam question might ask, 'Find the perpendicular distance from P to the line AB. Hence, find the area of triangle PAB.' From zero, six to eight, zero, the base is ten units long. Use the five-unit distance as the height. Half the base times the height gives twenty-five square units.