<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] Bringing the matrix in reduced row echelon form $R$ (the way other answers have shown) is the first step no matter what you do.
As for "reading off" the solutions off $R$, I think there are several techniques. The one I was taught, and which I find the easiest to use, is the following:


*

*remove all zero rows


In the example this leads to
$\begin{bmatrix}
1 & 0 & -\frac{7}{5} & | & \frac{1}{5} \\
0 & 1 & \frac{3}{5} & | & -\frac{4}{5}
\end{bmatrix}$, so nothing changed here, since there were no zero rows


*then insert any additional zero rows so the matrix is square and the pivots are all on the diagonal


$\begin{bmatrix}
1 & 0 & -\frac{7}{5} & | & \frac{1}{5} \\
0 & 1 & \frac{3}{5} & | & -\frac{4}{5} \\
0 & 0 & 0 & | & 0
\end{bmatrix}$


*now you can read off a special solution $\lambda$ off the right hand side


$\lambda = \begin{pmatrix}\frac{1}{5} \\ -\frac{4}{5} \\ 0\end{pmatrix}$


*replace all zero entries on the diagonal with $-1$.


$\begin{bmatrix}
1 & 0 & -\frac{7}{5} & | & \frac{1}{5} \\
0 & 1 & \frac{3}{5} & | & -\frac{4}{5} \\
0 & 0 & -1 & | & 0
\end{bmatrix}$


*the columns with $-1$ on the diagonal (the free columns) now form the basis of the null space


$N = \langle \begin{pmatrix}-\frac{7}{5} \\ \frac{3}{5} \\ -1\end{pmatrix} \rangle = \{ r\cdot \begin{pmatrix}-\frac{7}{5} \\ \frac{3}{5} \\ -1\end{pmatrix}$ }, for all $r \in \mathbb{R}$.
And then, of course, the complete solution is just $\lambda + N$, that is $L = \{ \begin{pmatrix}\frac{1}{5} \\ -\frac{4}{5} \\ 0\end{pmatrix} + r\cdot \begin{pmatrix}-\frac{7}{5} \\ \frac{3}{5} \\ -1\end{pmatrix} | r \in \mathbb{R} \}$
</s>