Is $\left(\begin{smallmatrix}0&0&1\\1&0&0\\ 0&1&0\end{smallmatrix}\right)$ diagonalizable over $\mathbb{Z}_2$?

Your claim that $x^3-1$ and $x-1$ are the same polynomial is the mistake. Yes, as functions over $\mathbb{Z_2}$ they are the same. But a polynomial is not a function. A polynomial is a formal sum of the form $\sum_{i=0}^n a_ix^i$ where the coefficients are elements in the field. So $x^3-1$ is actually not a product of distinct linear factors.

Another way to see this is a mistake is to note that if $x-1$ was the minimal polynomial of $A$ then it would mean that $A-I=0$ and hence $A=I$. But $A$ is not the identity matrix.


No, $x^3-1$ is not equal to $x-1$ over $\Bbb Z_2$, although the corresponding polynomial functions are equal indeed. On the other hand, $x^3-1=(x-1)(x^2+x+1)$ and $x^2+x+1$ is irreducible of $\Bbb Z_2$. Therefore, yes, your matrix is not diagonalizable over $\Bbb Z_2$.