3.6.113D Geometry

Distance from a point to a plane

1,702 words8 min readdifficulty · medium2 backlinks

WHAT are we measuring?

The plane is written as π: ax+by+cz+d=0,\pi:\ ax+by+cz+d=0, and its normal vector is n=(a,b,c)\vec n=(a,b,c), because that's the direction the plane "faces."


HOW: derive the formula from scratch

Let P=(x1,y1,z1)P=(x_1,y_1,z_1) be our point, and let Q=(x0,y0,z0)Q=(x_0,y_0,z_0) be any point lying on the plane (so ax0+by0+cz0+d=0ax_0+by_0+cz_0+d=0).

Why pick a point on the plane? Because the distance is the projection of the vector QP\vec{QP} onto the normal — and to compute a projection I need a tail on the plane and a head at PP.

Step 1 — form the vector from plane to point. QP=(x1x0, y1y0, z1z0)\vec{QP}=(x_1-x_0,\ y_1-y_0,\ z_1-z_0) Why this step? This vector runs from the plane up to PP; its shadow along n\vec n is exactly the perpendicular distance.

Step 2 — project onto the unit normal. The signed distance is the component of QP\vec{QP} along n^=nn\hat n=\dfrac{\vec n}{|\vec n|}: D=QPn^=nQPn.D=\vec{QP}\cdot\hat n=\frac{\vec n\cdot\vec{QP}}{|\vec n|}. Why this step? The projection of a vector onto a unit direction is a dot product — that gives the length of the part pointing along the normal, which is the only part that matters.

Step 3 — expand the dot product. nQP=a(x1x0)+b(y1y0)+c(z1z0)\vec n\cdot\vec{QP}=a(x_1-x_0)+b(y_1-y_0)+c(z_1-z_0) =ax1+by1+cz1(ax0+by0+cz0).=ax_1+by_1+cz_1-(ax_0+by_0+cz_0).

Step 4 — use that QQ is on the plane. Since ax0+by0+cz0=dax_0+by_0+cz_0=-d, substitute: nQP=ax1+by1+cz1+d.\vec n\cdot\vec{QP}=ax_1+by_1+cz_1+d. Why this step? The unknown point QQ magically disappears — the answer depends only on PP and the plane's coefficients.

Step 5 — divide by n|\vec n| and take magnitude (distance is non-negative):

The numerator = "plug the point into the plane equation." The denominator = "length of the normal," which converts that raw number into a true distance.

Figure — Distance from a point to a plane

The sign tells you which side


Worked examples


Common mistakes (steel-manned)


Active recall

Recall Quick self-test (hide and answer)
  1. State the distance formula and name each part.
  2. Why does the unknown point QQ vanish in the derivation?
  3. What does the sign of the unsigned-stripped expression tell you?
  4. How do you get the distance between two parallel planes fast?

Answers: 1) ax1+by1+cz1+da2+b2+c2\frac{|ax_1+by_1+cz_1+d|}{\sqrt{a^2+b^2+c^2}}; numerator = point in plane eqn, denominator = n|\vec n|. 2) Because ax0+by0+cz0=dax_0+by_0+cz_0=-d on the plane, eliminating QQ. 3) Which side of the plane PP lies on. 4) d1d2n\frac{|d_1-d_2|}{|\vec n|} after matching normals.

Recall Feynman: explain to a 12-year-old

Imagine a flat wall (the plane) and you standing somewhere in the room (the point). The shortest way to touch the wall is to walk straight at it — not sideways, straight forward, perpendicular. The "normal" is just the arrow showing "straight at the wall." To find how far you are, you take your position, feed it into the wall's secret recipe (ax+by+cz+dax+by+cz+d), and then shrink that number by the size of the arrow (a2+b2+c2\sqrt{a^2+b^2+c^2}). The result is exactly how many steps it takes to reach the wall.


Connections

Distance from point (x1,y1,z1)(x_1,y_1,z_1) to plane ax+by+cz+d=0ax+by+cz+d=0?
ax1+by1+cz1+da2+b2+c2\dfrac{|ax_1+by_1+cz_1+d|}{\sqrt{a^2+b^2+c^2}}
Why divide by a2+b2+c2\sqrt{a^2+b^2+c^2}?
It is n|\vec n|; it converts the scaled signed quantity into a true length (projection onto the unit normal).
In the derivation, why does the on-plane point QQ disappear?
Because ax0+by0+cz0=dax_0+by_0+cz_0=-d, substituting removes QQ, leaving only PP and dd.
What does a positive signed value ax1+by1+cz1+dn\frac{ax_1+by_1+cz_1+d}{|\vec n|} mean?
PP lies on the side the normal n\vec n points toward.
Distance between parallel planes ax+by+cz+d1=0ax+by+cz+d_1=0 and ax+by+cz+d2=0ax+by+cz+d_2=0?
d1d2a2+b2+c2\dfrac{|d_1-d_2|}{\sqrt{a^2+b^2+c^2}} (normals must be made identical first).
Distance from origin to ax+by+cz+d=0ax+by+cz+d=0?
da2+b2+c2\dfrac{|d|}{\sqrt{a^2+b^2+c^2}}.
Two points give the same sign in the plane equation — what does that mean?
They lie on the same side of the plane.

Concept Map

core intuition

has

normalise

form vector

project onto

dot product gives

satisfies ax0+by0+cz0=-d

leaves

take magnitude

sign shows

apply

defined by

Perpendicular is shortest path

Distance to plane

Plane ax+by+cz+d=0

Normal vector n=a,b,c

Unit normal n-hat

Point Q on plane

Vector QP to P

Signed distance

Q eliminated

D = abs of ax1+by1+cz1+d over sqrt sum of squares

Which side of plane

Worked example plug-in

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, idea bilkul simple hai. Ek plane space ko do hisson mein baant deta hai, aur tumhe ek point se us plane tak ka sabse chhota distance chahiye. Sabse chhota raasta hamesha plane ke perpendicular (yaani normal direction) ke along hota hai — tedha chaloge to lamba ho jayega. Isliye poora sawaal yeh ban jata hai: "normal ke along kitna slide karun taaki plane pe pahunch jaun?"

Formula nikalne ka tareeka: plane pe koi bhi point QQ lo (jiske coordinates ax0+by0+cz0=dax_0+by_0+cz_0=-d satisfy karte hain). Phir vector QP\vec{QP} ka projection normal n=(a,b,c)\vec n=(a,b,c) par lo — yeh dot product se aata hai. Jab expand karoge to QQ apne aap gayab ho jata hai, aur bachta hai ax1+by1+cz1+dax_1+by_1+cz_1+d. Isko n=a2+b2+c2|\vec n|=\sqrt{a^2+b^2+c^2} se divide karo, mod laga do, bas: D=ax1+by1+cz1+da2+b2+c2D=\dfrac{|ax_1+by_1+cz_1+d|}{\sqrt{a^2+b^2+c^2}}.

Yaad rakhne ka mantra: "Plug, then Length" — upar point ko plane equation mein daal do, neeche normal ki length se divide kar do. Do galtiyaan sabse common hain: n|\vec n| se divide karna bhool jana, aur +d+d chhod dena. Dono yaad rakho.

Bonus: agar mod hata do to sign batata hai point kis side hai. Do points ka same sign matlab same side — yeh geometry aur optimization mein bahut kaam aata hai. Aur do parallel planes ke beech distance? Bas d1d2n\dfrac{|d_1-d_2|}{|\vec n|}, pehle dono ke normals same bana lena.

Go deeper — visual, from zero

Test yourself — 3D Geometry

Connections