<s>[INST] How to solve a system of equations over a finite field? I need to solve a system of equations over $\mathbb{Z}_{11}$.
My system is:
$$ \left\{ 
\begin{array}{l}
2x + 5y + z = 8 \\
7x + 6y + 8z = 10 \\
10x + 3y + 4z = 6
\end{array}
\right.
$$
In matrix form:
$$
\begin{bmatrix}
2 & 5 & 1\\
7 & 6 & 8\\
10 & 3 & 4\\
\end{bmatrix}
\begin{bmatrix}
x\\
y\\
z\\
\end{bmatrix} = 
\begin{bmatrix}
8\\
10\\
6\\
\end{bmatrix}
$$
after $R_1*6$ :
$$
\begin{bmatrix}
1 & 8 & 6\\
7 & 6 & 8\\
10 & 3 & 4\\
\end{bmatrix}= 
\begin{bmatrix}
4\\
10\\
6\\
\end{bmatrix}
$$
$R_2-7*R_1$ and $R_3-10*R_1$:
$$
\begin{bmatrix}
1 & 8 & 6\\
0 & 5 & 10\\
0 & 0 & 1\\
\end{bmatrix}= 
\begin{bmatrix}
4\\
4\\
10\\
\end{bmatrix}
$$
$R_2*9$ :
$$
\begin{bmatrix}
1 & 8 & 6\\
0 & 1 & 2\\
0 & 0 & 1\\
\end{bmatrix}= 
\begin{bmatrix}
4\\
3\\
10\\
\end{bmatrix}
$$
$$\left\{ 
\begin{array}{l}
 z = 10 \\
y = 3 - 2z = 3 - 20 = -17=5 \\
x = 4 - 8y - 6z = 4 - 8*5 - 6*10 = -96 = 3
\end{array}
\right.$$
But after substitution found values in the initial system I have an error:
$$ \left\{ 
\begin{array}{l}
2x + 5y + z = 2*3 + 5*5+10= 41 = 8 \\
7x + 6y + 8z = 7*3 + 6*5 + 8*10 = 131 = 10 \\
10x + 3y + 4z = 10*3 + 3*5 + 4*10= 85 = 8 \neq 6
\end{array}
\right.
$$
Do I have an arithmetic error or the whole way is wrong? Is there an easier and faster way to solve it?
 [/INST] Since the determinant of your matrix $A$ is $221$, it is non-zero (actually equal to $1$) in the field $\Bbb F_{11}$. Hence the inverse exists, so that $Ax=b$ has the unique solution
$$
b=A^{-1}x=\begin{pmatrix} 0 & 5 & 1\cr 8 & 9 & 2\cr 5 & 0 & 10 \end{pmatrix}\cdot \begin{pmatrix} 8 \cr 10 \cr 6\end{pmatrix} =
\begin{pmatrix} 1 \cr 1 \cr 1\end{pmatrix}. 
$$
</s>