It should be simple, but I'm having trouble.
The three points are $$A(1,-2,1)\qquad B(4,-2,-2)\qquad C(4,1,4)$$ The plane I get is $$x+2y+z+6=0$$ but it obviously does not pass through the three points $A,B,C$.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityIt should be simple, but I'm having trouble.
The three points are $$A(1,-2,1)\qquad B(4,-2,-2)\qquad C(4,1,4)$$ The plane I get is $$x+2y+z+6=0$$ but it obviously does not pass through the three points $A,B,C$.
Here's one way to get the requisite plane:
The final equation of the plane is $x-2y+z-6=0$.
You’re looking for an equation of the form $ax+by+cz+d=0$. Plugging the coordinates of the known points into this generic equation gives you the following system of linear equations: $$\begin{align} a-2b+c+d&=0 \\ 4a-2b-2c+d&=0 \\ 4a+b+4c+d&=0.\end{align}$$ Solve this system for the unknown coefficients $a$, $b$, $c$ and $d$. The solution won’t be unique, but if all goes well (you haven’t made a mistake and the points aren’t colinear) the solution space will be one-dimensional. That’s to be expected since you can multiply the equation of a plane by any nonzero constant to get another equation for the same plane.
The above system can be written as the matrix equation $$\begin{bmatrix}1&-2&1&1\\4&-2&-2&1\\4&1&4&1\end{bmatrix} \begin{bmatrix}a\\b\\c\\d\end{bmatrix} = 0$$ from which it’s evident that the coefficients of the equation of the plane are the components of any nonzero element of the null space of the matrix on the left. The first three columns are just the $x$-, $y$- and $z$-coordinates of the three points, therefore one can find the equation of the plane through three noncolinear points by computing the null space of $$\begin{bmatrix}x_1&y_1&z_1&1\\x_2&y_2&z_2&1\\x_3&y_3&z_3&1\end{bmatrix}.$$ In fact, it’s possible to do better and write down an equation of the plane directly. Every other point $(x,y,z)$ on the plane also generates a linear equation in the coefficients of the plane equation. In order to add it to the above system without reducing the dimension of the solution set, it must be dependent on the other equations, i.e., it must be a linear combination of the other three. This means that for any point $(x,y,z)$ on the plane, the rows of $$A = \begin{bmatrix}x&y&z&1\\x_1&y_1&z_1&1\\x_2&y_2&z_2&1\\x_3&y_3&z_3&1\end{bmatrix}$$ must be linearly dependent, but that means that $\det A=0$ is an equation of the plane. Applying this idea to the three points in your problem produces the equation $9x-18y+9z-54=0$, which becomes $x-2y+z-6=0$ after eliminating the common factor of $9$. This method is applicable to a wide variety of curves and surfaces.