I would like to ask how to solve this matrix, if I substitute for z (x, y, z) z = 4, I can't calculate the matrix. I tried to adjust the matrix to this shape, but I don't know how to proceed.
$\left( {\begin{array}{ccc|c} 1 & 2 & 1 & 3\\ 1 & 0 & 0 & 4\\ 1 & 3 & 4 & 0 \end{array} } \right)$ in $\mathbb{Z}_{5}$
$\left( {\begin{array}{ccc|c} 1 & 2 & 1 & 3\\ 0 & 1 & 3 & 2\\ 0 & 0 & 0 & 0 \end{array} } \right)$
start:
$\left( {\begin{array}{ccc|c} 1 & 2 & 1 & 3\\ 1 & 0 & 0 & 4\\ 1 & 3 & 4 & 0 \end{array} } \right)$
first steps: subtract 1st row from 2nd and 3rd, to eliminate the other 1's in the first column
$\left( {\begin{array}{ccc|c} 1 & 2 & 1 & 3\\ 0 & 3 & 4 & 1\\ 0 & 1 & 3 & 2 \end{array} } \right)$
where I use that $-1 \equiv 4, -2 \equiv 3, -3 \equiv 2$ in $\Bbb Z_5$. The pivot 3 on place $(2,2)$ has an inverse 2 over $\Bbb Z_5$ so I multiply the 2nd row by $2$ (modulo $5$) to make for easier computations:
$\left( {\begin{array}{ccc|c} 1 & 2 & 1 & 3\\ 0 & 1 & 3 & 2\\ 0 & 1 & 3 & 2 \end{array} } \right)$
We subtract the two identical rows at the end to get:
$\left( {\begin{array}{ccc|c} 1 & 2 & 1 & 3\\ 0 & 1 & 3 & 2\\ 0 & 0 & 0 & 0 \end{array} } \right)$
So we have a consistent system (so there are solutions) that is underdetermined. So there will be $5$ solutions, depending on the value we pick for the free variable $z$, we can solve it in terms of this free variable:
$y + 3z = 2$ so $y = 2-3z = 2 + 2z$
$x+2y+z = 3$ so $x+ 4z + 4+ z = 3$ so $x+4=3$ so $x=4$, as $5z\equiv 0$.
So we get the solutions $\{(4,2+2z, z) \mid z \in \Bbb Z_5\}$, a set of $5$ vectors, as expected.