MathClario
← Back to High school
High school📐Geometry●●○○○· 3 min
📏

Point-to-line distance: |ax₀ + by₀ + c| / √(a² + b²)

Direct formula for the distance from a point to a line with Cartesian equation ax+by+c = 0.

The formula

For a point M(x0,y0)M(x_0, y_0) and a line (d)(d) with Cartesian equation ax+by+c=0a x + b y + c = 0:

d(M,(d))=∣ax0+by0+c∣a2+b2d(M, (d)) = \dfrac{|a x_0 + b y_0 + c|}{\sqrt{a^2 + b^2}}

Interpretation

  • Numerator: signed distance (can be positive or negative), take absolute value.
  • Denominator: norm of the normal vector n⃗=(a,b)\vec{n} = (a, b).

Typical example

Distance from M(3,4)M(3, 4) to line (d):3x−4y+5=0(d): 3x - 4y + 5 = 0.

d=∣3×3−4×4+5∣9+16=∣9−16+5∣25=25=0.4d = \dfrac{|3 \times 3 - 4 \times 4 + 5|}{\sqrt{9 + 16}} = \dfrac{|9 - 16 + 5|}{\sqrt{25}} = \dfrac{2}{5} = 0.4.

Special cases

Horizontal line y=ky = k ⇒ equation 0⋅x+1⋅y−k=00 \cdot x + 1 \cdot y - k = 0.

d(M,(d))=∣y0−k∣d(M, (d)) = |y_0 - k|.

Vertical line x=kx = k ⇒ d(M,(d))=∣x0−k∣d(M, (d)) = |x_0 - k|.

Origin to line: d(O,(d))=∣c∣a2+b2d(O, (d)) = \dfrac{|c|}{\sqrt{a^2 + b^2}}.

Setting the equation

If the line is given by y=mx+py = m x + p (slope form), convert to Cartesian:

mx−y+p=0m x - y + p = 0

Here a=ma = m, b=−1b = -1, c=pc = p.

Common mistakes

  1. Forgetting the absolute value in the numerator.
  2. Forgetting a2+b2\sqrt{a^2 + b^2} in the denominator.
  3. Using y=mx+py = mx + p as-is without converting to ax+by+c=0ax + by + c = 0.
?À toi de jouer

Distance from O(0, 0) to line 3x + 4y − 10 = 0?

Mini-quiz

Question 1 / 3

Distance from M(1, 2) to 4x − 3y + 1 = 0?

#distance#line#Cartesian equation#grade 11

You might also like