Formulas & tables/Mathematics/Analytic geometry/Distance from a point to a line

Distance from a point to a line

d=∣Ax0+By0+C∣A2+B2d=\dfrac{|Ax_0+By_0+C|}{\sqrt{A^2+B^2}}

Result unit: length units

What it describes

The distance from a point to a line given in general form Ax+By+C=0Ax+By+C=0.

Symbols

dd
distance
(x0,y0)(x_0,y_0)
the point
A,B,CA, B, C
coefficients of the line

Where it comes from

The distance is measured along the perpendicular (the shortest path). The formula uses the general form of the line Ax+By+C=0Ax+By+C=0.

When to use it

Distance from a point to a line, altitudes, distance between parallel lines.

Example

Point (0,0)(0,0), line 3x+4y−10=03x+4y-10=0. Find the distance.
SubstitutionA=3A=3, B=4B=4, C=−10C=-10, point (0,0)(0,0).
Resultd=∣−10∣9+16=105=2d=\dfrac{|-10|}{\sqrt{9+16}}=\dfrac{10}{5}=2.

Related formulas

Found this formula useful? Share it.

It's free — send it to a friend who's revising.

Teaching? Embed this formula on your site.

Free widget — paste it on your school site, blog or notes. It links to the full version.

Teaching a class or tutoring? Guide students in NexTutor →