Lesson 05
Distances
This lesson answers one simple question in four different settings: how far apart are two objects in three-space? Every formula here reuses ideas from earlier lessons — normal vectors, direction vectors and projections — so the real work is knowing which formula to reach for.
By the end of this lesson
- Find the distance from a point to a plane.
- Find the distance from a point to a line in R³.
- Find the distance between two parallel planes.
- Find the distance between two parallel lines.
Section 1
Distance from a point to a plane
Given a plane \(\pi\) with equation \(Ax + By + Cz + D = 0\) and a point \(S\) not on the plane, the shortest path from \(S\) to the plane runs along the normal direction — any other path is longer. That turns the problem into a projection: project the vector from a point on the plane to \(S\) onto the unit normal vector.
The result is a single formula that takes the plane’s coefficients and the point’s coordinates directly, with no need to find a point on the plane first.
The absolute value in the numerator matters: a distance is never negative, regardless of which side of the plane \(S\) sits on. If your answer comes out negative, you dropped the bars.
Section 2
Distance from a point to a line
For a line \(L\) through a point \(Q\) with direction vector \(\vv{m}\), and an external point \(S\), the shortest distance from \(S\) to \(L\) is the height of the triangle formed by \(S\), \(Q\) and the foot of the perpendicular from \(S\) onto \(L\).
That height is found with the cross product: form the vector \(\overrightarrow{QS}\) from \(Q\) to \(S\), cross it with the direction vector \(\vv{m}\), and divide the magnitude of that cross product by the magnitude of \(\vv{m}\). Geometrically \(\abs{\overrightarrow{QS}\times\vv{m}}\) is the area of the parallelogram built on \(\overrightarrow{QS}\) and \(\vv{m}\), and dividing by the base \(\abs{\vv{m}}\) leaves the height — exactly the distance we want. Which point \(Q\) you pick makes no difference: sliding it along the line shears the parallelogram without changing its area.
Section 3
Distance between two parallel planes
Two planes are parallel when their normal vectors are scalar multiples of one another. Because they never meet, every point on one plane is the same distance from the other — so the distance between the planes is found by picking any single point on one of them and applying the point-to-plane formula (5.1) against the other plane’s equation.
No new formula is needed here. This section is really a shortcut built entirely out of Section 1’s result, and the fact that the answer does not depend on which point you chose is what makes “the distance between two planes” a well-defined quantity at all.
Section 4
Distance between two parallel lines
Two lines are parallel when their direction vectors are scalar multiples of one another. As with parallel planes, every point on one line is equally far from the other, so the distance between them is found by picking any point on one line and applying the point-to-line formula (5.2) against the other line.
Before applying the formula, always confirm that the lines really are parallel and not skew. Skew lines have no single well-defined “distance between the lines” in the same simple sense, and they need a different approach.
All four situations in this lesson come down to the two formulas in Sections 1 and 2. Identify the pair of objects, reduce it to a point-and-object problem, then substitute.
The four distance formulas
- Point to a plane
- \(d = \dfrac{\abs{Ax_0 + By_0 + Cz_0 + D}}{\sqrt{A^2+B^2+C^2}}\)
- Point to a line
- \(d = \dfrac{\abs{\overrightarrow{QS} \times \vv{m}}}{\abs{\vv{m}}}\)
- Two parallel planes
- Pick a point on one plane, then use the point-to-plane formula.
- Two parallel lines
- Pick a point on one line, then use the point-to-line formula.
Practice
Worked examples
Find the distance from \(S(4,1,1)\) to the line \(\vv{r} = (1,1,1) + t(1,2,2)\).
- Read a point off the equation, \(Q(1,1,1)\), so \(\overrightarrow{QS} = S - Q = (3,0,0)\).
- \(\overrightarrow{QS} \times \vv{m} = \bigl((0)(2)-(0)(2),\ (0)(1)-(3)(2),\ (3)(2)-(0)(1)\bigr) = (0,\,-6,\,6)\)
- \(\abs{\overrightarrow{QS}\times\vv{m}} = \sqrt{0+36+36} = \sqrt{72} = 6\sqrt2, \qquad \abs{\vv{m}} = \sqrt{1+4+4} = 3\)
- \(d = \dfrac{6\sqrt2}{3} = 2\sqrt2\)
Find the distance between the parallel planes \(2x - y + 2z = 4\) and \(4x - 2y + 4z = 10\).
- Check parallel and distinct. \(\vv{n}_2 = (4,-2,4) = 2(2,-1,2) = 2\vv{n}_1\), so the planes are parallel. Dividing the second equation by \(2\) gives \(2x - y + 2z = 5\), and \(5 \neq 4\), so they are distinct.
- Rescale first, then pick a point. \(P(2,0,0)\) lies on the first plane, since \(2(2) - 0 + 0 = 4\ \checkmark\).
- Apply (5.1) to the rescaled second plane, \(2x - y + 2z - 5 = 0\), whose normal has magnitude \(\abs{\vv{n}} = \sqrt{4+1+4} = 3\): \(d = \dfrac{\abs{4 - 0 + 0 - 5}}{3} = \dfrac{1}{3}\).
- Independence check. \((0,-4,0)\) is also on the first plane, and gives \(\dfrac{\abs{0+4+0-5}}{3} = \dfrac13\ \checkmark\)
Watch out
Common mistakes
- Reading \(D\) off the wrong side of the equation, or dropping the absolute value. Formula (5.1) is written for \(Ax + By + Cz + D = 0\), so the plane \(2x + y - 2z = 7\) has \(D = -7\), not \(+7\). And a negative distance always means the bars went missing; write them in from the first line.
- Subtracting the constants of two parallel planes before making the coefficients identical. Rescale one equation first, as in Example 2, or fall back on the method that cannot go wrong: take a point on one plane and use the point-to-plane formula.
- Rounding, and calling the decimal the answer. \(\tfrac{\sqrt6}{2}\) is the answer; \(1.2247448\ldots\) is only an approximation to it. Give the exact form first, then the decimal as a check.