Lines and Planes in Space: Learn It 2

Distance between a Point and a Line

You already know how to calculate the distance between two points in space. Now we expand this to find the distance between a point and an entire line. This calculation has many practical applications. Builders must consider “setback” requirements to ensure structures maintain proper distance from property lines. Airlines need to calculate distances between populated areas and proposed flight paths.

The distance from a point to a line is defined as the length of the shortest possible segment connecting the point to the line. This shortest segment is always perpendicular to the line.

Let [latex]L[/latex] be a line and [latex]M[/latex] be any point not on the line. The distance [latex]d[/latex] from [latex]M[/latex] to [latex]L[/latex] is the length of line segment [latex]\overline{MP}[/latex], where [latex]P[/latex] is the point on [latex]L[/latex] such that [latex]\overline{MP}[/latex] is perpendicular to [latex]L[/latex].

This figure has two line segments. The first line is labeled “L” and has point P on the segment. The second line segment is drawn from point P to point M and is perpendicular to line L. The second line segment is labeled “d.”
Figure 2. The distance from point [latex]M[/latex] to line [latex]L[/latex] is the length of [latex]\overline{MP}[/latex].

In three dimensions, there’s no obvious way to identify which point on the line creates the perpendicular segment. We solve this by selecting an arbitrary point on the line and using vector properties.

Let [latex]P[/latex] be any point on line [latex]L[/latex] and let [latex]\textbf{v}[/latex] be a direction vector for [latex]L[/latex]. For any point [latex]M[/latex] not on the line, consider the vectors [latex]\overrightarrow{PM}[/latex] and [latex]\textbf{v}[/latex].

This figure has a line segment labeled “L.” On the line segment L there is point P. There is a vector drawn from point P to another point M. Also, from M there is a line segment drawn to line L. This segment is perpendicular to line L. There is also a vector labeled “v” on line segment L. A parallelogram has been formed with vector v, line segment P M, and two other segments back to line L.
Figure 3. Vectors [latex]\overrightarrow{PM}[/latex] and [latex]\textbf v[/latex] form two sides of a parallelogram with base [latex]||{\bf{v}}||[/latex] and height [latex]d[/latex], which is the distance between a line and a point in space.

These vectors form two sides of a parallelogram. From the properties of cross products and geometry:

  • The area of this parallelogram equals [latex]||\overrightarrow{PM} \times \textbf{v}||[/latex]
  • The area also equals base × height = [latex]||\textbf{v}|| \cdot d[/latex]

Setting these equal gives us:

[latex]||\overrightarrow{PM} \times \textbf{v}|| = ||\textbf{v}|| \cdot d[/latex]

We can use this formula to find a general formula for the distance between a line in space and any point not on the line.

distance from a point to a line

Let [latex]L[/latex] be a line in space passing through point [latex]P[/latex] with direction vector [latex]\textbf v[/latex]. If [latex]M[/latex] is any point not on [latex]L[/latex], then the distance from [latex]M[/latex] to [latex]L[/latex] is

[latex]d=\frac{||\overrightarrow{PM}\times{\bf{v}}||}{||{\bf{v}}||}[/latex].

Why This Works: The cross product [latex]\overrightarrow{PM} \times \textbf{v}[/latex] gives us the area of a parallelogram. Dividing by the base [latex]||\textbf{v}||[/latex] isolates the height, which is exactly the perpendicular distance we want.

Find the distance between t point [latex]M=(1, 1, 3)[/latex] and line [latex]\frac{x-3}4=\frac{y+1}2=z-3[/latex].