About distances between a point and a plane

analytic geometryvectors

I got the an exercise that says:

$P_0=(x_0,y_0,z_0)$ is a point in the plane $ax_0+by_0+cz_0+d=0$. Let $\vec n$ the normal vector of the plane. Get a function that obtains the distance between the point $P_0$ and a point outside of the plane $P_1$.

What I have to do here is just calculate the distance between the point and the plane?

Is the distance between all points in the plane and that point the same?

Best Answer

We have a point on the plane $P_0(x_0,y_0,z_0)$ and a point outside the plane $P_1(x_1,y_1,z_1)$. The distance from $P_1$ to the plane is calculated by the magnitude of projection of $\vec{P_0P_1}$ onto the normal of the plane $\vec n$.

We therefore have \begin{align} \left|\operatorname{proj}_{\vec n}\vec{P_0P_1}\right|=\frac{|\vec{P_0P_1}\cdot\vec n|}{|\vec n|}&=\frac{|(x_1-x_0,y_1-y_0,z_1-z_0)\cdot(a,b,c)|}{|(a,b,c)|}\\ &=\frac{|a(x_1-x_0)+b(y_1-y_0)+c(z_1-z_0)|}{\sqrt{a^2+b^2+c^2}}\\ &=\frac{|ax_1-ax_0+by_1-by_0+cz_1-cz_0|}{\sqrt{a^2+b^2+c^2}}\\ \end{align}

Since the equation of the plane is $$ax_0+by_0+cz_0+d=0\implies d=-ax_0-by_0-cz_0,$$ we have the formula $$D=\frac{|ax_1+by_1+cz_1+d|}{\sqrt{a^2+b^2+c^2}}$$ where $D$ is the distance between $P_1$ and the plane.