How to Find the Distance Between Two Lines
As long as two lines don’t intersect, there will be one point on each line where the two lines are closest to each other. To find the distance between two lines at this point, you use the directional vectors of both lines to find another vector that is perpendicular to both lines. If you have a line along the vector and another line along the vector , this is how you find the shortest distance between the lines:
The Distance Between Two Lines
- 1.
- Let be a random point on the line and be a random point on the line . Express these points by using the parametric equations of the lines.
- 2.
- Create an expression for the vector .
- 3.
- At the point where the two lines are closest to each other, the vector is perpendicular to both lines. This means that you want
and
- 4.
- You now have two equations with two unknowns, and you have a system of equations to solve.
- 5.
- When you find values for both and , you can insert those into the expression for to find what that vector looks like at the point where the two lines are closest to each other.
- 6.
- Finally, you can find , which will be the distance between the lines.
Find the distance between the lines
and
- 1.
- To begin with, you make a point by using the parametric equation of and a point by using the parametric equation of :
and
|
- 2.
- Create :
- 3.
- Find
and
The vector is made up of the numbers in front of in the parametric equation of , and the vector is made up of the numbers in front of in the parametric equation of . That gives you
- 4.
- Solve the system of equations:
- 5.
- Put the values you found for and back into the expression for
- 6.
- Then you can finally find the length of , which is the distance between the two lines: