Let us have 3 points, p0, p1, p2 in 3d space.
These 3 points form a plane.
I have already computed and normalized the normal of the plane (n).
Now, given a point exterior to my plane (p) I would like the distance from this point to my plane.
I have found this question click that treats the solution however I am confused about the final dot product.
In this figure:
The distance from p to the plane is given as |dot ( p-p0 , n )| so the dot between n and the vector going from p0 to p (lets name this vector P (capital P)).
From what I can see using the figure and my own logic, is that the distance from p to the place is basically the length of the projection of P onto n. But the length of this projection is not a complete dot product. A complete dot product would be |P||n|cos(P,n). But I have found that the length of the projection of P onto n is just |P|cos(P,n).
So my questions are:
- Is my thinking correct that the distance from
pto the plane is the projection ofPonton? If not why? - which interpretation is correct and why?

Let's recap a bit first.
The equation of a plane is the locus of points $\vec{p}$ that fulfill $$\vec{n} \cdot \vec{p} = d \tag{1a}\label{1a}$$ which is equivalent to $$n_x x + n_y y + n_z z - d = 0 \tag{1b}\label{1b}$$ when $\vec{n} = (n_x, n_y, n_z)$ and $\vec{p} = (x, y, z)$.
$d$ is the signed distance between the plane and the origin, in units of normal vector length. That is, the distance is $\lvert d \rvert \lVert \vec{n} \rVert$.
When we know three non-collinear points on the plane $\vec{p}_1 = (x_1, y_1, z_1)$, $\vec{p}_2 = (x_2, y_2, z_2)$, and $\vec{p}_3 = (x_3, y_3, z_3)$, we can calculate the normal vector $\vec{n}$ and signed distance $d$ thus: $$\begin{aligned} \vec{n} &= \left( \vec{p}_2 - \vec{p}_1 \right) \times \left( \vec{p}_3 - \vec{p}_1 \right) \\ d &= \vec{n} \cdot \vec{p}_1 = \vec{n} \cdot \vec{p}_2 = \vec{n} \cdot \vec{p}_3 \\ \end{aligned} \tag{2}\label{2}$$ For $d$, you can use any of the three right sides, they are equivalent by definition. If you use floating-point numbers with finite precision, and are worried about possible rounding errors, you can use something like $$d = \frac{1}{3} \left( \vec{n} \cdot \vec{p}_1 + \vec{n} \cdot \vec{p}_2 + \vec{n} \cdot \vec{p}_3 \right)$$ but note that mathematically this is exactly equivalent to $\eqref{2}$.
This same equation also defines a half-space. The plane divides the space into two, and you can differentiate them using the normal vector $\vec{n}$. One half-space is the one the normal vector points to, and the other is the one the normal vector points away from.
Signed distance $\ell$ in units of the normal length (i.e., the same units as $d$) from point $\vec{p}$ to the plane is $$\ell = \vec{n} \cdot \vec{p} - d \tag{3a}\label{3a}$$ and the actual distance $L$ is $$L = \left\lvert \ell \right\rvert \left\lVert \vec{n} \right\rVert$$
Yes, when $P$ is a vector between $p$ and any point on the plane.
It is so only when $\lVert n \rVert = 1$, i.e. $n$ is an unit vector.
If you consider the definition, $\eqref{1a}$ or $\eqref{1b}$, you see that we can arbitrarily choose the length of the normal vector, without affecting the plane at all. (The value of $d$ will just change correspondingly.)
It simplifies quite a few equations if we arbitrarily choose the normal vector length to be $1$ –– in other words, just normalize the normal vector to unit length, $$\hat{n} = \frac{\vec{n}}{\lVert\vec{n}\rVert} = \frac{\vec{n}}{\sqrt{\vec{n} \cdot \vec{n}}}$$ Then, not only is $d$ the actual (signed) distance between origin and the plane –– positive if the plane is in the same direction from origin as the normal vector, negative if in the opposite direction (in other words, positive if the plane normal vector points away from origin, negative if the plane normal vector points towards origin) ––, but dot and cross products between different planes' normal vectors yield the cosine and sine of the angle between those normal vectors: $$\begin{aligned} \cos\theta &= \frac{\vec{n}_1 \cdot \vec{n}_2}{\left\lVert \vec{n}_1 \right\rVert \left\lVert \vec{n}_2 \right\rVert} = \hat{n}_1 \cdot \hat{n}_2 \\ \sin\theta &= \frac{\left\lVert \vec{n}_1 \times \vec{n}_2 \right\rVert}{\left\lVert \vec{n}_1 \right\rVert \left\lVert \vec{n}_2 \right\rVert} = \left\lVert \hat{n}_1 \times \hat{n}_2 \right\rVert = \sqrt{1 - \left( \hat{n}_1 \cdot \hat{n}_2\right)^2} \\ \end{aligned}$$ Thus, it makes sense to choose $\lVert\vec{n}\rVert=1$, since it simplifies the formulae so much. It is a common choice, and often only indicated in a single word, for example as "Let $\hat{n}$ be the unit normal vector of the plane, ...".
And yes, it can be initially confusing, especially if the useful effects of this arbitrary choice on the formulae is not mentioned.