# How do you solve x + y + z = 3, -x + 3y + 2z = -8, and 5y + z = 2?

Jan 13, 2018

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

#### Explanation:

Perform the Gauss Jordan elimination on the augmented matrix

$A = \left(\begin{matrix}1 & 1 & 1 & | & 3 \\ - 1 & 3 & 2 & | & - 8 \\ 0 & 5 & 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 2 + R 1$;

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

$R 2 \leftarrow R 2 \cdot 5$; $R 3 \leftarrow R 3 \cdot 4$

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

$R 3 \leftarrow R 3 - R 2$

$A = \left(\begin{matrix}1 & 1 & 1 & | & 3 \\ 0 & 20 & 15 & | & - 25 \\ 0 & 0 & - 11 & | & 33\end{matrix}\right)$

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

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

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

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

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

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

$R 1 \leftarrow R 1 - R 2$

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

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