Academy
Formulas/maths/Straight Lines/Foot of Perpendicular from a Point to a Line

Foot of Perpendicular from a Point to a Line

Foot of the perpendicular from (x₁, y₁) to the line ax + by + c = 0.
Derivation

Given point P(x1,y1)P(x_1, y_1) and line L:ax+by+c=0L: ax + by + c = 0.

The perpendicular from PP to LL has direction (a,b)(a, b) (the normal to LL). Parametric equations of this perpendicular:

x=x1+at,y=y1+btx = x_1 + at, \qquad y = y_1 + bt

The foot NN is where this meets LL:

a(x1+at)+b(y1+bt)+c=0a(x_1 + at) + b(y_1 + bt) + c = 0 (ax1+by1+c)+t(a2+b2)=0(ax_1 + by_1 + c) + t(a^2 + b^2) = 0 t=ax1+by1+ca2+b2t = -\frac{ax_1 + by_1 + c}{a^2 + b^2}

Substituting back gives the foot:

xx1a=yy1b=ax1+by1+ca2+b2\boxed{\frac{x - x_1}{a} = \frac{y - y_1}{b} = -\frac{ax_1 + by_1 + c}{a^2 + b^2}}

The coordinates of NN explicitly:

N=(x1a(ax1+by1+c)a2+b2,y1b(ax1+by1+c)a2+b2)N = \left(x_1 - \frac{a(ax_1+by_1+c)}{a^2+b^2},\quad y_1 - \frac{b(ax_1+by_1+c)}{a^2+b^2}\right)