#### Answer

The solution is $\left\{ \left( 2,-1,1 \right) \right\}$

#### Work Step by Step

A system of linear equations can be solved with the help of matrices. It is solved with the help of an augmented matrix.
A matrix -- which is divided into two groups divided by a vertical bar with the coefficients of the variable on one side and constants on the other side -- is called an augmented matrix.
The row indicates the constant coefficient from an equation whereas the columns indicate the coefficients of the variables. The coefficient of the missing variable is used as $0$.
The augmented matrix for the provided system of equation is written as follows:
$\left[ \begin{matrix}
2 & -1 & -1 & 4 \\
1 & 1 & -5 & -4 \\
1 & -2 & 0 & 4 \\
\end{matrix} \right]$
Gauss elimination method is used to solve the system of linear equations by turning the augmented matrix into row echelon form. Perform the operations as follows:
Replace ${{R}_{2}}\,\text{by}\,{{R}_{1}}-2{{R}_{2}}$ to get,
$\left[ \begin{matrix}
2 & -1 & -1 & 4 \\
0 & -3 & 9 & 12 \\
1 & -2 & 0 & 4 \\
\end{matrix} \right]$
Replace ${{R}_{2}}\,\text{by}\,\frac{-1}{3}{{R}_{2}}$ to get,
$\left[ \begin{matrix}
2 & -1 & -1 & 4 \\
0 & 1 & -3 & -4 \\
1 & -2 & 0 & 4 \\
\end{matrix} \right]$
Replace ${{R}_{3}}\,\text{by}\,{{R}_{1}}-2{{R}_{3}}$ to get,
$\left[ \begin{matrix}
2 & -1 & -1 & 4 \\
0 & 1 & -3 & -4 \\
0 & 3 & -1 & -4 \\
\end{matrix} \right]$
Replace ${{R}_{3}}\,\text{by}\,-3{{R}_{2}}+{{R}_{3}}$ to get,
$\left[ \begin{matrix}
2 & -1 & -1 & 4 \\
0 & 1 & -3 & -4 \\
0 & 0 & 8 & 8 \\
\end{matrix} \right]$
Replace ${{R}_{3}}\,\text{by}\,\frac{1}{8}{{R}_{3}}$ to get,
$\left[ \begin{matrix}
2 & -1 & -1 & 4 \\
0 & 1 & -3 & -4 \\
0 & 0 & 1 & 1 \\
\end{matrix} \right]$
The system of equations for the above augmented matrix is,
$\left\{ \begin{align}
& 2x-y-z=4\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,.....\ (1) \\
& y-3z=-4\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,.....(2) \\
& z=1\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,......(3)
\end{align} \right.$
Substitute the value of $z$ in equation $(2)$ to get,
$\begin{align}
& y-3=-4 \\
& y=-1
\end{align}$
Substitute value of $y,z\,\text{in}\,(1)$ to get,
$\begin{align}
& 2x+1-1=4 \\
& x=2
\end{align}$
The solution of the provided linear system of equations is $\left\{ \left( 2,-1,1 \right) \right\}$.