Answer
$x=1$
$y=1$
$z=2$
Work Step by Step
$ \begin{bmatrix}
1 & -2 & 1 & 1\\
0 & 1 & 2 & 5\\
1 & 1 & 3 & 8
\end{bmatrix} $
Add -1 times the 1st row to the 3rd row to produce a new 3rd row.
$ \begin{bmatrix}
1 & -2 & 1 & 1\\
0 & 1 & 2 & 5\\
0 & 3 & 2 & 7
\end{bmatrix} $
Add -3 times the 2nd row to the 3rd row to produce a new 3rd row.
$ \begin{bmatrix}
1 & -2 & 1 & 1\\
0 & 1 & 2 & 5\\
0 & 0 & -4 & -8
\end{bmatrix} $
Divide the last row by -4.
$ \begin{bmatrix}
1 & -2 & 1 & 1\\
0 & 1 & 2 & 5\\
0 & 0 & 1 & 2
\end{bmatrix} $
Use back-substitution to find the solution.
$z=2$
$y+2z=5 \rightarrow y=1$
$x-2y+z=1 \rightarrow x=1$