Lesson Explainer: The Perpendicular Distance between Points and Straight Lines in Space | Nagwa Lesson Explainer: The Perpendicular Distance between Points and Straight Lines in Space | Nagwa

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

In this explainer, 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.

To begin with, we recall that a single straight line is specified uniquely in space either if it passes through a known fixed point and has a known direction, as in diagram 1 below, or if the line passes through two known fixed points, as in diagram 2.

In the first case, the line, which has direction vector 𝑑, passes through the point 𝐴(𝑥,𝑦,𝑧), which has position vector 𝑎. If 𝑃(𝑥,𝑦,𝑧) is any point on this line and 𝑟 is the position vector of 𝑃, then 𝑟=𝑎+𝜆𝑑 is the vector equation of the line. Here, 𝜆 is a scalar and each value of 𝜆 gives the position vector of one unique point on the line. Expanding on this, recall that we can express the equation of a line in three dimensions in the following ways.

Definition: Forms of the Equation of a Line in Three Dimensions

In general, we can write the equation of a line parallel to the direction vector 𝑑=𝑎𝑖+𝑏𝑗+𝑐𝑘 (where 𝑖, 𝑗, and 𝑘 are the unit vectors in the 𝑥-, 𝑦-, and 𝑧-directions) and passing through the point 𝐴(𝑥,𝑦,𝑧) as 𝑟=𝑥𝑖+𝑦𝑗+𝑧𝑘+𝜆𝑎𝑖+𝑏𝑗+𝑐𝑘,𝑥=𝑥+𝜆𝑎,𝑦=𝑦+𝜆𝑏,𝑧=𝑧+𝜆𝑐,𝑥𝑥𝑎=𝑦𝑦𝑏=𝑧𝑧𝑐.(vectorform)(parametricform)or(Cartesianform)

The point with coordinates (𝑥,𝑦,𝑧) is one of infinitely many points on the line and 𝑎, 𝑏, and 𝑐 are called the direction ratios.

In the second case (diagram 2), for a line passing through two known fixed points 𝐴(𝑥,𝑦,𝑧) and 𝐵(𝑥,𝑦,𝑧) with associated vectors 𝑎 and 𝑏, the direction vector of this line is given by 𝑑=𝑏𝑎. That is, 𝑑=(𝑥𝑥)𝑖+(𝑦𝑦)𝑗+(𝑧𝑧)𝑘.

The direction ratios are then (𝑥𝑥)(𝑦𝑦)(𝑧𝑧), and using either of 𝐴 or 𝐵 as a fixed point, we can again write the line in vector, parametric, or Cartesian forms.

In three dimensions, we can use the property of the cross product between vectors to calculate the perpendicular distance.

Theorem: Cross Product between Vectors

For any three-dimensional vectors 𝑢 and 𝑣, 𝑢×𝑣 is the area of the parallelogram spanned by 𝑢 and 𝑣.

We want to find the perpendicular distance between the point 𝑃(𝑥,𝑦,𝑧) and the line 𝑟=𝑎+𝑡𝑑.

The direction of our line is given by 𝑑 and the vector 𝑎 gives us a point on the line that we will call 𝐴. We can then construct a parallelogram as shown in the following figure.

There are two ways of finding the area of this parallelogram. First, we can represent the nonparallel sides as vectors 𝑑 and 𝐴𝑃, then the area of the parallelogram is equal to the magnitude of the cross product of these vectors: area=𝐴𝑃×𝑑.

Second, we can also find this area by recalling that the area of a parallelogram is the length of the base multiplied by its perpendicular height.

Considering that we add the perpendicular distance, 𝐷, from point 𝑃 to the line 𝐿 onto our diagram, we find that 𝑑 can represent the base of the parallelogram and 𝐷 can represent the corresponding height of the base 𝑑; then, we have areabaseheight=×=𝐷×𝑑.

Equating these two expressions for the area of the parallelogram gives us 𝐴𝑃×𝑑=𝐷×𝑑.

We can rearrange this equation to make 𝐷 the subject: 𝐷=𝐴𝑃×𝑑𝑑.

We summarize the formula for finding the perpendicular distance between a point and a line.

Theorem: Three-Dimensional Formula for the Distance between a Point and a Line

The perpendicular distance, 𝐷, between a point 𝑃(𝑥,𝑦,𝑧) and a line with direction vector 𝑑 is given by 𝐷=𝐴𝑃×𝑑𝑑, where 𝐴 is any point on the line.

It is worth noting that we can show that this is the shortest distance between any point and any line. If we choose an arbitrary point 𝑄 on line 𝐿, then we can always draw the following perpendicular:

We can then see that 𝑃𝑄 is the hypotenuse of a right triangle and is therefore longer than the perpendicular distance.

Since this is the shortest distance between a point and a line in three dimensions, we refer to this as the distance between a point and a line in three dimensions.

Let us see some examples of how we can apply this formula to find the perpendicular distance between a point and a line in three dimensions.

Example 1: Finding the Length of the Perpendicular Drawn from a Point to a Straight Line

Let 𝐿 be the line through the point (7,5,5) in the direction of vector (2,4,9). Find the distance between 𝐿 and the point (2,6,6) to the nearest hundredth.

Answer

We want to find the perpendicular distance between a point and a straight line. We can do this by recalling the following result.

The perpendicular distance, 𝐷, between a point 𝑃(𝑥,𝑦,𝑧) and a line with direction vector 𝑑 is given by 𝐷=𝐴𝑃×𝑑𝑑, where 𝐴 is any point on the line.

In our case, 𝑃(2,6,6), 𝑑=(2,4,9), and 𝐴(7,5,5). To find the perpendicular distance, we first need to determine 𝐴𝑃×𝑑.

We start by finding 𝐴𝑃: 𝐴𝑃=(2,6,6)(7,5,5)=(5,1,1).

We can use this to compute the cross product: 𝐴𝑃×𝑑=(5,1,1)×(2,4,9)=||||𝑖𝑗𝑘511249||||=||1149||𝑖||5129||𝑗+||5124||𝑘=(94)𝑖(452)𝑗+(202)𝑘=13𝑖43𝑗22𝑘.

Then, we can calculate the magnitude of this vector: 𝐴𝑃×𝑑=13𝑖43𝑗22𝑘=(13)+(43)+(22)=2502.

Finally, the perpendicular distance is given by 𝐷=𝐴𝑃×𝑑𝑑=2502(2,4,9)=25022+4+(9)=2502101.

Rounding to the nearest hundredth gives 25021014.98.lengthunits

Hence, the perpendicular distance between the point (2,6,6) and the line through point (7,5,5) in the direction of vector (2,4,9) to the nearest hundredth is 4.98 length units.

Example 2: Finding the Length of the Perpendicular Drawn from a Point to a Straight Line

Find the length of the perpendicular drawn from the point 𝐴(8,1,10) to the straight line 𝑟=(1,2,7)+𝑡(9,9,6) rounded to the nearest hundredth.

Answer

We want to find the perpendicular distance between a point and a straight line. We can do this by recalling the following result.

The perpendicular distance, 𝐷, between the point 𝐴(𝑥,𝑦,𝑧) and the line with direction vector 𝑑 is given by 𝐷=𝐵𝐴×𝑑𝑑, where 𝐵 is any point on the line.

We also recall that a line given in the vector form 𝑟=𝑏+𝑡𝑑 passes through the point with position vector 𝑏 and has the direction vector 𝑑.

In our case, 𝐴(8,1,10), 𝑑=(9,9,6) and 𝐵(1,2,7). To find the perpendicular distance, we first need to determine 𝐵𝐴×𝑑.

We start by finding 𝐵𝐴: 𝐵𝐴=(8,1,10)(1,2,7)=(7,1,17).

We can use this to compute the cross product: 𝐵𝐴×𝑑=(7,1,17)×(9,9,6)=||||𝑖𝑗𝑘7117996||||=||11796||𝑖||71796||𝑗+||7199||𝑘=(6+153)𝑖(42+153)𝑗+(639)𝑘=147𝑖111𝑗+54𝑘.

Then, we can calculate the magnitude of this vector: 𝐵𝐴×𝑑=147𝑖111𝑗+54𝑘=147+(111)+54=36846.

Finally, the perpendicular distance is given by 𝐷=𝐵𝐴×𝑑𝑑=36846(9,9,6)=36846(9)+(9)+(6)=36846198.

Rounding to the nearest hundredth gives 3684619813.64.lengthunits

Hence, the perpendicular distance between the point 𝐴(8,1,10) and the straight line 𝑟=(1,2,7)+𝑡(9,9,6), to the nearest hundredth, is 13.64 length units.

Let us see an example where we need to find the perpendicular distance between a point and a line whose equation is given in Cartesian form.

Example 3: Determining the Length of the Perpendicular Drawn from a Given Point to a Straight Line

Determine, to the nearest hundredth, the length of the perpendicular drawn from the point (5,7,10) to the straight line 𝑥+82=𝑦98=𝑧+78.

Answer

We want to find the length of the perpendicular line between a point and a line whose equation is given in Cartesian form. To do this, we will first recall the following formula.

The perpendicular distance, 𝐷, between a point 𝑃(𝑥,𝑦,𝑧) and a line with direction vector 𝑑 can be found using the formula 𝐷=𝐴𝑃×𝑑𝑑, where 𝐴 is any point on the line.

Therefore, we can calculate the perpendicular distance by finding a point on the line and its direction vector. We can read off the direction vector from the denominators of the equation of the line as 𝑑=(2,8,8). We can solve each part of the equation equal to zero to find a point on the line, and this gives us the point 𝐴(8,9,7).

Since we are given 𝑃(5,7,10), we can find 𝐴𝑃: 𝐴𝑃=(5,7,10)(8,9,7)=(3,16,3).

Then, the cross product between the vector and 𝑑 is 𝐴𝑃×𝑑=(3,16,3)×(2,8,8)=||||𝑖𝑗𝑘3163288||||=||16388||𝑖||3328||𝑗+||31628||𝑘=(128+24)𝑖(24+6)𝑗+(24+32)𝑘=152𝑖+18𝑗+56𝑘.

We can use this to compute the perpendicular distance between the point and the line: 𝐷=𝐴𝑃×𝑑𝑑=152𝑖+18𝑗+56𝑘(2,8,8)=152+18+562+8+(8)=26564132.

Finally, rounding to the nearest hundredth, we have 2656413214.19.

Hence, we were able to find the shortest distance between the point (5,7,10) and the straight line 𝑥+82=𝑦98=𝑧+78, and to the nearest hundredth the distance is 14.19.

In our next example, we will see how to apply this formula given two distinct points on the line instead of its equation.

Example 4: Finding the Perpendicular Distance from a Given Point to the Line on Two Given Points

Find, to one decimal place, the perpendicular distance from point (3,4,0) to the line on points (1,3,1) and (4,3,2).

Answer

Recall that the perpendicular distance, 𝐷, between a point 𝑃(𝑥,𝑦,𝑧) and a line with direction vector 𝑑 can be found by using the formula 𝐷=𝐴𝑃×𝑑𝑑, where 𝐴 is any point on the line.

We need to find its direction vector. If we name 𝐴(1,3,1) and 𝐵(4,3,2), then we can find the direction vector of this line from the coordinates of these points: 𝑑=𝐴𝐵=(4,3,2)(1,3,1)=(3,0,1).

We choose 𝐴(1,3,1), giving us 𝐷=𝐴𝑃×𝑑𝑑=𝐴𝑃×𝐴𝐵𝐴𝐵, where 𝐴𝑃=(3,4,0)(1,3,1)=(4,7,1).

Evaluating the cross product yields 𝐴𝑃×𝐴𝐵=(4,7,1)×(3,0,1)=||||𝑖𝑗𝑘471301||||=||7101||𝑖||4131||𝑗+||4730||𝑘=(7+0)𝑖(4+3)𝑗+(0+21)𝑘=7𝑖+𝑗+21𝑘.

Hence, 𝐷=𝐴𝑃×𝐴𝐵𝐴𝐵=(7,1,21)(3,0,1)=49110.

Therefore, 𝐷=491107.0.lengthunits

In our previous example, we found the perpendicular distance between a point and a line defined by two points. The method used in this example gives us the following formula for the perpendicular distance.

Distance between a Point and a Line Defined by Two Points

The perpendicular distance, 𝐷, between 𝑃(𝑥,𝑦,𝑧) and the line passing through distinct points 𝑄(𝑥,𝑦,𝑧) and 𝑅(𝑥,𝑦,𝑧) is given by 𝐷=𝑄𝑃×𝑄𝑅𝑄𝑅.

This formula is equivalent to the one we previously obtained for the distance between a point and a line using the equation of a line. We can see this by noticing that the vector 𝑄𝑅 is in fact the direction vector of this line. So, replacing 𝑄𝑅 by the direction vector 𝑑 recovers our previous formula.

In our final example, we will see how we can extend this process to find the distance between two parallel lines.

Example 5: Finding the Distance between Two Parallel Lines

Find, to the nearest hundredth, the distance between the parallel lines 𝐿𝑥+79=𝑦+15=𝑧76 and 𝐿𝑥+39=𝑦+105=𝑧+106.

Answer

To find the distance between 𝐿 and 𝐿, we first need to determine exactly what this means. Let us consider the distance between an arbitrary point on each line, say 𝑃 and 𝑃, as shown in the following figure.

We can see that this is not the shortest distance between these two lines by constructing the following right triangle.

The line segment 𝑃𝑃 is the hypotenuse of the right triangle, so it is longer than the perpendicular distance between the two lines, 𝐷. Since the choice of 𝑃 and 𝑃 was arbitrary, we can see that 𝐷 will be shorter than the distance between any pair of points lying on either line.

We notice that because the lines are parallel, so the perpendicular distance will stay the same. Hence, we can calculate this perpendicular distance anywhere on the lines. If we choose an arbitrary point 𝑃 on 𝐿, the perpendicular distance between a point and a line would be the same as the shortest distance between 𝐿 and 𝐿.

We recall the following formula for the perpendicular distance between a point and a line. The perpendicular distance, 𝐷, between a point 𝑃(𝑥,𝑦,𝑧) and a line with direction vector 𝑑 can be found by using the formula 𝐷=𝐴𝑃×𝑑𝑑, where 𝐴 is any point on the line.

We can set each part of the equation of 𝐿 equal to 0 to find that 𝑃(7,1,7) lies on the line 𝐿. We can also set each part of the equation of 𝐿 equal to zero to find that 𝐴(3,10,10) lies on 𝐿. The direction vector of both lines is given by the denominators of their Cartesian equations: 𝑑=(9,5,6).

To find the perpendicular distance, we need to find 𝐴𝑃: 𝐴𝑃=(7,1,7)(3,10,10)=(4,9,17).

Next, we find the cross product between 𝐴𝑃 and our direction vector: 𝐴𝑃×𝑑=(4,9,17)×(9,5,6)=||||𝑖𝑗𝑘4917956||||=||91756||𝑖||41796||𝑗+||4995||𝑘=(5485)𝑖(24153)𝑗+(2081)𝑘=139𝑖+129𝑗101𝑘.

Finally, the perpendicular distance between the two parallel lines is given by 𝐷=𝐴𝑃×𝑑𝑑=139𝑖+129𝑗101𝑘(9,5,6)=(139)+129+(101)9+5+(6)=46163142.

Rounding to the nearest hundredth gives us 4616314218.03.lengthunits

Hence, the distance between 𝐿 and 𝐿 to the nearest hundredth is 18.03 length units.

Let us finish by recapping a few important points from this explainer.

Key Points

  • The perpendicular distance between a point and a line is the shortest distance between these two objects.
  • In three dimensions, the perpendicular distance, 𝐷, between a point 𝑃(𝑥,𝑦,𝑧) and a line with direction vector 𝑑 is given by 𝐷=𝐴𝑃×𝑑𝑑, where 𝐴 is any point on the line.
  • In three dimensions, the perpendicular distance, 𝐷, between a point 𝑃(𝑥,𝑦,𝑧) and the line passing through the distinct points 𝑄(𝑥,𝑦,𝑧) and 𝑅(𝑥,𝑦,𝑧) is given by 𝐷=𝑄𝑃×𝑄𝑅𝑄𝑅.
  • We can find the perpendicular distance between two distinct parallel lines by finding the perpendicular distance between one line and any point on the other line.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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