TITLE: A matrix of order 8 over $\mathbb{F}_3$
QUESTION [5 upvotes]: What is an example of an invertible matrix of size 2x2 with coefficients in $\mathbb{F}_3$ that has exact order 8? 
I have found by computation that the condition that the 8th power of a matrix 
$\begin{bmatrix}a & b\\c & d\end{bmatrix}$ is the identity is
$$
b c (a + d)^2 (a^2 + 2 b c + d^2)^2 + ((a^2 + b c)^2 + 
   b c (a + d)^2)^2=1, \qquad b (a + d) (a^2 + 2 b c + d^2) (a^4 + 4 a^2 b c + 2 b^2 c^2 + 
   4 a b c d + 4 b c d^2 + d^4)=0, \qquad c (a + d) (a^2 + 2 b c + d^2) (a^4 + 4 a^2 b c + 2 b^2 c^2 + 
   4 a b c d + 4 b c d^2 + d^4)=0, \qquad b c (a + d)^2 (a^2 + 2 b c + 
    d^2)^2 + (b c (a + d)^2 + (b c + d^2)^2)^2=1
$$
and the condition for invertibility is $ad\neq bc$. If the 4th power is not the identity, then no power that is not a multiple of 8 is not the identity (because we could cancel out to either get that the first power is the identity or that the second power is the identity, both lead to contradiction). That is another cumbersome condition to write out.
I hope somebody can suggest a nicer way.

REPLY [1 votes]: An intuitive way to find a solution is to remember the connection between 2x2 matrices and complex numbers. 
In the complex numbers, an element of order 8 is $e^{2\pi i/8}=(1+i)/\sqrt{2}$. The solution you're looking for is the corresponding matrix, multiplied by $\sqrt{2}$ to have integer entries. (The fact that this multiplication doesn't change the fact that it is a unit root is the only surprising bit (to me))

REPLY [1 votes]: You already have quite a few nice solutions. So let's add another one, shall we? :)
Using the theory of finite fields: The field $\mathbb{F}_9$ is generated by an element of (multiplicative) order $8$, as all unit groups of finite fields are cyclic. Can you find such an element?
Now the unit group of $\mathbb{F}_{p^n}$ can, for all primes $p$ and all $n$, be found in $GL_n(\mathbb{F}_p)$ by taking companion matrices. Let $\alpha$ be a cyclic generator of the unit group, having minimal polynomial $f(x) \in \mathbb{F}_p[x]$. Then the companion matrix of $f(x)$ has the same order as $\alpha$.
So for your example, you only need to find a cyclic generator of the unit group of $\mathbb{F}_9$ and its minimal polynomial. This polynomial will be irreducible and monic over $\mathbb{F}_3$, there aren't that many choices to check there.
If you don't know enough about finite fields yet, you can take from this post that there is a matrix over order $8$ of the form
$$\begin{pmatrix} 0 & a \\ 1 & b\end{pmatrix}.$$
As this matrix has to be invertible, we directly see $a \neq 0$, so there are only $6$ matrices to check here. It should also be quick to see that $b = 0$ will not work, so that only leaves you $4$ matrices.
{"set_name": "stack_exchange", "score": 5, "question_id": 3343777}