---
tag: 0K1E2S6Z69
kind: statement
role: proposition
name: Distance from a point to a plane
msc: [51N20]
uses: [0NPPGHQNXQ, 07SDJ5DNE4, 0WQJJCCTC8]
sources:
  - url: https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_plane
    locator: Converting general problem to distance-from-origin problem
same_as:
  wikidata: Q3030668
  wikipedia: Distance from a point to a plane
---

## Statement

Let $a$, $b$, $c$ and $d$ be real numbers with $(a, b, c) \neq (0, 0, 0)$, and let $P = \{(x, y, z) \in \mathbb{R}^3 : a x + b y + c z = d\}$ be a [[plane|07SDJ5DNE4]].
Let $X = (x_0, y_0, z_0)$ be a point of $\mathbb{R}^3$. The distance from $X$ to $P$ is the smallest [[Euclidean distance|0NPPGHQNXQ]] $d(X, Q)$ for $Q \in P$. Then
$$\operatorname{dist}(X, P) = \frac{|a x_0 + b y_0 + c z_0 - d|}{\sqrt{a^2 + b^2 + c^2}}.$$

## Remarks

The smallest distance is reached at exactly one point of $P$, the orthogonal projection of $X$ on $P$. With $n = (a, b, c)$ this point is $X - \frac{a x_0 + b y_0 + c z_0 - d}{a^2 + b^2 + c^2} \, n$.
The number $(a x_0 + b y_0 + c z_0 - d) / \|n\|$ is the signed distance. Its sign tells on which side of the plane the point is.
The same formula holds for a hyperplane $\{x : a \cdot x = d\}$ with $a \neq 0$ in $\mathbb{R}^n$: the distance from $x_0$ is $|a \cdot x_0 - d| / \|a\|$.

## Explanations

### L1 human

The nearest point of a plane is straight below or above you, along the normal vector. For the floor plane $z = 0$, the formula gives $|z_0|$, your height above the floor. Tilted planes need the factor $\sqrt{a^2 + b^2 + c^2}$, because $(a, b, c)$ need not be a unit vector.
