Where is the foot of the perpendicular from a point to a line?
Question
In the x–y plane, the point A has coordinates (a,0) and the point B has coordinates (0,b), where a and b are positive. The point P, which is distinct from A and B, has coordinates (s,t). X and Y are the feet of the perpendiculars from P to the x-axis and y-axis respectively, and N is the foot of the perpendicular from P to the line AB. Show that the coordinates (x,y) of N are given by x=a2+b2ab2−a(bt−as),y=a2+b2a2b+b(bt−as).
Show that, if (st−b)(s−at)=−1, then N lies on the line XY.
Give a geometrical interpretation of this result.
Interactive diagram
Use this applet to explore the behaviour as A, B and P are moved.
Download GeoGebra file
What can you say about the position of P when N is on XY?
You can show the circle that has AB as a diameter.
Solution
Here’s a diagram of the situation.
You might also like to experiment with the situation in a more dynamic way using the GeoGebra applet here.
The gradient of the line AB is a−b, so the line has equation y=−ab(x−a), which rearranges to bx+ay=ab or ax+by=1, which has a nice symmetry to it.
As the line AB has gradient −ab, it follows that the line perpendicular line NP has gradient ba. So NP, passing through P(s,t) has equation y−t=ba(x−s), which we can rearrange to get ax−by=as−bt.
Now we know that
AB
and
NP
intersect at
N
, so to find the coordinates of
N
we solve the simultaneous equations
andbx+ayax−by=ab=as−bt.
Adding b×(1) to a×(2) gives (a2+b2)x=ab2+a2s−abt so x=a2+b2ab2+a2s−abt=a2+b2ab2−a(bt−as).
Similarly, subtracting b×(2) from a×(1) gives (a2+b2)y=a2b−abs+b2t so y=a2+b2a2b−abs+b2t=a2+b2a2b+b(bt−as) as required.
The points X and Y have coordinates (s,0) and (0,t) respectively, so by the same argument as for AB, we see that the equation of the line XY is tx+sy=st.
Now
N
lies on this line exactly when
⟺⟺⟺⟺⟺ta2+b2ab2−a(bt−as)+sa2+b2a2b+b(bt−as)=stab2t−at(bt−as)+a2bs+bs(bt−as)=st(a2+b2)ab2t−abt2+a2st+a2bs+b2st−abs2=a2st+b2stab2t−abt2+a2bs−abs2=0bt−t2+as−s2=0as ab is non-zerot(b−t)+s(a−s)=0.
Then assuming that s and a−s are non-zero, we can divide by them to see that N lies on this line exactly when s(a−s)t(b−t)+1=0, which is equivalent to the condition we were asked to show (and in fact stronger, as we have shown that this is also a necessary condition).
A geometrical interpretation of this result is that st−b and s−at are the gradients of BP and AP respectively. So if BP and AP are perpendicular, then N lies on XY.
And what does this mean? We know that the angle in a semi-circle is a right angle.
So N lies on XY exactly when P lies on the circle with AB as diameter.
You can explore this further by showing the circle in the GeoGebra applet.

