Distance between parallel lines

The distance between two parallel lines is the length of a segment drawn from a point on one line perpendicular to the other line. For parallel lines, this length is the same wherever you measure it. Once the numbers in front of xx and yy match in both equations, you can get the distance straight from the difference of the constant terms.

Chalcack concept card · Reviewed by the Chalcack team ·

A perpendicular segment between two parallel lines has the same length wherever you draw it.

Formulas

  • d=∣c1−c2∣a2+b2d=\frac{|c_1-c_2|}{\sqrt{a^2+b^2}} (lines ax+by+c1=0ax+by+c_1=0 and ax+by+c2=0ax+by+c_2=0)
  • d=∣ax1+by1+c∣a2+b2d=\frac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}} (point (x1,y1)(x_1, y_1) on one line, other line ax+by+c=0ax+by+c=0)

When to use it

Use it when you are given the equations of two parallel lines and need the shortest distance between them.

Worked example

Find the distance between 3x+4y−2=03x+4y-2=0 and 6x+8y+16=06x+8y+16=0. Divide the second equation by 2 to get 3x+4y+8=03x+4y+8=0. Then 32+42=5\sqrt{3^2+4^2}=5. So d=∣−2−8∣5=105=2d=\frac{|-2-8|}{5}=\frac{10}{5}=2.

Common mistake

A common mistake is subtracting the constants right away when the xx and yy coefficients differ (for example 3x+4y3x+4y and 6x+8y6x+8y). First divide or multiply one equation so both have the same aa and bb.

Related concepts

All 181 math concepts