Recipe
Find the distance from a point to a line or a plane
Use when: you have a point not on a given line or plane and need the shortest distance from it
Goal: a single nonnegative distance value, from whichever of the two formulas matches what the point is being measured against
Taught in Distances between points, lines, and planes
Quick recipe
-
1
Read the problem to see which kind of object the point's distance is being measured against.
- distance to a plane — continue to Step 2.
- distance to a line — skip to Step 4.
Why: the two targets use different formulas built from different products, a dot product for a plane and a cross product for a line, so branching here keeps them from getting mixed up.
-
2
Read \mathbf n=\langle a,b,c\rangle straight off the plane's equation ax+by+cz=d, then compute D=\dfrac{|ax_1+by_1+cz_1-d|}{|\mathbf n|} for the point P_1=(x_1,y_1,z_1).
Example
Plane 2x-y+2z=3, point P_1=(4,-3,5): |\mathbf n|=\sqrt{4+1+4}=3, and 2(4)-(-3)+2(5)-3=8+3+10-3=18, so D=18/3=6.
Why: this is the scalar projection of a vector from any plane point to P_1 onto the unit normal, with the absolute value stripping away which side of the plane P_1 happens to sit on.
-
3
Compute \overrightarrow{P_0P_1} by subtracting the line's known point from P_1.
Example
Line through P_0=(1,1,1) with direction \mathbf v=\langle-2,-2,-1\rangle, point P_1=(-1,2,3): \overrightarrow{P_0P_1}=\langle-2,1,2\rangle.
Why: the cross-product formula in the next step needs this vector, not P_1's coordinates alone.
-
4
Compute D=\dfrac{|\overrightarrow{P_0P_1}\times\mathbf v|}{|\mathbf v|}.
Example
\overrightarrow{P_0P_1}\times\mathbf v=\langle3,-6,6\rangle, with magnitude 9. |\mathbf v|=\sqrt{4+4+1}=3, so D=9/3=3.
Why: the cross product's magnitude is the area of the parallelogram \overrightarrow{P_0P_1} and \mathbf v span, and dividing that area by the base |\mathbf v| leaves the parallelogram's height, exactly the point's perpendicular distance to the line.
Common mistakes
- Using the plane's formula for a line, or the line's formula for a plane.
- Forgetting the absolute value in the point-to-plane formula and reporting a signed distance.
- Building \overrightarrow{P_0P_1} backward, from P_1 toward P_0, which can flip a sign elsewhere without changing the final magnitude.
- Dividing by |\mathbf n|^2 or |\mathbf v|^2 instead of the plain magnitude in the final step.