Distance between two parallel lines: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile app edit
Reverted 1 edit by 62.18.182.150 (talk): Far more common to see b in this role. (TW)
Line 8:
Because the lines are parallel, the perpendicular distance between them is a constant, so it does not matter which point is chosen to measure the distance. Given the equations of two non-vertical parallel lines
 
:<math>y = mx+q_1b_1\,</math>
:<math>y = mx+q_2b_2\,,</math>
 
the distance between the two lines is the distance between the two intersection points of these lines with the perpendicular line
Line 18:
 
:<math>\begin{cases}
y = mx+q_1b_1 \\
y = -x/m \, ,
\end{cases}</math>
Line 25:
 
:<math>\begin{cases}
y = mx+q_2b_2 \\
y = -x/m \, ,
\end{cases}</math>
Line 31:
to get the coordinates of the intersection points. The solutions to the linear systems are the points
 
:<math>\left( x_1,y_1 \right)\ = \left( \frac{-q_1mb_1m}{m^2+1},\frac{q_1b_1}{m^2+1} \right)\, ,</math>
 
and
 
:<math>\left( x_2,y_2 \right)\ = \left( \frac{-q_2mb_2m}{m^2+1},\frac{q_2b_2}{m^2+1} \right)\, .</math>
 
The distance between the points is
 
:<math>d = \sqrt{\left(\frac{q_1mb_1m-q_2mb_2m}{m^2+1}\right)^2 + \left(\frac{q_2b_2-q_1b_1}{m^2+1}\right)^2}\,,</math>
 
which reduces to
 
:<math>d = \frac{|q_2b_2-q_1b_1|}{\sqrt{m^2+1}}\,.</math>
 
When the lines are given by