Video: The Perpendicular Distance between Points and Straight Lines in Space

In this video, we will learn how to calculate the perpendicular distance between a point and a straight line or between two parallel lines in space using a formula.

16:34

Video Transcript

In this video, we’ll learn how to calculate the perpendicular distance between a point and a straight line or between two parallel lines in space using a formula. And as we’ll see, we can use the same formula in both cases.

As we get started, let’s consider this first case, finding the perpendicular distance between a point and a line. If this is our point and this is our line, then that distance would look like this, and we can call it 𝑑. To solve for 𝑑, there are three pieces of information we’ll need. First, we’ll need to know the coordinates of our point in space. We’ll call that point 𝑃. We’ll also need to know the coordinates of a point on the line. It could be anywhere on the line, and we’ll call that point 𝐿. Lastly, we’ll need to know the components of a vector that is parallel to our line, and we’ll call this vector 𝐬.

In our scenario, we’ll let this point be point 𝑃, and let’s say we also know a point on the line. And as we said, this could be anywhere on the line. And lastly, say we also know the components of a vector, we’ve called it 𝐬, that is parallel to our line. Our claim is that once we know these things, we can solve for the minimum distance, the perpendicular distance, between our point and the line. Here’s how we can do that. First, we’ll set up a vector that goes from point 𝑃 to point 𝐿. We’ll call this vector 𝐏𝐋. And notice how the vector 𝐏𝐋 and the vector 𝐬 form two sides of a parallelogram. If we call the area of that parallelogram 𝐴, then we can say that the magnitude of the vector 𝐏𝐋 crossed with the vector 𝐬 is equal to that area.

Now, on our sketch, here’s something interesting. If we take the perpendicular distance 𝑑 and we slide it so that it’s now in contact with the tail end of the vector 𝐬, then that distance 𝑑 multiplied by the magnitude of the vector 𝐬 gives us the area of this rectangle. And the area of this rectangle in orange and the parallelogram in pink are identical. So not only can we say that the magnitude of 𝐏𝐋 cross 𝐬 equals 𝐴, we can also say that 𝑑 times the magnitude of 𝐬 itself equals 𝐴. That means we can write this equation here. And if we divide both sides by the magnitude of the vector 𝐬, canceling that factor on the left, then we get this expression for the perpendicular distance 𝑑. And as we’ve seen, the three things we need to calculate 𝑑 are a point in space, a point on our line, and a vector parallel to the line.

Knowing this, let’s change our scenario so that now we’re solving for the perpendicular distance between two parallel lines. The wonderful thing about doing this is how similar it is to the previous case. Once again, to calculate 𝑑, we need to know three things: a point on line one, we’ll call that point 𝐿; a point somewhere on line two, we’ll call that point 𝑃; and we also need a vector parallel to both lines. Knowing all this, we can again define a vector from point 𝑃 to point 𝐿 and use it and the vector 𝐬 in our equation to solve for 𝑑. The best way to learn all this is through practice. So let’s look now at an example.

Find, to one decimal place, the perpendicular distance from point negative three, negative four, zero to the line on points one, three, one and four, three, two.

Okay, so here we have these two points in space with coordinates one, three, one and four, three, two. And we’re told that a line lies along both these points. Along with this, there’s a third point whose coordinates we know. And we want to solve for the perpendicular distance between this third point and the line. We’ll call this distance 𝑑.

To begin doing this, we can recall the equation for the perpendicular distance between a line and a point in space. To carry out this calculation, we’ll need to know the coordinates of a point in space, we have those, as well as the coordinates of a point on our line, and we actually have two of those. The last thing we do need, though, to use this equation for 𝑑 are the components of a vector that is parallel to our line. We’re not given that information.

But notice that if we drew a vector from one given point on our line to the other, then this vector would be parallel to our line and we could use it in our equation to solve for 𝑑. If we call this vector 𝐬, we can see that its components are equal to the coordinates of our first point on the line — one, three, one — minus those of our second point. What we get is a vector with components negative three, zero, negative one. Now that we know the vector 𝐬 that we’ll use in our equation for 𝑑, let’s consider this vector 𝐏𝐋. Here, 𝑃 is a point in three-dimensional space and 𝐿 is a point somewhere along our line.

Let’s say that on our line we choose the point one, three, one to be point 𝐿. That means the vector 𝐏𝐋 will look like this. And we can solve for the components of this vector the same way we did for those of 𝐬. We subtract the coordinates of point 𝑃 from those of point 𝐿. And we find that 𝐏𝐋 has components four, seven, and one. We now have all the information needed to start calculating our perpendicular distance. We’ll begin by computing the cross product of 𝐏𝐋 and 𝐬. That’s equal to the determinant of this three-by-three matrix. Here, our first row are the 𝐢, 𝐣, and 𝐤 hat unit vectors. And the second and third rows are the respective components of vectors 𝐏𝐋 and 𝐬.

Working component by component, we get 𝐢 hat times seven minus 𝐣 hat times one plus 𝐤 hat times negative 21. We can also write this as the vector with components seven, negative one, negative 21. These then are the components of the cross product of 𝐏𝐋 and 𝐬. And now we can take the magnitude of this cross product and divide it by the magnitude of 𝐬. The magnitude of 𝐏𝐋 cross 𝐬 equals the square root of seven squared plus negative one squared plus negative 21 squared. And we then divide this by the magnitude of 𝐬, which equals the square root of negative three squared plus zero squared plus negative one squared. Entering this expression in our calculator and keeping our result to one decimal place, we get an answer of 7.0. Our final answer then is that the perpendicular distance from the given point to the given line is equal to 7.0 length units.

Let’s look now at another example where we find the minimum distance between a point and a line.

Determine, to the nearest hundredth, the length of the perpendicular drawn from the point negative five, negative seven, negative 10 to the straight line 𝑥 plus eight over two equals 𝑦 minus nine over eight equals 𝑧 plus seven over negative eight.

Okay, so here we have this known point in space and we also know there’s a straight line passing through space. And we want to know the length of the perpendicular from the line to the point. We’ll call this length 𝑑. We can recall that 𝑑 is given by this expression, where 𝐬 and 𝐏𝐋 are vectors. The condition for vector 𝐬 is that it is parallel to our given line. Regarding vector 𝐏𝐋, this is a vector that points from our given point in space, and we’ll call this point 𝑃, to a point that lies somewhere anywhere along our line. And we’ll call this point 𝐿. This then is what that vector looks like. We can see that, to solve for the distance 𝑑, we’ll need to know the components of a vector parallel to our line, the coordinates of a point on the line, and the coordinates of a point in space.

We’re given the coordinates of point 𝑃. And to solve for 𝐬 and 𝐿, we’ll use the equation of our straight line given here. What we want to do is to convert the form of this equation into what’s called vector form. It’s given to us in what is called symmetric form. And we can write it this way because all three of these fractions are equal to a scale factor we can call 𝑡. This means that we can write out separate equations for the 𝑥-, 𝑦-, and 𝑧-coordinates of our line. For example, the fact that 𝑥 plus eight over two equals 𝑡 means that 𝑥 must be equal to two times 𝑡 minus eight. Likewise, since 𝑦 minus nine over eight equals 𝑡, we can say that 𝑦 equals eight 𝑡 plus nine. And lastly, 𝑧 plus seven over negative eight equaling 𝑡 implies that 𝑧 equals negative eight 𝑡 minus seven.

Now, our line is expressed in what is called parametric form. And with just a few small changes, we can write this in vector form. If we collect the 𝑥, 𝑦, and 𝑧 equations together, we can say the 𝑥-, 𝑦-, and 𝑧-components of our line are equal to a vector negative eight, nine, negative seven plus our scale factor 𝑡 times the vector two, eight, negative eight. If we collect these 𝑥-, 𝑦-, and 𝑧-components into a single vector we’ll call 𝐫, then 𝐫 equals the vector negative eight, nine, negative seven plus the scale factor 𝑡 times the vector two, eight, negative eight.

This first vector in our equation is a vector from the origin of a coordinate frame to a point on the line. That tells us then that the point with coordinates negative eight, nine, negative seven lies along our line. And then over here, this vector we multiply by 𝑡 is a vector that runs along the length of our line. In other words, it’s parallel to it.

All this means we know the components of a vector parallel to our line and the coordinates of a point on it. The vector 𝐬 has components two, eight, negative eight, and the point 𝐿 has coordinates negative eight, nine, negative seven. Knowing this, we can now define the components of vector 𝐏𝐋 in our scenario. It’s equal to the coordinates of point 𝐿 minus those of point 𝑃. We get a vector with components negative three, 16, three.

Now that we know the components of 𝐬 and 𝐏𝐋, we’re ready to calculate the cross product of these vectors. That’s equal to the determinant of this three-by-three matrix. Here, in our first row are the 𝐢, 𝐣, and 𝐤 hat unit vectors and in the second and third rows the corresponding components of vectors 𝐏𝐋 and 𝐬, respectively. This is equal to 𝐢 hat times negative 152 minus 𝐣 hat times 18 plus 𝐤 hat times negative 56 or, in other words, a vector with components negative 152, negative 18, negative 56.

We’re now ready to calculate the magnitude of this cross product and then divide it by the magnitude of 𝐬. The magnitude of 𝐏𝐋 cross 𝐬 equals the square root of negative 152 squared plus negative 18 squared plus negative 56 squared. We then divide that by the magnitude of 𝐬, itself equal to the square root of two squared plus eight squared plus negative eight squared. When we evaluate this entire fraction here, the result, rounded to the nearest hundredth, is 14.19. This then is the length of the perpendicular from the given point to the given line.

Let’s now look at an example where we calculate the distance between two parallel lines.

Find, to the nearest hundredth, the distance between the parallel lines 𝐿 one, 𝑥 plus seven over nine equals 𝑦 plus one over five equals 𝑧 minus seven over negative six, and 𝐿 two, 𝑥 plus three over nine equals 𝑦 plus 10 over five equals 𝑧 plus 10 over negative six.

Okay, so here we have these two lines that are parallel, 𝐿 one and 𝐿 two. Our question asks us to solve for the distance between them, meaning the minimum or perpendicular distance between these lines. Let’s call that distance 𝑑, and we can recall the mathematical relationship for this distance. What we’ll need to know are the components of a vector, we’ve called it 𝐬, that runs parallel to our two lines. And we’ll also need to know the components of a vector 𝐏𝐋 that runs from a point on our second line to a point on our first line. We can say then that, to calculate 𝑑, the coordinates of points 𝑃 and 𝐿 and the components of vector 𝐬 are what we need to know.

To solve for this information, let’s look at the given equations of lines one and two. Starting with line one, this is given in what’s called symmetric form. We can write these three fractions as being equal to one another because we say that they’re also equal to a scale factor. We can call it 𝑡 one. The fact that these three fractions are all equal to 𝑡 one means that we can write separate equations for the 𝑥-, 𝑦-, and 𝑧-coordinates of line 𝐿 one. That is, since 𝑥 plus seven divided by nine equals 𝑡 one, we can write that 𝑥 equals nine times 𝑡 one minus seven. In a similar way, since 𝑦 plus one divided by five equals 𝑡 one, 𝑦 is equal to five times 𝑡 one minus one. And then, 𝑧 minus seven over negative six equaling 𝑡 one implies that 𝑧 equals negative six 𝑡 one plus seven.

Line 𝐿 one is now written in what’s called parametric form. We can combine these three separate equations into one vector equation. The vector with components 𝑥, 𝑦, 𝑧 is equal to the vector to negative seven, negative one, seven plus our scale factor 𝑡 one times the vector nine, five, negative six.

Now, if we take our 𝑥-, 𝑦-, and 𝑧-components and write them as the vector 𝐫, then this equals the vector negative seven, negative one, seven plus 𝑡 one times the vector nine, five, negative six. This first vector is a vector from the origin of a coordinate system to a point on line 𝐿 one. That is, the point with coordinates negative seven, negative one, seven lies on 𝐿 one. And then, regarding the second vector, this is a vector that lies along the axis of this line. That means it’s parallel to the line. And therefore, we can say that this is our vector 𝐬.

So far then, we have the components of a vector parallel to both of our lines. And we also have the coordinates of a point on our first line. To find the coordinates of a point on our second line, let’s look at that line’s equation. Once again, this equation is given to us in symmetric form. That means we can say that each one of these fractions is equal to another scale factor we’ll call 𝑡 two. If we once again write out separate equations for 𝑥, 𝑦, and 𝑧, we find that 𝑥 equals nine 𝑡 two minus three, 𝑦 equals five 𝑡 two minus 10, and 𝑧 equals negative six 𝑡 two minus 10.

Once again, we can write these parametric equations as a vector equation. A vector with components 𝑥, 𝑦, and 𝑧 equals the vector negative three, negative 10, negative 10 plus 𝑡 two times the vector nine, five, negative six. Written this way, we know that this vector travels from the origin of a coordinate frame to a point along our line 𝐿 two. This tells us that the coordinates of that point are simply the components of the vector. We can write then that the coordinates of the point we’ve called 𝑃 are negative three, negative 10, negative 10. Our next step is to use the coordinates of points 𝐿 and 𝑃 to solve for the vector 𝐏𝐋. This is the vector with components equal to the difference between the coordinates of point 𝐿 and those of point 𝑃. 𝐏𝐋, therefore, has components negative four, nine, 17.

We can now move ahead by calculating the cross product of vectors 𝐏𝐋 and 𝐬. That equals the determinant of this matrix. And notice that, by column, we have the 𝑥-, 𝑦-, and 𝑧-components of our two vectors. Calculating this cross product, we get 𝐢 hat times negative 139 minus 𝐣 hat times negative 129 plus 𝐤 hat times negative 101. We can write this result then as a vector with components negative 139, positive 129, and negative 101. Now that we know 𝐏𝐋 cross 𝐬, we’re ready to calculate the magnitude of this cross product and divide it by the magnitude of 𝐬.

The magnitude of 𝐏𝐋 cross 𝐬 equals the square root of negative 139 squared plus 129 squared plus negative 101 squared. We divide this by the magnitude of 𝐬, which itself is the square root of nine squared plus five squared plus negative six squared. Calculating this entire fraction altogether, rounding to the nearest hundredth, we get an answer of 18.03. We say then that the distance between these two parallel lines is 18.03 length units.

Let’s finish up our lesson now by summarizing a few key points. In this lesson, we saw that given a point and a line in space, the perpendicular distance between them is given by this expression. 𝐏𝐋 is a vector going from a point 𝑃 in space to a point 𝐿 on the line in question, and 𝐬 is a vector that’s parallel to that line. We also saw that given two parallel lines in space, the perpendicular distance between them is given by the same expression. In this case, 𝐬 is a vector that’s parallel to both lines, 𝑃 is a point that lies on one line, 𝐿 is a point that lies on the other, and, once again, 𝐏𝐋 is a vector that goes from point 𝑃 to point 𝐿.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.