Monday, October 29, 2012

Minimum Distance Between Two Parallel Lines


A lot of students seem to have difficulties in determining the minimum distance between two parallel lines.  Conceptually, if you have these two lines next to each other with the same slope, you can draw any number of different lines that can connect the two, though they all would be at different angles.  However, the shortest line that you can draw is the one that is perpendicular to them - the line that has no relative side to side travel to add extra length to the connecting line.  This post will hopefully explain simply how this can be done, while showing that it isn't really anything more difficult than identifying the information that you need, and then using a series of simpler concepts to get to the final solution.  You will hopefully find that these problems really aren't that difficult!  Please do me a favor and click the +1 button at the end to help me share my post!

Sometimes you will be given two lines (or line segments) or an equation to start with.  Here, let's start even further back, just for practice.  Let's begin just with two random ordered pairs that I've selected.

Find the equation of the line AB that crosses through the points A(2,1) and B(4,6).

As I described in my previous post here, you can determine the equation of this line quite easily.

Slope m = (y2-y1) / (x2-x1) = (6-1) / (4-2) = 5/2
Y-intercept b = y-mx = 1-(5/2)*2 = (-4)
Therefore: y = (5/2)x - 4.  This is the equation of our line.  You shouldn't have had problems following along through this step, though if you'd like some review, check out my post here.  Now that we have our first line, let's develop the rest of our problem.

What is the minimum distance between line AB and a parallel line CD that passes through point C(3,8)?

Recall that parallel lines, by definition, are lines that have the same slope, and so will never cross or come closer together.   Also, though you can fit any length of line in between these two starting lines, the shortest one you can draw between them is perpendicular.  Draw two lines and convince yourself of this!  The minimum distance between the two lines is a line perpendicular to them both. 

Here is a small recap of the information that we already know to help us answer this question, as well as a bit of an outline of how we will go about solving it.

Finding the distance between our line and point
  • First line: y = (5/2)x - 4
  • Point on second line = (3, 8).  FYI, you now have enough information to determine the equation of the second line, though it's not required right now.
  • Shortest distance between the lines is an intersecting line that is perpendicular to both. 
  • The distance can be calculated by the distance formula. What does this need?  We need two points. We have one given to us, and now we need the second point, which will lie on our first line.
  • We find this second point at the intersection of the starting line and the perpendicular line that passes through the given point. How do we find this intersection?
  • The intersection is where the equations of the two lines are equal.  We have the first equation, solved in the first step above.  How do we get the second equation, of the perpendicular line?
  • The second equation comes from knowing the given point, and the slope perpendicular to our parallel lines.  Recall: the slope that is perpendicular to slope "m" is "-1/m".
  • Solving the system of equations will yield our second point of interest.  And once we have the point, we can simply plug numbers into the distance formula to find our final answer.
It seems like a lot, but if you follow it through, you can see the logic behind all of the steps. Find one thing which leads to another, which leads to another, which leads us to the solution.  This is another good piece of advice for working with more complex problems.  Look at what you need to find, and try to step backwards to identify helpful steps that you can take to progress through the process. Ask yourself "what do I need to find this?" and then "what do I need to find that?" and you will then find that you have outlined your own strategy of how to solve the problem!

So then, let's get to the numbers.  To start, let's find the equation of the perpendicular line.  We have a point (3,8), and we want the slope that is perpendicular to the slope (5/2)... which is (-2/5). Now we can find our equation.

(y-y1) = m(x-x1)
y-8 = (-2/5)(x-3)
y=(-2/5)x + (6/5) +8
y=(-2/5)x + (46/5)

Our line and point, with the perpendicular minimum distance shown.
Now we want to find the intersection point of this perpendicular line with our first line (equation y=(5/2)-4). To do this, we solve the system of equations by setting them to be equal to each other, solve for the variable x, and then sub in this x value into either one of the original line equations to find y.  x and y are the ordered pair of our second coordinate.

Solve the following system:
y=(5/2)x - 4
y=(-2/5)x + (46/5)

(-2/5)x + (46/5) = (5/2)x - 4
(-2/5)x - (5/2)x = (-4) - (46/5)
(-4-25)x/10 = (-20-46)/5
(-29)x/10 = (-66/5)
x = (-66/5)(10) / (-29)
x = 660 / (5)(29)
x = 132/29 Here is our x value! (Kinda ugly, but sometimes that's what you get!)

Now we put that value into either one of the first two equations in our system, and solve for y.  Both will give the same answer... they have to! We're talking about the POINT where the two lines cross, and hence are EQUAL in both cases.

y = (5/2)x - 4
y = (5/2)(132/29) - 4
y = 660/58 - 4
y = (660 - 232) / 58
y = 428/58
y = 214/29 Here is our y value! (Just as ugly as x!)

Here's our system, with the intersection point now displayed.  Looks like our calculations are correct!
So, we have our point on the first line as (132/29, 214/29).  Now all we need to do is find the distance between this point, and the given point (3,8).  To do this we can use the distance formula.  I've explained the distance formula in another post, so I'll just go ahead and use it here.

distance, d = sqrt[(x2-x1)2 + (y2-y1)2
(Again, my apologies for not being able to show a proper square root sign.)
d = sqrt[(3-132/29)2 + (8-214/29)2]
d = sqrt[(-45/29)2 + (18/29)2]
d = sqrt[(2025+324)/841]
d = sqrt[2349/841]
d = (9/29)*sqrt(29) This is the answer!

Unfortunately, we get a nasty looking answer.  But that doesn't make it any less correct.  Hopefully you were able to follow along with how I approached this problem, and how we arrived at the solution, because these are the kinds of steps and logical thinking that you will need to use.  In all likelihood, most questions that you will encounter in your math studies are going to look a whole lot friendlier than this monster.  As always, feel free to leave any comments or questions below, and I'll do my best to address them. :)  Also, please remember to click the +1 button below if this was helpful.  You can even tweet about it automatically by clicking this link.  Bookmark my site and come back again!


Related Posts