Plane Equation for Three Non-Collinear Points
Given three non-collinear points in R3 space, there is a unique plane that passes through these points: P1, P2, and P3. $$ P_1 \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} \:\:\: P_2 \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} \:\:\: P_3 \begin{pmatrix} x_3 \\ y_3 \\ z_3 \end{pmatrix} $$
How to Determine the Parametric Equations of the Plane
From the three points, we derive two direction vectors:
$$ v_1 = P_1P_2 = \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix} - \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} = \begin{pmatrix} x_2 - x_1 \\ y_2 - y_1 \\ z_2 - z_1 \end{pmatrix} $$
$$ v_2 = P_1P_3 = \begin{pmatrix} x_3 \\ y_3 \\ z_3 \end{pmatrix} - \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} = \begin{pmatrix} x_3 - x_1 \\ y_3 - y_1 \\ z_3 - z_1 \end{pmatrix} $$
Next, we check that they are linearly independent.
The two vectors can generate the plane, forming a basis of the vector space, only if they are linearly independent.
Two vectors are linearly independent if the rank of the matrix formed by placing the vectors in columns is equal to the number of vectors.
$$ r_k \begin{pmatrix} x_2 - x_1 & x_3 - x_1 \\ y_2 - y_1 & y_3 - y_1 \\ z_2 - z_1 & z_3 - z_1 \end{pmatrix} = 2 $$
Once the linear independence of the two vectors is confirmed, we choose one of the three points as an arbitrary point P0 on the plane.
For example, we choose the point P1.
$$ P_0 = P_1 $$
$$ \begin{pmatrix} x_0 \\ y_0 \\ z_0 \end{pmatrix} = \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix} $$
Now we have all the elements to write the vector equation of the plane.
$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = P_0 + t_1 \cdot v_1 + t_2 \cdot v_2 $$
Where t1 and t2 are parameters of the vector equation that determine all points on the plane.
We substitute the two direction vectors:
$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = P_0 + t_1 \cdot \begin{pmatrix} x_2 - x_1 \\ y_2 - y_1 \\ z_2 - z_1 \end{pmatrix} + t_2 \cdot \begin{pmatrix} x_3 - x_1 \\ y_3 - y_1 \\ z_3 - z_1 \end{pmatrix} $$
Then substitute the point P0:
Thus, we obtain the vector equation of the plane:
$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} x_0 \\ y_0 \\ z_0 \end{pmatrix} + t_1 \cdot \begin{pmatrix} x_2 - x_1 \\ y_2 - y_1 \\ z_2 - z_1 \end{pmatrix} + t_2 \cdot \begin{pmatrix} x_3 - x_1 \\ y_3 - y_1 \\ z_3 - z_1 \end{pmatrix} $$
To find the parametric equation of the plane, we convert the vector form into a system of three equations:
$$ \begin{cases} x = x_0 + t_1 \cdot ( x_2 - x_1 ) + t_2 \cdot ( x_3 - x_1 ) \\ y = y_0 + t_1 \cdot ( y_2 - y_1 ) + t_2 \cdot ( y_3 - y_1 ) \\ z = z_0 + t_1 \cdot ( z_2 - z_1 ) + t_2 \cdot ( z_3 - z_1 ) \end{cases} $$
To find the Cartesian equation, we solve the parametric equations:
Move the point P0 to the left side:
$$ \begin{cases} x - x_0 = t_1 \cdot ( x_2 - x_1 ) + t_2 \cdot ( x_3 - x_1 ) \\ y - y_0 = t_1 \cdot ( y_2 - y_1 ) + t_2 \cdot ( y_3 - y_1 ) \\ z - z_0 = t_1 \cdot ( z_2 - z_1 ) + t_2 \cdot ( z_3 - z_1 ) \end{cases} $$
Next, construct the matrix with the coefficients of the three vectors as columns:
$$ \begin{pmatrix} x-x_0 & x_2 - x_1 & x_3 - x_1 \\ y-y_0 & y_2 - y_1 & y_3 - y_1 \\ z-z_0 & z_2 - z_1 & z_3 - z_1 \end{pmatrix} $$
Finally, calculate the determinant of the matrix and set it equal to zero:
$$ det \begin{pmatrix} x-x_0 & x_2 - x_1 & x_3 - x_1 \\ y-y_0 & y_2 - y_1 & y_3 - y_1 \\ z-z_0 & z_2 - z_1 & z_3 - z_1 \end{pmatrix} = 0 $$
$$ ( x-x_0 ) \cdot \begin{vmatrix} y_2-y_1 & y_3 - y_1 \\ z_2 - z_1 & z_3 - z_1 \end{vmatrix} - (y-y_0) \cdot \begin{vmatrix} x_2-x_1 & x_3 - x_1 \\ z_2 - z_1 & z_3 - z_1 \end{vmatrix} +(z-z_0) \cdot \begin{vmatrix} x_2-x_1 & x_3 - x_1 \\ y_2-y_1 & y_3 - y_1 \end{vmatrix} = 0$$
We thus obtain the Cartesian equation of the plane:
$$ ( x-x_0 ) \cdot a - (y-y_0) \cdot b +(z-z_0) \cdot c = 0$$
Example
Let's consider three non-collinear points in space:
$$ P_1 \begin{pmatrix} 1 \\ 3 \\ 5 \end{pmatrix} \:\:\: P_2 \begin{pmatrix} 2 \\ 0 \\ 3 \end{pmatrix} \:\:\: P_3 \begin{pmatrix} 4 \\ 1 \\ 2 \end{pmatrix} $$
From these points, we derive the direction vectors:
$$ v_1 = P_1P_2 = \begin{pmatrix} 2 \\ 0 \\ 3 \end{pmatrix} - \begin{pmatrix} 1 \\ 3 \\ 5 \end{pmatrix} = \begin{pmatrix} 2 - 1 \\ 0 - 3 \\ 3 - 5 \end{pmatrix} = \begin{pmatrix} 1 \\ -3 \\ -2 \end{pmatrix} $$
$$ v_2 = P_1P_3 = \begin{pmatrix} 4 \\ 1 \\ 2 \end{pmatrix} - \begin{pmatrix} 1 \\ 3 \\ 5 \end{pmatrix} = \begin{pmatrix} 4 - 1 \\ 1 - 3 \\ 2 - 5 \end{pmatrix} = \begin{pmatrix} 3 \\ -2 \\ -3 \end{pmatrix} $$
We check that they are linearly independent:
$$ r_k \begin{pmatrix} 1 & 3 \\ -3 & -2 \\ -2 & -3 \end{pmatrix} = 2 $$
The rank (rk=2) equals the number of vectors (2).
Thus, the vectors are linearly independent and can be used as the basis vectors for the plane.
We choose point P1 as an arbitrary point P0 on the plane:
$$ P_0 = P_1 $$
$$ \begin{pmatrix} x_0 \\ y_0 \\ z_0 \end{pmatrix} = \begin{pmatrix}1 \\ 3 \\ 5 \end{pmatrix} $$
Now we have all the elements to write the vector equation of the plane:
$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = P_0 + t_1 \cdot v_1 + t_2 \cdot v_2 $$
$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix}1 \\ 3 \\ 5 \end{pmatrix} + t_1 \cdot \begin{pmatrix} 1 \\ -3 \\ -2 \end{pmatrix} + t_2 \cdot \begin{pmatrix} 3 \\ -2 \\ -3 \end{pmatrix} $$
From this, we obtain the parametric equation of the plane:
$$ \begin{cases} x = 1 + t_1 \cdot 1 + t_2 \cdot 3 \\ y = 3 + t_1 \cdot (-3) + t_2 \cdot (-2) \\ z = 5 + t_1 \cdot (-2) + t_2 \cdot (-3) \end{cases} $$
$$ \begin{cases} x = 1 + t_1 + 3 t_2 \\ y = 3 - 3 t_1 -2 t_2 \\ z = 5 - 2 t_1 -3 t_2 \end{cases} $$
Finally, we derive the Cartesian equation of the plane by calculating the determinant of the matrix:
Move the coordinates of point P0 to the left side:
$$ \begin{cases} x - 1 = t_1 + 3 t_2 \\ y - 3 = - 3 t_1 -2 t_2 \\ z - 5 = - 2 t_1 -3 t_2 \end{cases} $$
Transform the system into a matrix:
$$ \begin{pmatrix} x - 1 & 1 & 3 \\ y-3 & -3 & -2 \\ z-5 & -2 & -3 \end{pmatrix} $$
Calculate the determinant of the matrix:
$$ det \begin{pmatrix} x - 1 & 1 & 3 \\ y-3 & -3 & -2 \\ z-5 & -2 & -3 \end{pmatrix} $$
$$ ( x-1 ) \cdot \begin{vmatrix} -3 & -2 \\ -2 & -3 \end{vmatrix} - (y-3) \cdot \begin{vmatrix} 1 & 3 \\ -2 & -3 \end{pmatrix} +(z-5) \cdot \begin{vmatrix} 1 & 3 \\ -3 & -2 \end{pmatrix} $$
$$ ( x-1 ) \cdot (5) - (y-3) \cdot (3) +(z-5) \cdot (7) $$
$$ 5x - 5 -3y +9 +7z -35 $$
$$ 5x -3y +7z -31 $$
Set the equation to zero to get the Cartesian equation of the plane:
$$ 5x -3y +7z -31 = 0 $$
The graphical representation of the plane in three-dimensional space is shown below:
And so on.