Suppose, one have two parallel lines given by the equations:
y=mx+b1 and y=mx+b2. Remember, if the lines are parallel, their slopes must be the same, so
m is the same for two lines, hence no subscript for m. How would one approach the problem of finding the distance between those lines?
First, if one draws a picture, he or she shall immediately realize that if a point is A chosen on one of the lines, with coordinates (x1, y1), and a perpendicular line is drawn from that point to the second line, the length of the segment of this new line between two parallel lines give us the sought distance. Let us denote the point of intersection of our perpendicular line with the second line as B(x2,y2).
What do we know of point A and B?
First, since A lies on the first parallel line, its coordinates must satisfy the equation for the first line, that is,
y1=mx1+b1 (1)
Same is true for B and the second line. So we can write:
y2=mx2+b2 (2)
We also know that line AB is perpendicular to both parallel lines. It is a known fact that the slope of the line, which is perpendicular to the given line, is inverse reciprocal of the slope of that line. So the line AB MUST have the slope equal to -1/m. The slope of the line connecting two points, A and B, is given by:
slope=(y2-y1)/(x2-x1). In this case it is -1/m. So we obtain:
(y2-y1)/(x2-x1)=-1/m (3)
The distance between two points, A and B, is given by:
d=√[(y2-y1)2+(x2-x1)2] (4)
From equations (1) and (2) we obtain:
(y2-y1)=m(x2-x1)+(b2-b1) (5)
Plug in (y2-y1) from eq. (5) into eq. (3) and solve for (x2-x1). We obtain upon solving:
(x2-x1)=m(b2-b1)/(m2+1); (6)
Substituting (6) into (3) immediately yields the following:
(y2-y1)=-(b2-b1)/(m2+1) (7)
Now final step is to plug eq. (6) and (7) into eq. (4). After some transformation we obtain:
d=√[(b2-b1)2/(m2+1)2+m2(b2-b1)2/(m2+1)2]=[|b2-b1|/(m2+1)]√(m2+1)
Final answer is as follows:
Comments