<s>[INST] Where am I going wrong when trying to solve this system of equations using Gaussian Elimination? $$3x-y+z=5 \\ 2x+y-z=1 \\ x-y+z=2 \\ 4x+4y+z=3$$
Steps I took:
$$\left[\begin{array}{rrr|r}
    3 & -1 & 1 & 5 \\
    2 & 1 & -1 & 1 \\
    1 & -1 & 1 & 2\\
    4 & 4 & 1 & 3
  \end{array}\right]$$
$$\Rightarrow { R }_{ 1 }={ R }_{ 1 }+{ R }_{ 2 } = \left[\begin{array}{rrr|r}
    5 & 0 & 0 & 6 \\
    2 & 1 & -1 & 1 \\
    1 & -1 & 4 & 2\\
    4 & 4 & 1 & 3
  \end{array}\right]$$
$$\Rightarrow { R }_{ 2 }={ R }_{4}-2{ R }_{ 2 } = \left[\begin{array}{rrr|r}
    5 & 0 & 0 & 6 \\
    0 & 2 & 3 & 1 \\
    1 & -1 & 4 & 2\\
    4 & 4 & 1 & 3
  \end{array}\right]$$
$$ \Rightarrow { R }_{ 3 }=4{ R }_{3}-{ R }_{ 4 } = \left[\begin{array}{rrr|r}
    5 & 0 & 0 & 6 \\
    0 & 2 & 3 & 1 \\
    0 & -8 & 15 & 5\\
    4 & 4 & 1 & 3
  \end{array}\right]$$
At this point I have no idea what to do to get solve this system of equations. To be honest, I don't even know how to handle Gaussian Elimination with $4$ equations with $3$ unknowns. I would like an explanation as to what I need to do (in layman terms, please) and then point me in the right direction.
 [/INST] $\left[\begin{array}{rrr|r}
    3 & -1 & 1 & 5 \\
    2 & 1 & -1 & 1 \\
    1 & -1 & 1 & 2\\
    4 & 4 & 1 & 3
  \end{array}\right],
{ R }_{ 1 }={ R }_{ 1 }+{ R }_{ 2 }\Rightarrow  
\left[\begin{array}{rrr|r}
    5 & 0 & 0 & 6 \\
    2 & 1 & -1 & 1 \\
    1 & -1 & 4 & 2\\
    4 & 4 & 1 & 3
  \end{array}\right],
{ R }_{ 2 }={ R }_{4}-2{ R }_{ 2 }
\Rightarrow   \left[\begin{array}{rrr|r}
    5 & 0 & 0 & 6 \\
    0 & 2 & 3 & 1 \\
    1 & -1 & 4 & 2\\
    4 & 4 & 1 & 3
  \end{array}\right],
{ R }_{ 3 }=4{ R }_{3}-{ R }_{ 4 }
\Rightarrow   \left[\begin{array}{rrr|r}
    5 & 0 & 0 & 6 \\
    0 & 2 & 3 & 1 \\
    0 & -8 & 15 & 5\\
    4 & 4 & 1 & 3
  \end{array}\right],
{ R }_{ 1 }={ R }_{1}/5 \text{ and } { R }_{ 2 }={ R }_{2}/2 
\Rightarrow   \left[\begin{array}{rrr|r}
    1 & 0 & 0 & 6/5 \\
    0 & 1 & 3/2 & 1/2 \\
    0 & -8 & 15 & 5\\
    4 & 4 & 1 & 3
  \end{array}\right],
{ R }_{ 4 }={ R }_{4}-4{ R }_{ 1 }
\Rightarrow   \left[\begin{array}{rrr|r}
    1 & 0 & 0 & 6/5 \\
    0 & 1 & 3/2 & 1/2 \\
    0 & -8 & 15 & 5\\
    0 & 4 & 1 & -9/5
  \end{array}\right],
{ R }_{ 4 }={ R }_{4}-4{ R }_{ 2 }\text{ and }{ R }_{ 3 }={ R }_{3}+8{ R }_{ 2 }
\Rightarrow   \left[\begin{array}{rrr|r}
    1 & 0 & 0 & 6/5 \\
    0 & 1 & 3/2 & 1/2 \\
    0 & 0 & 27 & 9\\
    0 & 0 & -5 & -19/5
  \end{array}\right]$
Now you can stop, since you got a contradiction you got $27x_3=9\Rightarrow x_3=1/3$ and $-5x_3=-19/5\Rightarrow x_3=-19/25$.
</s>