Equation of a Plane

Given a normal vector to the plane $n$, and $r$, $r_{0}$ the position vectors of two points in the plane, then we have the vector form equation of a plane:

\begin{eqnarray*}
n \cdot (\vec{r} - \vec{r_{0}}) &=& 0
\end{eqnarray*}

This can be expanded using commutativity:

\begin{eqnarray*}
n \cdot (\vec{r} - \vec{r_{0}}) &=& n\cdot\vec{r} - n\cdot\vec{r_{0}}
\end{eqnarray*}

in order to obtain:

\begin{eqnarray*}
n\cdot\vec{r} &=& n\cdot\vec{r_{0}}
\end{eqnarray*}

Since each vector in the plane most be orthogonal to the normal vector $n$, then it means that the vector $r-r_{0}$ is a vector in the plane.

With some simplification and substituting $n=<a,b,c>$, $r=<x,y,z>$ and $r_{0}=<x_{0}, y_{0}, z_{0}>$ we obtain a parametric equation:

\begin{eqnarray*}
a(x-x_{0}) + b(y-y_{0}) + c(z-z_{0}) &=& 0
\end{eqnarray*}

Find the Equation of a Plane Defined by Three Points

Since a plane is defined by three points in geometry, we can use the parametric equation form to determine the equation of the plane that contains all three points - there is only one such plane but can be described by several equations.

Suppose that the given points are:

\begin{eqnarray*}
R &=& (r_{x}, r_{y}, r_{z}) \\
S &=& (s_{x}, s_{y}, s_{z}) \\
T &=& (t_{x}, t_{y}, t_{z})
\end{eqnarray*}

We compute the normal vector by computing the cross-product of the vectors between any two points - for example, the vector $\vec{a}$ from $R$ to $S$ and the vector $\vec{b}$ from $S$ to $T$:

\begin{eqnarray*}
\vec{a} &=& <s_{x}-r_{x}, s_{y}-r_{y}, s_{z}-r_{z}> \\
\vec{b} &=& <t_{x}-s_{x}, t_{y}-s_{y}, t_{z}-s_{z}>
\end{eqnarray*}

leadning to:

\begin{eqnarray*}
\vec{n} &=& \vec{a} \times \vec{b} \\
&=& \left| \begin{matrix} 
i & j & k \\
s_{x}-r_{x} & s_{y}-r_{y} & s_{z}-r_{z} \\
t_{x}-s_{x} & t_{y}-s_{y} & t_{z}-s_{z}
\end{matrix} \right|
\end{eqnarray*}

and expanding the determinant by the cofactors of $i$, $j$ and $k$:

\begin{eqnarray*}
\vec{n} &=& <n_{i}, n_{j}, n_{k}>
\end{eqnarray*}

where:

\begin{eqnarray*}
n_{i} &=& (s_{y}-r_{y})*(t_{z}-s_{z})-(s_{z}-r_{z})*(t_{y}-s_{y}) \\
n_{j} &=& (s_{x}-r_{x})*(t_{z}-s_{z})-(s_{z}-r_{z})*(t_{x}-s_{x}) \\
n_{k} &=& (s_{x}-r_{x})*(t_{y}-s_{y})-(s_{y}-r_{y})*(t_{x}-s_{x})
\end{eqnarray*}

Next, in addition to the normal vector, we need a point to describe the plane by and we can pick any of the three points chosen. Any of the resulting equation will be valid. Let's pick the first one $R$ which will lead to the plane equation:

\begin{eqnarray*}
n_{i}(x-r_{x}) + n_{j}(y-r_{y}) + n_{k}(z-r_{z}) = 0
\end{eqnarray*}

conversely, if we picked point $S$, we would have obtained:

\begin{eqnarray*}
n_{i}(x-s_{x}) + n_{j}(y-s_{y}) + n_{k}(z-s_{z}) = 0
\end{eqnarray*}

and, for point $T$:

\begin{eqnarray*}
n_{i}(x-t_{x}) + n_{j}(y-t_{y}) + n_{k}(z-t_{z}) = 0
\end{eqnarray*}

Any of these three equations describe a plane that contains all of the points $R$, $S$, $T$.

We can transform the equations back into vector form by knowing the normal vector $n$ and making pairs of $R$, $S$ and $T$:

\begin{eqnarray*}
n \cdot (S-R) &=& 0 \\
n \cdot (T-S) &=& 0 \\
n \cdot (T-R) &=& 0 \\
\cdots
\end{eqnarray*}