Skip to content

Mathematics and Statistics · Ch 5 — Locus and Straight Line

Distance of a Point from a Line

7

Distance of a Point from a Line

The distance of a point from a line means the shortest distance — the length of the perpendicular dropped from the point onto the line. For a line written in general form and a point P(x1,y1)P(x_1, y_1), this has a clean formula:

Note

Distance of a Point from a Line

The perpendicular distance of P(x1,y1)P(x_1, y_1) from the line ax+by+c=0ax + by + c = 0 is

d=∣ax1+by1+c∣a2+b2d = \dfrac{\lvert a x_1 + b y_1 + c \rvert}{\sqrt{a^2 + b^2}}

The method is mechanical, but two points must be respected. First, the line must be in general form ax+by+c=0ax + by + c = 0 (everything on one side, zero on the other) before the coefficients aa, bb, cc are read off — a common error is to use a line still written as y=mx+cy = mx + c. Second, the numerator carries absolute-value bars, because a distance can never be negative; substitute the point, then take the modulus.

Figure 2 — Perpendicular distance from P(3, -5) to the line 3x - 4y - 26 = 0
Figure 2 — Perpendicular distance from P(3, -5) to the line 3x - 4y - 26 = 0

A closely related quantity is the distance between two parallel lines. Two parallel lines can always be written with identical xx- and yy-coefficients as ax+by+c1=0ax + by + c_1 = 0 and ax+by+c2=0ax + by + c_2 = 0. The distance between them is

Note

Distance Between Two Parallel Lines

d=∣c1−c2∣a2+b2d = \dfrac{\lvert c_1 - c_2 \rvert}{\sqrt{a^2 + b^2}} …

Definition 1Perpendicular distance

d=∣ax1+by1+c∣a2+b2d = \dfrac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}} from point P(x1,y1)P(x_1,y_1) to line ax+by+c=0ax+by+c=0 (line must be in g …

Definition 2Distance between parallel lines

d=∣c1−c2∣a2+b2d = \dfrac{|c_1-c_2|}{\sqrt{a^2+b^2}} for ax+by+c1=0ax+by+c_1=0 and ax+by+c2=0ax+by+c_2=0 — the x,yx,y coefficients must be m …