p > 0 is the perpendicular distance from the origin to the line. α is the angle the perpendicular makes with the positive x-axis.
Derivation
Let p>0 be the perpendicular distance from the origin to the line, and α the angle this perpendicular makes with the positive x-axis. The foot of the perpendicular is N(pcosα,psinα).
The line is perpendicular to ON, so its slope is −cotα. Using point-slope form at N:
Choose the sign so the right side is positive (p>0). Then:
p=a2+b2∣c∣
This immediately gives the perpendicular distance from the origin to any line ax+by+c=0.
Why p>0 is required
The normal form uses polar coordinates to locate the foot of the perpendicular: α carries all directional information, sweeping the full 360°. Since α alone determines which direction the normal points — including "backwards" — p has no directional duty left. It is a pure magnitude. Allowing p<0 would make the representation non-unique: the same line would be described by (p,α) and (−p,α+180°). The constraint p>0 ensures every line has exactly one normal form.
Why divide by a2+b2
The general equation ax+by+c=0 and the normal form xcosα+ysinα−p=0 describe the same line, so their coefficients are proportional — not necessarily equal. The proportionality constant k satisfies:
acosα=bsinα=c−p=k
From cosα=ak and sinα=bk, apply cos2α+sin2α=1:
k2(a2+b2)=1⟹k=±a2+b21
Dividing by a2+b2 is not an algebraic trick — it is the act of normalising the vector (a,b) to unit length, forcing the coefficients of x and y to become direction cosines (cosα,sinα). The constant term on the right then becomes p automatically.
Note
The general equation $ax + by + c = 0$ and $6ax + 6by + 6c = 0$ define the same line — coefficients define a line by their ratios, not their absolute values. This is why equality between the coefficients of the two forms is impossible in general (e.g. $\cos\alpha = 3$ is impossible), while proportionality always holds.
Why (a,b) is normal to the line
Take two distinct points P(x1,y1) and Q(x2,y2) on the line ax+by+c=0. Both satisfy the equation:
ax1+by1+c=0,ax2+by2+c=0
Subtracting:
a(x2−x1)+b(y2−y1)=0
This is the dot product (a,b)⋅(x2−x1,y2−y1)=0. The vector (x2−x1,y2−y1) points along the line. A zero dot product means (a,b) is perpendicular to it — i.e. (a,b) is normal to the line.
The general equation ax+by=−c is therefore a geometric statement: project any point (x,y) onto the normal vector (a,b), and the result is always the same constant. Normalising converts that constant into the actual perpendicular distance from the origin.