How this calculator works
A perpendicular line meets the reference at a right angle. For two finite nonzero slopes, their product is -1. A normal-vector construction also handles the horizontal and vertical cases: rotate the reference normal (A,B) to (-B,A) to obtain the new line normal. The foot is the orthogonal projection of the supplied point onto the reference, so the returned perpendicular passes through both. Recovery mode instead constructs the reference through a known point from a known perpendicular slope.
Formula
For reference Ax+By=C and through-point (x0,y0), the perpendicular is -Bx+Ay=-Bx0+Ay0. For finite nonzero m, perpendicular slope=-1/m. Foot=P-[(A x0+B y0-C)/sqrt(A^2+B^2)](A,B)/sqrt(A^2+B^2).
Worked example
The reference y=-2x+4 has slope -2. A perpendicular through (2,1) has slope 1/2 and equation y=0.5x. Its intersection with the reference is (1.6,0.8), the perpendicular foot.
Advertisement
Frequently asked questions
What is perpendicular to a horizontal line?
A vertical line. Standard form represents it with B=0, so no infinite numeric slope is needed.
Does the reference intercept affect the new line?
For a fixed through-point, the new line depends on the reference direction. Its intercept does affect the foot and the distance to the reference.
Can the through-point lie on the reference?
Yes. It is then the perpendicular foot, and the distance is zero.
How can I recover a missing reference slope?
Choose recovery mode and enter the known perpendicular slope plus a point on the reference. A zero perpendicular slope recovers a vertical reference.