# How to find the distance between two planes?

The following show you the whole question.

Find the distance d bewteen two planes \begin{eqnarray} \\C1:x+y+2z=4 \space \space~~~ \text{and}~~~ \space \space C2:3x+3y+6z=18.\\ \end{eqnarray} Find the other plane $C3\neq C1$ that has the distance d to the plane $C2$.

According to the example my teacher gave me, the answer should be :

Am I right? However, I do not know what is normal and why there are P(5) and Q($-\frac{1}{2}$).

• Hint: rewrite equation for $C2$ – freak_warrior Nov 6 '13 at 14:36
• There is only a meaningful distance between planes in $\mathbb{R}^3$ if they are parallel, so think about that. – Tim Ratigan Nov 6 '13 at 14:52
• @TimRatigan: There's a meaningful distance $d(A,B):=\inf_{a\in A,b\in B}d(a,b)$ for any two arbitrary subsets $A,B\subseteq\mathbb{R}^3$. – C-Star-W-Star Nov 17 '15 at 15:26
• @Freeze_S I suppose he means that the distance is zero if they are not parallel. – JP McCarthy Nov 17 '15 at 15:36

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 :)

• +1 For using elementary geometric reasoning and a minimum of prerequisites. – dafinguzman Nov 18 '15 at 3:26
• ...and that has earned you a +500... :) – Jesse P Francis Nov 18 '15 at 12:12
• Is the final answer for the first part $\frac{1}{\sqrt{6}}$? I really think that the distance between the 2 planes is $\sqrt{\frac23}$ using the workings by lhf – mauna Jan 28 '16 at 19:03
• @mauna - sorry typo, it was $2(\frac{1}{\sqrt{6}}) = \sqrt{\frac{2}{3}}$. I'll make that edit now – j__ Jan 28 '16 at 21:58
• Why did you find the unit normal vector? Can't see non unit vector not work? – Scáthach Dec 1 '18 at 13:14

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.

Notice the two planes are parallel. . A point has to be found out on any one of the plane where $y=x=0$. So distance between parallel planes is given by $\frac{ax_1+by_1+cz_1+d}{\sqrt(a^2+b^2+c^2)}$. So it'll be $\frac{ax_1+by_1+cz_1+d}{\sqrt6}$

• Since $ax_1+by_1+cz_1=-d_1$, could that also be expressed as $\frac{\left\lvert d - d_1\right\rvert}{\sqrt{a^2+b^2+c^2}}$? – Solomon Ucko Apr 25 '19 at 22:48

The term "normal" means perpendicularity. A normal vector of a plane in three-dimensional space points in the direction perpendicular to that plane. (This vector is unique up to non-zero multiplies.)

For determining the distance between the planes $C_1$ and $C_2$ you have to understand what is the projection of a vector onto the direction of a second one, see https://en.wikipedia.org/wiki/Vector_projection.

The the projection of any vector $\vec{QP}$ pointing from one of the planes to the other onto the direction of the common normal vector $\vec{n}=(1,1,2)$ (or $\vec{n}=(3,3,6)$ because length does not matter but only direction does) is a vector perpendicular to both planes and pointing from one to another. So its length has to be the distance.

Finding $C_3$ is easy as well. $C_3$ is the image of $C_1$ under reflection about $C_2$. So $C_3$ is the set of points $(x,y,z)$ which can be written as $2(x'',y'',z'')-(x',y',z')$ with $(x'',y'',z'')$ in $C_2$ and $(x',y',z')$ in $C_1$. Checking what is $3$(first coordinate)$+3$(second coordinate)$+6$(third coordinate) for the points of $C_3$, we get $3(2x''-x')+3(2y''-y')+6(2z''-z')=2(3x''+3y''+6z'')-3(x'+y'+z')=2\cdot18-3\cdot 4=12$. Hence the equation for the plane $C_3$ is $3x+3y+6z=24$ or $x+y+2z=8$.

Take one point from one plane, e.g. your $P$ from above. You know that the shortest distance between 2 planes (they are parallel, so they have the same normal vector) is the distance of $P$ to the point where it touches the other plane in direction of the outer normal. This means:

construct a linear map

$P+r\cdot n$ where n is the normal vector of the 2 planes.

Then search the point where this map touches the other plane. The point you get from this is the point that has shortest distance to $P$.

As they are parallel, the initial choice of $P$ is not important.

EDIT: You can write a plane as $P + r\cdot v_1 + s v_2$ where $P$ is some(!) point on the plane and $v_1,v_2$ are the direction-vectors of the plane. As you are in $\mathbb{R}^3$, it is always possible to find another vector that is orthogonal to both direction-vectors. This vector is the normal-vector of the plane. Given your plane in coordinate form, the normal vector can directly be read: It consists of the coefficients of your variables, so $3x+4y-2z= 15$ has the normal-vector $\begin{bmatrix}3\\4\\-2\end{bmatrix}$

As others observed, the planes must be parallel.

Suppose you were given $0x + 0y + z = a$ and $0x + 0y + z = b$. Then obviously the distance between them is $d = |a-b|$, and $z = b \pm d$ give the two planes a distance $d$ away from the $z=b$ plane.

So all you need to do is choose your axes to line up with the planes. Let $w$ be the coordinate along the direction $\vec{n} = (1,1,2)$, since that's the form both planes take. But then the coordinate $w = (x,y,z) \cdot \vec{n}/|\vec{n}|$:

$$x + y + 2z = 4 \iff w|\vec{n}| = 4 \iff w = 4/\sqrt{6}$$

and similarly

$$3x + 3y + 6z = 18 \iff 3w|\vec{n}| = 18 \iff w = 6/\sqrt{6}$$

Now you can finish off the problem using the observations in the second paragraph.

This is a sort of geometric way to see this, suppose instead of the finding the distance between the planes $C_1$ and $C_2$, we consider the simpler problem of finding the distance between the planes

$z=2$ and $z=4$

It is clear, in this case that the distance between these planes is $2$ and is realized by the points $(0,0,2)$ and $(0,0,4)$ respectively. Notice, that these points are the intersection of the line parametrized by $(0,0,t)$ and the planes themselves. What's special about this line, is that it is the line paramaterized by the unit vector $[0,0,1]$.

Now, if we turn our heads to the current problem $C_{1}$ and $C_{2}$, we can essentially use the same argument by tilting our heads and treating the normal vector the planes $[1,1,2]$ as the $z$-axis above. Doing this, we see that the intersection of the line $(t,t,2t)$ and plane $C_{1}$ is $(\frac{2}{3}, \frac{2}{3}, \frac{4}{3})$ and the intersection with $C_{2}$ is $(1,1,2)$. Computing the distance between these two points we obtain $\frac{\sqrt{2}}{\sqrt{3}}$ or $\frac{2}{\sqrt{6}}$.

The reason why this works is that we are using $[1,1,2]$ and the plane $x+y+2z=0$ through the origin as a basis for $\mathbb{R}^{3}$. It's a change of coordinates of sorts.