# How to solve the system of equation using matrices? Thanks!

Feb 22, 2018

$x = 1$, $y = - 4$ and $z = - 2$

#### Explanation:

Perform the Gauss Jordan elimination on the augmented matrix

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

I have written the equations not in the sequence as in the question in order to get $1$ as pivot.

Perform the folowing operations on the rows of the matrix

$R 2 \leftarrow R 1 - R 2$; $R 3 \leftarrow R 3 - 4 R 1$

$A = \left(\begin{matrix}1 & 1 & 1 & | & - 5 \\ 0 & - 2 & 2 & | & 4 \\ 0 & - 3 & - 3 & | & 18\end{matrix}\right)$

$R 2 \leftarrow \frac{R 2}{- 2}$

$A = \left(\begin{matrix}1 & 1 & 1 & | & - 5 \\ 0 & 1 & - 1 & | & - 2 \\ 0 & - 3 & - 3 & | & 18\end{matrix}\right)$

$R 3 \leftarrow R 3 + 3 R 2$

$A = \left(\begin{matrix}1 & 1 & 1 & | & - 5 \\ 0 & 1 & - 1 & | & - 2 \\ 0 & 0 & - 6 & | & 12\end{matrix}\right)$

$R 3 \leftarrow \frac{R 2}{- 6}$

$A = \left(\begin{matrix}1 & 1 & 1 & | & - 5 \\ 0 & 1 & - 1 & | & - 2 \\ 0 & 0 & 1 & | & - 2\end{matrix}\right)$

R1larrR1-R3; R2larrR2+R3

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

$R 1 \leftarrow R 1 - R 2$

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

Thus, $x = 1$, $y = - 4$ and $z = - 2$