# Solving a linear system? x+2y+z=2 3x+8y+z=12 4y+z=2

##### 1 Answer
Jul 4, 2018

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

#### Explanation:

Perform the Gauss Jordan elimination on the augmented matrix

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

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

$R 3 \leftarrow R 3 - 2 R 2$

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

$R 3 \leftarrow \frac{R 3}{5}$

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

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

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

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

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

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

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