# How do you solve x+4y-z =3, 2x+3y-2z =1 and -x+2y+3z =7 using matrices?

Feb 6, 2017

The answer is $\left(\begin{matrix}x \\ y \\ z\end{matrix}\right) = \left(\begin{matrix}1 \\ 1 \\ 2\end{matrix}\right)$

#### Explanation:

We rewrite the equations with a matrix

$\left(\begin{matrix}1 & 4 & - 1 \\ 2 & 3 & - 2 \\ - 1 & 2 & 3\end{matrix}\right) \left(\begin{matrix}x \\ y \\ z\end{matrix}\right) = \left(\begin{matrix}3 \\ 1 \\ 7\end{matrix}\right)$

Let matrix $A = \left(\begin{matrix}1 & 4 & - 1 \\ 2 & 3 & - 2 \\ - 1 & 2 & 3\end{matrix}\right)$

We must calculate the inverse of $A$, ${A}^{-} 1$

We calculate the determinant of $A$

$\det A = | \left(1 , 4 , - 1\right) , \left(2 , 3 , - 2\right) , \left(- 1 , 2 , 3\right) |$

$= 1 \cdot | \left(3 , - 2\right) , \left(2 , 3\right) | - 4 \cdot | \left(2 , - 2\right) , \left(- 1 , 3\right) | - 1 \cdot | \left(2 , 3\right) , \left(- 1 , 2\right) |$

$= 1 \cdot \left(13\right) - 4 \left(4\right) - 1 \cdot \left(7\right)$

$= 13 - 16 - 7 = - 10$

$\det A \ne 0$, so the matrix is invertible

The matrix of cofactor is

$C = \left(\begin{matrix}| \left(3 - 2\right) & \left(2 3\right) | & - | \left(2 - 2\right) & \left(- 1 3\right) | & | \left(2 3\right) & \left(- 1 2\right) | \\ - | \left(4 - 1\right) & \left(2 3\right) | & | \left(1 - 1\right) & \left(- 1 3\right) | & - | \left(1 4\right) & \left(- 1 2\right) | \\ | \left(4 - 1\right) & \left(3 - 2\right) | & - | \left(1 - 1\right) & \left(2 - 2\right) | & | \left(1 4\right) & \left(2 3\right) |\end{matrix}\right)$

$= \left(\begin{matrix}13 & - 4 & 7 \\ - 14 & 2 & - 6 \\ - 5 & 0 & - 5\end{matrix}\right)$

We calculate the transpose of $C$

${C}^{T} = \left(\begin{matrix}13 & - 14 & - 5 \\ - 4 & 2 & 0 \\ 7 & - 6 & - 5\end{matrix}\right)$

${A}^{-} 1 = {C}^{T} / \det A = - \frac{1}{10} \left(\begin{matrix}13 & - 14 & - 5 \\ - 4 & 2 & 0 \\ 7 & - 6 & - 5\end{matrix}\right)$

and

$\left(\begin{matrix}x \\ y \\ z\end{matrix}\right) = - \frac{1}{10} \left(\begin{matrix}13 & - 14 & - 5 \\ - 4 & 2 & 0 \\ 7 & - 6 & - 5\end{matrix}\right) \cdot \left(\begin{matrix}3 \\ 1 \\ 7\end{matrix}\right)$

$= - \frac{1}{10} \left(\begin{matrix}- 10 \\ - 10 \\ - 20\end{matrix}\right) = \left(\begin{matrix}1 \\ 1 \\ 2\end{matrix}\right)$