Let L:Ax+By+C=0 be a line, whose distance from the point P(x1,y1) is d. Draw a perpendicular PM from the point P to the line L.
If the line meets the X and Y-axes at the points Q and R respectively, then coordinates of the point are Q(−AC,0) and R(0,−BC). Thus, the area of the △PQR is given by area(△PQR)=21PM⋅QR, which gives PM=QR2 area (△PQR).... (i)
Also, area (△PQR) =21∣∣x1(0+BC)+(−AC)(−BC−y1)+0(y1−0)∣∣ =21∣∣x1BC+y1AC+ABC2∣∣
or 2 area (△PQR)=∣∣ABC∣∣⋅∣Ax1+By1+C∣
and QR=(0+AC)2+(BC−0)2 =∣∣ABC∣∣A2+B2
Substituting the values of area (△PQR) and QR in Eq. (i), we get PM=A2+B2∣Ax1+By1+C∣
or d=A2+B2∣Ax1+By1+C∣
Thus, the perpendicular distance (d) of a line Ax+By+C=0 from a point (x1,y1) is given by d=A2+B2∣Ax1+By1+C∣