# System of equations over $\mathbb Z_7$

Where is the mistake? The result should be $x=(2,6,2)^T$. Mine is $x=(1,1,2)^T$

\begin{pmatrix} \begin{array}{ccc|c} 3 & 5 & 0 & 1 \\ 1 & 2 & 2 & 4\\ 1 & 3 & 2 & 3 \end{array} \end{pmatrix}

First row multiplied by 2 + second row.
First row multiplied by 2 + third row.

\begin{pmatrix} \begin{array}{ccc|c} 3 & 5 & 0 & 1 \\ 0 & 5 & 2 & 6\\ 0 & 6 & 2 & 5 \end{array} \end{pmatrix}

Second row multiplied by 3 + third row.

\begin{pmatrix} \begin{array}{ccc|c} 3 & 5 & 0 & 1 \\ 0 & 5 & 2 & 6\\ 0 & 0 & 1 & 2 \end{array} \end{pmatrix}

Second row multiplied by 11.
First row multiplied by 5.

\begin{pmatrix} \begin{array}{ccc|c} 1 & 4 & 0 & 5 \\ 0 & 1 & 1 & 3\\ 0 & 0 & 1 & 2 \end{array} \end{pmatrix}

Third row multiplied by 6 + second row.

\begin{pmatrix} \begin{array}{ccc|c} 1 & 4 & 0 & 5 \\ 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 2 \end{array} \end{pmatrix}

Second row multiplied by 3 + first row.

\begin{pmatrix} \begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 2 \end{array} \end{pmatrix}

I have one more question. Why exists only $\mathbb Z_p$ fields, where p is prime number?
Why $\mathbb Z_4$ is not a field?
Many thanks.

• $\Bbb Z_4$ is not a field because $2\ne0$ but $2\cdot 2=0$. – user228113 Nov 19 '16 at 17:37
• You know what would be really helpful? Writing which operation you did at each passage. Not that people can't figure it out on their own, but why make it harder for them? – user228113 Nov 19 '16 at 17:40
• Gonna edit it, thanks for comment! – Speedding Nov 19 '16 at 17:53
• It does not matter anymore, to me, since I somehow managed nevertheless. Keep it in mind for the next time. I don't agree with the downvoter. – user228113 Nov 19 '16 at 17:54

## 1 Answer

$\Bbb Z_4$ is not a field because $2\ne0$ but $2\cdot 2=0$. In general, for $m,n>1$ you have in $\Bbb Z_{mn}$ $$\begin{cases}m\ne0 \\ n\ne0\\ mn=0\end{cases}$$

Going from the third matrix to the fourth matrix you multiplied the second row by some number $x$ which you claim to satisfy both $5x=1$ and $2x=1$. This cannot be, because $5=-2$ in $\Bbb Z_7$, hence $2x=-5x$. So I guess you have a mistake there.

• Thanks, I managed to find the problem by myself. I thought that $(5\cdot 11) mod 7 = 1$. But it is not, of course. Solved. – Speedding Nov 19 '16 at 17:50