How far is a point from a plane? How close do two skew lines come? “Distance” here always means the shortest distance, which is measured along a perpendicular. Every formula on this page comes from one of two ideas you already know: vector projections and the area of a parallelogram from the cross product.
Suppose Q is any point on a plane and P is a point off it. The vector QP usually points off at an angle. The part of it that points straight away from the plane, along the normal n, is exactly the distance you want. That’s the length of the scalar projection of QP onto n:
d=∣n∣QP⋅n
The absolute value is there because a distance can’t be negative.
The distance d is the length of the projection of QP onto the normal n.
because Ax0+By0=−C (Q is on the line). Dividing by ∣n∣ gives the standard formula:
d=A2+B2∣Ax1+By1+C∣
The nice thing: you never actually need to find Q. Substitute the point into the left side of the equation, take the absolute value, and divide by the length of the normal.
Parallel planes are the same distance apart everywhere. Pick any point on one plane and use the point-to-plane formula with the other. If the two equations have the same normal, Ax+By+Cz+D1=0 and Ax+By+Cz+D2=0, this simplifies to
d=A2+B2+C2∣D1−D2∣
The same idea works for two parallel lines in 2-space.
In 3-space a line has no single normal, so use the cross product instead. Let Q be a point on the line with direction m, and let θ be the angle between QP and m. From the right triangle in the figure, d=∣QP∣sinθ. Since ∣QP×m∣=∣QP∣∣m∣sinθ,
d=∣m∣QP×m
Another way to see it: QP×m is the area of the parallelogram formed by the two vectors, and area ÷ base = height.
The distance d is the height of the parallelogram formed by QP and m.
Let the lines be r=r1+tm1 and r=r2+sm2, through points P1 and P2. The shortest segment between skew lines is perpendicular to both lines, so it runs in the direction
n=m1×m2
Project the connecting vector P1P2 onto n:
d=∣m1×m2∣P1P2⋅(m1×m2)
This is really the point-to-plane formula again: the two skew lines lie in parallel planes with normal n, and d is the gap between those planes. If the answer is 0, the lines actually intersect. (For parallel lines, m1×m2=0, so use the point-to-line formula instead.)
Parallel lines are the same distance apart everywhere, just like parallel planes. Pick any point on one line and find its distance to the other line with ∣m∣∣QP×m∣. First check that the lines aren’t the same line: a point of one shouldn’t be on the other.
The formulas give the distance without ever finding the closest point. When a question asks for that point too:
On a plane: follow the normal from P. Substitute r=p+tn into the plane’s equation and solve for t. This is the foot of the perpendicular from intersections of lines and planes.
On a liner=r0+tm: write a general point F of the line in terms of t. The closest point is where FP is perpendicular to the line, so solve FP⋅m=0 for t, then substitute back.
Either way, ∣FP∣ should equal the distance from the formula. That makes a good check.
Sometimes the distance is given and something else is unknown: a point on an axis, or the constant in a plane’s equation. Set the formula equal to the distance. The absolute value then splits into two equations:
∣n∣∣E∣=d⇒E=d∣n∣orE=−d∣n∣
where E is the expression inside the absolute value. Expect two answers, one on each side of the plane, and keep both unless the question rules one out.
(b) The normals [2,−1,2] and [4,−2,4] are parallel, so the planes are parallel. Pick a point on the first plane: with x=z=0, −y−3=0, so Q(0,−3,0). Its distance to the second plane:
Dropping the absolute value. The dot product can be negative, depending on which side of the plane the point is on. Distance is always positive (or zero), so take the absolute value. When you work backwards from a given distance, as in Example 6, the absolute value gives two equations: solve both, or you’ll miss the answer on the other side of the plane.
Forgetting to divide by the length of the normal.∣Ax1+By1+Cz1+D∣ on its own is not the distance unless ∣n∣=1. Divide by A2+B2+C2.
Leaving the equation in the wrong form. The formula needs Ax+By+Cz+D=0. For a plane written as 2x+3y+6z=14, the constant is D=−14, not 14.
Using the shortcut for planes whose normals don’t match.∣n∣∣D1−D2∣ only works when both equations use the same normal. Scale one equation first, or just pick a point on one plane.
Using a dot product for point-to-line distance in 3-space. A line in 3-space has no single normal, so the point-to-plane formula doesn’t apply. Use ∣m∣∣QP×m∣.
Using the skew-line formula on parallel lines. If the lines are parallel, m1×m2=0 and you’d divide by zero. Find the distance from a point on one line to the other line instead.
Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site.
Give each distance exactly (simplify radicals) and as a decimal rounded to two places.
H3. (Core) Let P(4,−1,3) and the line r=[2,1,0]+t[1,−2,2].
(a) Use the cross product to find the distance from P to the line.
(b) Find the point F on the line closest to P. (Hint: FP must be perpendicular to the direction vector.)
(c) Check that ∣FP∣ matches your answer to part (a).
H4. (Core) Consider the lines L1:r=[1,2,0]+t[1,0,2] and L2:r=[3,−1,4]+s[0,1,−1].
(a) Explain why the lines are not parallel.
(b) Find the distance between the lines. What does your answer tell you about whether they intersect?
(c) The closest points are at t=1 on L1 and s=25 on L2. Find these two points and check that the distance between them matches part (b).
H5. (Core) A hypothetical model of a house uses metres, with the z-axis pointing straight up. One sloped section of the roof lies in the plane 3y+4z=48. The tip of a TV antenna is at A(6,8,15).
(a) Find the length of the shortest straight cable from the antenna tip to the plane of the roof.
(b) Find the point on the roof plane where that shortest cable would attach.
(c) The roof is at height z=6 directly below the antenna tip, so the tip is 9 m above the roof vertically. Explain why the shortest cable is shorter than 9 m.
H6. (Core) In a hypothetical building model (metres), two straight pipes run along the centre lines L1:r=[0,0,3]+t[1,0,0] and L2:r=[5,1,0]+s[0,1,1].
(a) Find the shortest distance between the centre lines.
(b) Each pipe has an outer diameter of 0.30 m. What is the smallest gap between the outside surfaces of the two pipes?