Engineers routing pipes, ducts and cables through a building need to know the clearance between two of them: how close they come where one passes over another. Two straight pipes that are not parallel and do not touch are skew lines, and their clearance is the shortest distance between them. In every case in this lesson the shortest distance is measured along a perpendicular: drop straight down from a point to a plane, or find the one segment that is perpendicular to both skew lines. Vectors find that perpendicular for you: the normal of a plane, or a cross product.
From a point to a plane
Let be the point and any point of the plane . The distance from to the plane is the length of the part of that points along the normal, which is the absolute value of the scalar projection: . Expanding the numerator gives and since is in the plane, . The choice of drops out completely.
Two parallel planes are a constant distance apart, so pick any point on one and use the formula with the other. If the equations are written with the SAME coefficients , , , this simplifies to . A line parallel to a plane works the same way: use any point of the line.
From a point to a line in 3-space
A line in 3-space has no single normal vector (every direction perpendicular to is normal to it), so the formula above does not apply. Use area instead. Let be a point on the line, its direction and the point. The parallelogram with sides and has area . Its base is , and its height is exactly the perpendicular distance from to the line, so divide.
Between two skew lines
Let the lines pass through and with directions and . The vector is perpendicular to both lines, so each line lies in a plane with normal , and those two planes are parallel. The distance between the lines is the distance between those planes: project onto . A result of means the lines actually intersect. If , the lines are parallel, and the distance is the distance from any point of one line to the other line.
| Distance between | Formula | Key idea |
|---|---|---|
| Point and plane | Project onto the normal | |
| Two parallel planes | (same , , ) | Point on one, plane formula for the other |
| Point and line (2-space) | Project onto the normal | |
| Point and line (3-space) | Parallelogram height = area ÷ base | |
| Two skew lines | Project onto the common perpendicular |