# How do you solve x + 2y + z = 6, 2x - y - z = 0, and 3x + 2y +z = 10 using matrices?

##### 2 Answers
Dec 17, 2017

$x = 2$
$y = 0$
$z = 4$

#### Explanation:

Given -

$x + 2 y + z = 6$
$2 x - y - z = 0$
$3 x + 2 y + z = 10$
Answer is developed from the template I created in Excel Dec 17, 2017

$x = 2$, $y = 0$ and $z = 4$

#### Explanation:

Perform the Gauss Jordan elimination on the augmented matrix

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

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

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

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

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

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

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

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

$R 2 \leftarrow R 2 - R 3$

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

Thus $x = 2$, $y = 0$ and $z = 4$