<s>[INST] Solve a system of linear equations $\newcommand{\Sp}{\phantom{0}}$There is a system of linear equations:
\begin{alignat*}{4}
 &x -  &&y - 2&&z = &&1, \\
2&x + 3&&y -  &&z =-&&2.
\end{alignat*}
I create the matrix of the system:
$$
  \left[\begin{array}{rrr|r}
    1 & -1 & -2 & 1 \\
    2 & 3 & -1 & -2
  \end{array}\right]
$$ 
then with GEM,
$$
\left[\begin{array}{rrr|r}
    1 & -1 & -2 & 1 \\
    0 & 5 & 3 & -4
  \end{array}\right]
$$
I don't know how to proceed after that?
I have found the correction of this exercise but I still don't understand the way to solve it. Can someone help me please?
 [/INST] I would apply two more row operations and present a solution with a free variable:
$$
\begin{align*}
& \left[\begin{array}{rrr|r}
    1 & -1 & -2 & 1 \\
    2 & 3 & -1 & -2
  \end{array}\right]  R_2+(-2)R_1 \rightarrow R_2 \\
\equiv & \left[\begin{array}{rrr|r}
    1 & -1 & -2 & 1 \\
    0 & 5 & 3 & -4
  \end{array}\right] \frac{1}{5}R_2 \rightarrow R_2 \\
\equiv & \left[\begin{array}{rrr|r}
    1 & -1 & -2 & 1 \\
    0 & 1 & \frac{3}{5} & -\frac{4}{5}
  \end{array}\right]  R_1+R_2 \rightarrow R_1 \\
\equiv & \left[\begin{array}{rrr|r}
    1 & 0 & -\frac{7}{5} & \frac{1}{5} \\
    0 & 1 & \frac{3}{5} & -\frac{4}{5}
  \end{array}\right].
\end{align*}
$$
Read the solution straight from the matrix as
$$
\begin{align*}
x &=\frac{1}{5}+\frac{7}{5}r \\
y&=-\frac{4}{5}-\frac{3}{5}r \\
z&=r,
\end{align*}
$$
with $r\in \mathbb{R}$.
</s>