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

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 πΏ.