Answer
$x=2$
$y=-3$
$z=3$
Work Step by Step
$-x+y+2z=1$
$2x+3y+z=-2$
$5x+4y+2z=4$
Write the augmented matrix of the system of linear equations.
$ \begin{bmatrix}
-1 & 1 & 2 & 1\\
2 & 3 & 1 & -2\\
5 & 4 & 2 & 4
\end{bmatrix} $
Multiply the first row by -1.
$ \begin{bmatrix}
1 & -1 & -2 & -1\\
2 & 3 & 1 & -2\\
5 & 4 & 2 & 4
\end{bmatrix} $
Add -2 times the 1st row to the 2nd row to produce a new 2nd row.
Add -5 times the 1st row to the 3rd row to produce a new 3rd row.
$ \begin{bmatrix}
1 & -1 & -2 & -1\\
0 & 5 & 5 & 0\\
0 & 9 & 12 & 9
\end{bmatrix} $
Divide the second row by 5.
$ \begin{bmatrix}
1 & -1 & -2 & -1\\
0 & 1 & 1 & 0\\
0 & 9 & 12 & 9
\end{bmatrix} $
Add -9 times the 2nd row to the 3rd row to produce a new 3rd row.
$ \begin{bmatrix}
1 & -1 & -2 & -1\\
0 & 1 & 1 & 0\\
0 & 0 & 3 & 9
\end{bmatrix} $
Use back-substitution to find the solution.
$3z=9 \rightarrow z=3$
$y+z=0 \rightarrow y+3=0 \rightarrow y=-3$
$x-y-2z=-1 \rightarrow x+3-6=-1 \rightarrow x=2$