# Perpendicular distance from the origin to the plane (proof in vector form).

Please note I just need pointing out where my line of reasoning goes wrong.

Given a plane defined by a fixed point $A$ with coordinates $(x_a, y_a, z_a)$ position vector $\boldsymbol{a}$ and a normal vector $\boldsymbol{n}=\begin{pmatrix}a \\ b \\ c\end{pmatrix}$

We have $\boldsymbol{r}.\boldsymbol{n} = \boldsymbol{a}.\boldsymbol{n}$, where $\boldsymbol{r}$ is position vector of a general point in that plane. And the equation of a plane is thus:

$\boldsymbol{r}.\boldsymbol{n} = d$ in vector form

or

$ax+by+cz=d$ in Cartesian form.

Further, I am happy that the perpendicular distance from some point $(x_0, y_0, z_0)$ is given by

$$\frac{|ax_0 + by_0 + cz_0 - d|}{\sqrt{a^2+b^2+c^2}}$$

I also know from various sources (which state it without proof) that if a unit normal vector $\boldsymbol{\hat{n}}=\frac{\boldsymbol{n}}{|\boldsymbol{n}|} = \begin{pmatrix}\frac{a}{\sqrt{a^2+b^2+c^2}} \\ \frac{b}{\sqrt{a^2+b^2+c^2}} \\ \frac{c}{\sqrt{a^2+b^2+c^2}}\end{pmatrix}$ is used in the vector equation of a plane

$$\boldsymbol{r}.\boldsymbol{\hat{n}} = d$$

then $d$ is the perpendicular distance from the origin to the plane.

I am struggling to derive this result for myself.

(1) Using the formula for perpendicular distance of any general point:

$\frac{|a\times 0 + b\times 0 + c\times 0 - d|}{\sqrt{a^2+b^2+c^2}} = \frac{|- d|}{\sqrt{a^2+b^2+c^2}} = \frac{|-(ax_a + bx_a + cz_a)|}{\sqrt{a^2+b^2+c^2}} = \pm\frac{ax_a + bx_a + cz_a}{\sqrt{a^2+b^2+c^2}}$

(2) Using the vector plane equation:

$\boldsymbol{a}.\boldsymbol{\hat{n}} = \frac{ax_a + bx_a + cz_a}{\sqrt{a^2+b^2+c^2}}$

The only difference is the $\pm$ sign which comes from dropping the modulus. But the modulus is in the formula for a good reason -- to account for cases when the general point $(x_0, y_0, z_0)$ is on either side of the plane.

Is it more correct then to state that in the plane equation $\boldsymbol{r}.\boldsymbol{\hat{n}} = d$, the distance from the origin is $|d|$, rather than $d$?

(...) then $d$ is the perpendicular distance from the origin to the plane.
(...) then $\color{red}{|}d\color{red}{|}$ is the perpendicular distance from the origin to the plane.
Also you can't drop the modules that way: $$|something|=\pm something$$