Suppose that we have 2 parallel planes:
P1:Ax+By+Cz+D1=0P2:Ax+By+Cz+D2=0
We wish to find the distance between these 2 planes. Note that we want to find the shortest possible distance between the two planes, i.e. the distance if one traveled from P1 to P2 along a segment parallel to the normal vector.
A normal vector to both of these planes is n=⟨A,B,C⟩. Note that ∣n∣=A2+B2+C2.
Suppose you move along the normal vector such that your displacement is kn=⟨kA,kB,kC⟩, for some scalar k. For all points P=(x,y,z)∈R3, define f(P)=Ax+By+Cz. Then:
f(P+kn)=A(x+kA)+B(y+kB)+C(z+kC)f(P+kn)=(Ax+By+Cz)+k(A2+B2+C2)f(P+kn)−f(P)=k∣n∣2
Therefore, a movement of k∣n∣ in the normal direction produces a change of k∣n∣2 in f(P). Suppose that we have 2 points M1∈P1 and M2∈P2 such that M1M2⊥P1,P2. Then:
f(M2)−f(M1)=(−D2)−(−D1)=D1−D2D1−D2=k∣n∣2k∣n∣=A2+B2+C2D1−D2
Note that k∣n∣ is just the displacement in the normal direction! Thus, since geometric distances are always nonnegative, we can say:
M1M2=A2+B2+C2∣D1−D2∣
This means that the distance d between 2 parallel planes of the above form is:
d=A2+B2+C2∣D1−D2∣
This argument can easily be generalized to any number of dimensions. Suppose we have 2 parallel (n−1)-dimensional hyperplanes in n-dimensional hyperspace of the form:
P1:A1x1+A2x2+...+Anxn+B1=0P2:A1x1+A2x2+...+Anxn+B2=0
Then, the distance d between them is:
d=A12+A22+...+An2∣B1−B2∣
The perpendicular distance between a point and a plane is always the shortest distance between this point and the plane. So if a perpendicular line is drawn through the plane to the point, the only relevant information is that there are 2 points of intersection for this line. This distance can be calculated easily as the length of this line segment, having the 2 intersections mentioned above as its endpoints. If you wanted to know the distance from the point to a non-perpendicular point on the plane, the Pythagorean theorem will come in handy.
If you have read the previous explanation, you would have seen that Neelesh gives a very good intuition of the distince between a point and a plane. However, he did not provide a formula, so here is the distance from a point (x0,y0,z0) to the plane Ax+By+Cz+D=0: