# How do you solve the system x+y+z=1, 2x-y+2z=-1, and -x-3y+z=1?

Jul 17, 2018

The solution is $\left(\begin{matrix}x \\ y \\ z\end{matrix}\right) = \left(\begin{matrix}- 2 \\ 1 \\ 2\end{matrix}\right)$

#### Explanation:

Perform the Gauss- Jordan Elimination on the Augmented Matrix

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

The pivot is in the first column and first row

Eliminate the first column

${R}_{2} \leftarrow \left(R 2 - 2 R 1\right)$ and $R 3 \leftarrow \left(R 3 + R 1\right)$

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

Make the pivot in the second row of the second column

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

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

Eliminate the second column

$R 1 \leftarrow \left(R 1 - R 2\right)$

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

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

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

Make the pivot in the third column

$R 3 \leftarrow \left(R \frac{3}{2}\right)$

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

Eliminate the third column

$R 1 \leftarrow \left(R 1 - R 3\right)$

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

The solution is

$\left(\begin{matrix}x \\ y \\ z\end{matrix}\right) = \left(\begin{matrix}- 2 \\ 1 \\ 2\end{matrix}\right)$

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

#### Explanation:

Given equations:

$x + y + z = 1 \setminus \ldots \ldots \ldots . . \left(1\right)$

$2 x - y + 2 z = - 1 \setminus \ldots \ldots \ldots . . \left(2\right)$

$- x - 3 y + z = 1 \setminus \ldots \ldots \ldots . . \left(3\right)$

Adding (1) & (2), we get

$x + y + z + 2 x - y + 2 z = 1 + \left(- 1\right)$

$3 x + 3 z = 0$

$x + z = 0 \setminus \ldots \ldots . . \left(4\right)$

Multiplying (1) by $3$ & adding to (3) as follows

$- x - 3 y + z + 3 \left(x + y + z\right) = 1 + 3 \setminus \cdot 1$

$2 x + 4 z = 4$

$x + 2 z = 2 \setminus \ldots \ldots \ldots \left(5\right)$

subtracting (4) from (5) as follows

$x + 2 z - \left(x + z\right) = 2 - 0$

$z = 2$

Setting $z = 2$ in (4), we get

$x + 2 = 0$

$x = - 2$

Now, setting $x = - 2$ & $z = 2$ in (1), we get

$- 2 + y + 2 = 1$

$y = 1$

Hence, we get

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