How to find the distance between two planes?

For a plane defined by $ax + by + cz = d$ the normal (ie the direction which is perpendicular to the plane) is said to be $(a, b, c)$ (see Wikipedia for details). Note that this is a direction, so we can normalise it $\frac{(1,1,2)}{\sqrt{1 + 1 + 4}} = \frac{(3,3,6)}{\sqrt{9 + 9 + 36}}$, which means these two planes are parallel and we can write the normal as $\frac{1}{\sqrt{6}}(1,1,2)$.

Now let us find two points on the planes. Let $y=0$ and $z = 0$, and find the corresponding $x$ values. For $C_1$ $x = 4$ and for $C_2$ $x = 6$. So we know $C_1$ contains the point $(4,0,0)$ and $C_2$ contains the point $(6,0,0)$.

The distance between these two points is $2$ and the direction is $(1,0,0)$. Now we now that this is not the shortest distance between these two points as $(1,0,0) \neq \frac{1}{\sqrt{6}}(1,1,2)$ so the direction is not perpendicular to these planes. However, this is ok because we can use the dot product between $(1,0,0)$ and $\frac{1}{\sqrt{6}}(1,1,2)$ to work out the proportion of the distance that is perpendicular to the planes.

$(1,0,0) \cdot \frac{1}{\sqrt{6}}(1,1,2) = \frac{1}{\sqrt{6}}$

So the distance between the two planes is $\frac{2}{\sqrt{6}}$.

The last part is to find the plane which is the same distance away from $C_2$ as $C_1$ but in the opposite direction. We know the normal must be the same, $\frac{1}{\sqrt{6}}(1,1,2)$. Using this we can write $C_3: x + y+ 2z = a$ and determine $a$. When $y=0, z=0$ we moved from $(4,0,0) \rightarrow (6,0,0)$, so if we move the same distance again we go $(6,0,0) \rightarrow (8,0,0)$ and $(8,0,0)$ is on $C_3$. Therefore, $a = 8$. So finally the equation of the plane is,

$C_3: x + y + 2z = 8$

And we are done :)


Parallel planes are level sets of a linear function. In this case, $x+y+2z=c$.

The signed distance of $x+y+2z=c$ to the origin is the normalized algebraic value $$ \frac{c}{\sqrt{1^2+1^2+2^2}}=\frac{c}{\sqrt{6}} $$

Therefore, the unsigned distance between two planes $x+y+2z=c_1$ and $x+y+2z=c_2$ is $$ \frac{|c_1-c_2|}{\sqrt{6}} $$

In your example, $c_1=4$ and $c_2=6$ and so the distance is $$ \frac{2}{\sqrt{6}} $$

The other plane at the same distance to $C_2$ has $c=6+2=8$ and so is given by $x+y+2z=8$.


There is another way of finding the distance. Write $C_1$ and $C_2$ as functions $z=f_i(x,y)$:

$$C_1\,:\,z=f_1(x,y)=2-\frac12 x-\frac12 y\qquad\text{ and}$$

$$C_2\,:\,z=f_1(x,y)=3-\frac12 x-\frac12 y.$$

To find the intersections we assume that $(x,y,z)\in C_1\cap C_2$ and solve the simultaneous equations.

$$\begin{align} 2-\frac12 x-\frac12 y&=3-\frac12 x-\frac12 y \\ \Rightarrow 2&=3, \end{align}$$

a contradiction and so $C_1\cap C_2$ is empty and so $C_1\parallel C_2$.

Find a point on one plane, say $(0,0,2)$ on $C_2$.

Write a function $d(x,y)=\operatorname{dist}((x,y,f_1(x,y)),(0,0,2))$ using Pythagoras a couple of times:

$$d(x,y)=\sqrt{x^2+y^2+(1-x/2-y/2)^2}.$$

Minimise $d(x,y)$ --- or even easier $(d(x,y))^2$ --- using partial differentiation:

$$\begin{align} \frac{\partial d^2}{\partial x}&=2x+2(1-x/2-y/2)(-1/2) \\&=\frac52 x -1+\frac{y}{2},\text{ and} \\ \frac{\partial d^2}{\partial y}&= \frac52 y -1+\frac{x}{2}. \end{align} $$

Solve both partial derivatives equal to zero to find that the minimum of $d^2$ occurs at $(x,y)=(1/3,1/3)$. Plug these into $d(x,y)$ to find

$$d_\min=\sqrt{\frac23}.$$

For $C_3$ to be parallel to $C_1$ and $C_2$ it must be of the form:

$$f_3(x,y)=\lambda-\frac12 x-\frac12 y,$$

for $\lambda\neq 2,3$.

Note that

$$f_1(x,y)=-x/2-y/2+2,$$ and $$f_2(x,y)=-x/2-y/2+3=f_1(x,y)+1,$$

and so $C_2$ is just $C_1$ shifted upwards by one. Therefore shift upwards again by one and you will find $C_3$:

$$f_3(x,y)=-x/2-y/2+4\Leftrightarrow x+y+2z=8.$$

You wouldn't even have to solve the first part to do this.