Solve the following systems of equations ( Matrices) Solve the following systems of equations: 
\begin{Bmatrix}
       x_1 & -x_2 & -x_3 & +0x_4 & = 2 \\
        -x_1 & +2x_2 & +0x_3 & +3x_4 &= 1 \\
        x_1 & +0x_2 & +x_3 & +0x_4 & =5\\
        \end{Bmatrix}
I try to make a zero triangle but always reach a step where I'm in a cycle trying to do the same thing over and over. I once got $x_3=1/3$ 
Working: 
1-
\begin{Bmatrix}
       1 & -1 & -1 & +0 &  2 \\
        -1 & +2 & +0 & +3 & 1 \\
        1 & +0 & +1 & +0 & 5\\
        \end{Bmatrix}
2- Eq2 to Eq2 + Eq1
\begin{Bmatrix}
       1 & -1 & -1 & +0 &  2 \\
        0 & 1 & -1 & 3 & 3 \\
        1 & +0 & +1 & +0 & 5\\
        \end{Bmatrix}
3- Eq3 to Eq3 + Eq1
\begin{Bmatrix}
       1 & -1 & -1 & +0 &  2 \\
        0 & 1 & -1 & 3 & 3 \\
        0 & 1 & 2 & 0 & 3\\
        \end{Bmatrix}
4- Eq3 to Eq3 - Eq2
\begin{Bmatrix}
       1 & -1 & -1 & +0 &  2 \\
        0 & 1 & -1 & 3 & 3 \\
        0 & 0 & 3 & 0 & 1\\
        \end{Bmatrix}
Now I can say $3x_3=1$ 
Thus, $x_3=1/3$
After that i tried but couldn't complete...
Any suggestions would be appreciated
EDIT: The last step is incorrect.
It should be :
\begin{Bmatrix}
       1 & -1 & -1 & +0 &  2 \\
        0 & 1 & -1 & 3 & 3 \\
        0 & 0 & 3 & -3 & 0\\
        \end{Bmatrix}
So what I did next is:
From Third Row: $x_3+x_4=0$
so, $x_4=-x_3$
Then, From the Second row:
$x_2-x_3+3x_4=3$
$x_2-x_3+3(-x_3)=3$
$x_2-x_3=3$
$x_2=3+x_3$
And I stopped
 A: I will assume your working is correct, haven't checked it.
You have found an echelon form for your system, now you need to proceed to back substitution.  This means that you work out what you can say about the last variable, then the second last and so on.  In your case, $x_4$ then $x_3$ and so on.
Note that none of the rows in your echelon form gives any direct information about $x_4$.  (For example, the second row says $x_2-x_3+3x_4=3$, but as you don't yet know $x_2$ and $x_3$, you can't find $x_4$.)  Therefore, $x_4$ could be any number whatever, and it is usual to write it as a parameter, say
$$x_4=t\ .$$
Now from your third row, $3x_3+0x_4=1$, so
$$x_3=\frac13\ .$$
The second row says $x_2-x_3+3x_4=3$, so $x_2=3+x_3-3x_4$, and substituting in the known values gives
$$x_2=\frac{10}3-3t\ .$$
You can then use the first row to solve for $x_1$ in terms of $t$, please try it.
In the end, you will have formulae for $x_1,x_2,x_3,x_4$ in terms of the parameter $t$, which could be anything.  These formulae give infinitely many solutions of the system.
Hope this helps.
A: when i row reduce your matrix $\pmatrix{1&-1&-1&0&2\\-1&2&0&3&1\\1&0&1&0&5}$ 
 i get $\pmatrix{1&0&0&1&5\\0&1&0&2&3\\0&0&1&-1&0}.$
let us call the variables $x_1, x_2, x_3$ and $x_4$ corresponding to the four columns. the fourth variable $x_4$ is called the free variable. to find a particular solution we set it to zero. you get a particular solution $x_1 = 5, x_2 = 3, x_3 = 0, x_4 = 0.$
to find the homogeneous solution we the free variable to one and delete the last column. so we $x_1 = -1, x_2 = -2, x_3 = 1, x_4 = 1.$
then general solution is $x_g = x_p + tx_h.$ in component form you have $$x_1 = 5-t, x_2 = 3-2t, x_3 = t, x_4 = t \text{ where $t$ is any real number.}$$
A: You should now do backwards elimination; first divide the third equation by $3$ and add the third equation to the second and the first, getting
$$
\begin{bmatrix}
1 & -1 & 0 & 0 & 7/3\\
0 & 1 & 0 & 3 & 10/3\\
0 & 0 & 1 & 0 & 1/3
\end{bmatrix}
$$
Now add the second equation to the first one:
$$
\begin{bmatrix}
1 & 0 & 0 & 3 & 17/3\\
0 & 1 & 0 & 3 & 10/3\\
0 & 0 & 1 & 0 & 1/3
\end{bmatrix}
$$
Now you know that you can give $x_4$ any value, say $x_4=h$, and determine consequently the other unknowns:
$$
\begin{cases}
x_1=\frac{17}{3}-3h\\
x_2=\frac{10}{3}-3h\\
x_3=\frac{1}{3}\\
x_4=h
\end{cases}
$$
