Hello. In this lesson, I’ll derive the expression for finding the distance between two parallel lines.
Let ax + by + c1 = 0 and ax + by + c2 = 0 be the equations of the parallel lines. Then, we have to find the distance d between them.
To find the distance, we’ll pick any point P(x1, y1) on the first line and find its perpendicular distance from the second line.
Using the formula discussed here, this distance d equals:
|ax1 + by1 + c2| / √(a2 + b2)
It looks like the value of this expression will keep changing if we change the position of P. But this can’t happen – the distance between two parallel lines should remain the same. So, what’s going on here?
We haven’t yet used the fact that P lies on the first line. That is:
ax1 + by1 + c1 = 0
This gives us:
ax1 + by1 = -c1
Now, we’ll substitute this value of ax1 + by1 in expression for d. We’ll get:
d = |c2 – c1| / √(a2 + b2)
We got what we needed!
A small thing to consider here. If the lines are in the form ax + by + c = 0 and px + qy + r = 0, then since they are parallel, we have:
p/a = q/b
If we assume both these ratios to be k, then p = ka and q = kb. On substituting these in the second line, we’ll get the equation as:
kax + kby + r = 0
⇒ ax + by + r/k = 0
⇒ ax + by + c’ = 0
Now, we can apply the previous formula to find the distance between these lines, which equals:
|c – c’| / √(a2 + b2)
So, remember to convert the given equations such that both have the same corresponding coefficients of x and y. This can be achieved by multiplying or dividing one of the equations by some non-zero constant.
Secondly, if the equations aren’t in the ax + by + c = 0 form, then we must bring all terms to the LHS in the given equations, and only then proceed with apply the above formula.
Lesson Summary
- The distance between the parallel lines ax + by + c1 = 0 and ax + by + c2 = 0 is equal to |c2 – c1| / √(a2 + b2).
That’s all for this lesson. I’ll discuss a few examples related to this formula in the next one. Goodbye.