---
tag: M850584QA0
kind: proof
name: Proof of the formula for the distance from a point to a plane
msc: [51N20]
proves: 0K1E2S6Z69
uses: [07SDJ5DNE4, 0NPPGHQNXQ, 0XKBKGTCPC, 0S52TNNTH9, 0WQJJCCTC8, 0BVTDM872V]
sources:
  - url: https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_plane
    locator: Why this is the closest point
---

## Proof

We find the orthogonal projection of $X$ on the [[plane|07SDJ5DNE4]] and compare every other point of the plane with it.

1. Let $n = (a, b, c)$. It is a [[normal vector|0WQJJCCTC8]] of $P$. Since $n \neq 0$, its [[length|0XKBKGTCPC]] $\norm{n} = \sqrt{a^2 + b^2 + c^2}$ is positive.
2. Let $k = a x_0 + b y_0 + c z_0 - d$, let $t = k / \norm{n}^2$, and let $Q_0 = X - t n$.
3. With the [[dot product|0S52TNNTH9]], the plane is $P = \set{Q \in \R^3 : n \cdot Q = d}$. Also $n \cdot X = k + d$.
4. The point $Q_0$ lies on $P$. Indeed, $n \cdot Q_0 = n \cdot X - t \, (n \cdot n) = (k + d) - k = d$.
5. Let $Q$ be any point of $P$. Then $n \cdot Q = d = n \cdot Q_0$, so $n \cdot (Q_0 - Q) = 0$.
6. We have $X - Q = (X - Q_0) + (Q_0 - Q) = t n + (Q_0 - Q)$. The two summands are orthogonal by step 5.
7. By the [[Pythagorean theorem for orthogonal vectors|0BVTDM872V]], $\norm{X - Q}^2 = t^2 \norm{n}^2 + \norm{Q_0 - Q}^2 \geq t^2 \norm{n}^2$.
8. The [[Euclidean distance|0NPPGHQNXQ]] is $d(X, Q) = \norm{X - Q}$. Taking square roots in step 7 gives $d(X, Q) \geq \abs{t} \, \norm{n}$ for each $Q \in P$.
9. For $Q = Q_0$, we get $d(X, Q_0) = \norm{t n} = \abs{t} \, \norm{n}$. So the bound of step 8 is reached at the point $Q_0$ of $P$.
10. Hence the smallest distance exists and equals $\abs{t} \, \norm{n} = \dfrac{\abs{k}}{\norm{n}} = \dfrac{\abs{a x_0 + b y_0 + c z_0 - d}}{\sqrt{a^2 + b^2 + c^2}}$.

## Idea

Drop a perpendicular from $X$ to the plane along the normal vector $(a, b, c)$. Any other point of the plane is farther away, by the Pythagorean theorem in the right triangle that the perpendicular makes. The length of the perpendicular is the value of the equation at $X$, divided by the length of the normal vector.
