In this page, we discuss how to calculate the distance between planes, lines, points, and everything in between. We will show why the distance formula is such, but once the formula is concluded, you are not expected to repeat the work but rather use the formula.

It should be clear at this point, that given two points A and B, the distance between them is the magnitude of the vector connecting them, that is: \|\vec{AB}\|.

Distance Between a Point and a Line

Theorem 9.1 (Distance Between a Point and a Line): Let M be a point in \mathbb{R}^3 and \ell a line with initial point A and direction vector \vec{u}. The shortest distance d from the point M to the line \ell is given by the ratio of the magnitude of their vector cross product to the magnitude of the direction vector.

    \[d(M, \ell) = \frac{\|\overrightarrow{AM} \times \vec{u}\|}{\|\vec{u}\|}\]

In the formula above, A is any point belong to the line.

Example: Calculate the shortest distance d from the point M(2, 1, 3) to the line \ell given by the parametric equations:

    \[\ell: \begin{cases} x = 1 + 2t \\ y = -1 - t \\ z = 2 + 2t \end{cases}\]

Distance Between Parallel Lines

If two lines are parallel, pick a point on any one line, and use the formula above to calculate the distance from that point to the other line.

Example: Calculate the distance d between the two parallel lines \ell_1 and \ell_2 given by:

    \[\ell_1: \begin{cases} x = 1 + t \\ y = 2t \\ z = -1 - t \end{cases} \quad \text{and} \quad \ell_2: \begin{cases} x = 2 + s \\ y = 2 + 2s \\ z = 1 - s \end{cases}\]

Distance Between a Point and a Plane

Theorem 9.2: Let P = (x_1, y_1, z_1) be a point in \mathbb{R}^3 and \pi: ax + by + cz + d = 0 a plane. The distance between them is given by:

    \[d(M,\pi) = \frac{|a \cdot x_1 + b \cdot y_1 + c \cdot z_1 + d|}{\sqrt{a^2 + b^2 + c^2}}\]

Example: Calculate the shortest distance D from the point P(1, 3, -2) to the plane \pi defined by the Cartesian equation 3x - 2y + 6z - 5 = 0.

Distance Between Two Parallel Planes

As before, if two planes are parallel, pick a point belong to one of the planes and use the formula above to find the distance between that point and the other plane.

Example: Calculate the distance D between the two parallel planes \pi_1 and \pi_2 given by their Cartesian equations:

    \[\pi_1: 2x - y + 2z - 4 = 0 \quad \text{and} \quad \pi_2: 2x - y + 2z + 5 = 0\]

Distance Between Skew Lines

To find the distance between skew lines, we need to find the points on the lines that are closest to one another. In order to do that, we take general points on each line (using each equation of the line), and create a generic vector \vec{AB}. Since \vec{AB} will represent the distance, it needs to be perpendicular to both \ell_1 and \ell_2. Therefore, the scalar product with the direction vectors of both lines must be 0. Since \vec{AB} will depend on the parameters of the lines, and each scalar product yields an equation, this will give two equations with two variables. Finding the parameters, we can replace them to conclude A, B, and \vec{AB} from which we conclude the distance.

Rendered by QuickLaTeX.com

Alternatively, we can argue that this double perpendicularity condition can be used as:

    \[\vec{AB}=k\cdot\|\vec{u}\times\vec{v}\|\]


We will see examples using both methods and then conclude the formula.

Example: Find the distance between the skew lines given in vector form by analyzing the perpendicular properties of their shortest connecting segment:

    \[\ell_1: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix} + t\begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix} \quad \text{and} \quad \ell_2: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 3 \\ -1 \\ 4 \end{pmatrix} + s\begin{pmatrix} -1 \\ 2 \\ -1 \end{pmatrix} \quad \text{with } s, t \in \mathbb{R}\]

Example: Find the distance between the skew lines given in vector form by:

    \[\ell_1: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix} + t\begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix} \quad \text{and} \quad \ell_2: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 3 \\ -1 \\ 4 \end{pmatrix} + s\begin{pmatrix} -1 \\ 2 \\ -1 \end{pmatrix} \quad \text{with } s, t \in \mathbb{R}\]

Theorem (Distance Between Two Skew Lines): Let \ell_1 and \ell_2 be two skew lines in three-dimensional space \mathbb{R}^3. Let A_1 be a fixed point on \ell_1 with direction vector \vec{v}, and let A_2 be a fixed point on \ell_2 with direction vector \vec{u}. The distance d(\ell_1, \ell_2) between the two lines is given:

    \[d(\ell_1, \ell_2) = \frac{|\overrightarrow{A_1A_2} \cdot (\vec{v} \times \vec{u})|}{\|\vec{v} \times \vec{u}\|}\]

The numerator in this formula is called the scalar triple product and represents the volume of a parallelepiped created by those vectors (we will see this later). Divided by the area of the basis, that gives the “height” which in this case is the distance between the lines. Just a way to think about where the formula comes from and why you can use any points that you want.

Finally, note that we cannot use this formula for parallel lines because the vector product would not be defined if the two vectors were parallel.

Exercises

For each problem below, find the shortest distance d from the given point M to the line \ell in \mathbb{R}^3.

  • 1. Point M(3, -1, 4) and line \ell: \begin{cases} x = 1 + 2t \\ y = 2 - t \\ z = t \end{cases}
  • 2. Point M(1, 1, 1) and line \ell: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 3 \\ -2 \end{pmatrix} + t\begin{pmatrix} 1 \\ 0 \\ 2 \end{pmatrix}
  • 3. Point M(0, 2, -3) and line \ell: \frac{x - 1}{3} = \frac{y + 2}{4} = \frac{z - 2}{-1}

Analyze each pair of lines below to determine their geometric relationship, then calculate the shortest distance d between them in \mathbb{R}^3.

  • 1. \ell_1: \begin{cases} x = 1 + t \\ y = 2t \\ z = -1 - t \end{cases} \quad \text{and} \quad \ell_2: \begin{cases} x = 2 + s \\ y = 2 + 2s \\ z = 1 - s \end{cases}
  • 2. \ell_1: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix} + t\begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix} \quad \text{and} \quad \ell_2: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 3 \\ -1 \\ 4 \end{pmatrix} + s\begin{pmatrix} -1 \\ 2 \\ -1 \end{pmatrix}
  • 3. \ell_1: \frac{x - 1}{2} = \frac{y + 1}{3} = \frac{z - 3}{1} \quad \text{and} \quad \ell_2: \frac{x - 2}{-4} = \frac{y - 5}{-6} = \frac{z - 1}{-2}

For each problem below, apply the point-to-plane distance formula to calculate the shortest perpendicular distance D from the given point P to the plane \pi.

  • 1. Point P(4, 6, -3) and plane \pi: 2x + 3y - z - 2 = 0
  • 2. Point P(2, -1, 4) and plane \pi: x + 4y - z + 3 = 0
  • 3. Point P(0, 5, 1) and plane \pi: 2x - 3z + 8 = 0

Verify that each pair of planes below is parallel, choose an arbitrary reference point on the first plane, and calculate the shortest distance separating them.

  • 1. \pi_1: x + y - z - 2 = 0 \quad \text{and} \quad \pi_2: 2x + 2y - 2z + 10 = 0
  • 2. \pi_1: x + 2y - 2z + 6 = 0 \quad \text{and} \quad \pi_2: 3x + 6y - 6z - 12 = 0
  • 3. \pi_1: 4x + y + z - 2 = 0 \quad \text{and} \quad \pi_2: 4x + y + z + 10 = 0

For each pair of skew lines below, use either the orthogonality dot product system or the scalar triple product formula to determine the shortest geometric distance separating them in \mathbb{R}^3.

  • 1. \ell_1: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ 2 \end{pmatrix} + t\begin{pmatrix} 2 \\ -1 \\ -3 \end{pmatrix} \quad \text{and} \quad \ell_2: \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} -1 \\ -1 \\ -1 \end{pmatrix} + s\begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}
  • 2. \ell_1: \begin{cases} x = 1 + 3t \\ y = 2 - t \\ z = 4 + 2t \end{cases} \quad \text{and} \quad \ell_2: \begin{cases} x = 2 + s \\ y = 1 + 2s \\ z = -1 - s \end{cases}
  • 3. \ell_1: \frac{x - 3}{1} = \frac{y - 1}{-2} = \frac{z - 2}{2} \quad \text{and} \quad \ell_2: \frac{x + 1}{3} = \frac{y - 4}{0} = \frac{z - 1}{-1}
error: Content is protected!