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,
Same is true for B and the second line. So we can write:
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:
The distance between two points, A and B, is given by:
From equations (1) and (2) we obtain:
Plug in (y2-y1) from eq. (5) into eq. (3) and solve for (x2-x1). We obtain upon solving:
Substituting (6) into (3) immediately yields the following:
Now final step is to plug eq. (6) and (7) into eq. (4). After some transformation we obtain:
Final answer is as follows: