# How do you solve the system x-y-2z=-6, 3x+2y=-25, and -4x+y-z=12?

Feb 28, 2018

$x = - 5$, $y = - 5$ and $z = 3$

#### Explanation:

Perform the Gauss Jordan elimination on the augmented matrix

$A = \left(\begin{matrix}1 & - 1 & - 2 & | & - 6 \\ 3 & 2 & 0 & | & - 25 \\ - 4 & 1 & - 1 & | & 12\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 2 - 3 R 1$, $R 3 \leftarrow R 3 + 4 R 1$;

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

$R 3 \leftarrow \frac{R 3}{- 3}$;

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

$R 1 \leftarrow R 1 + R 3$, $R 2 \leftarrow R 2 - 5 R 3$;

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

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

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

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

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

Thus, $x = - 5$, $y = - 5$ and $z = 3$