<s>[INST] Subgroup of general linear group over $\mathbb{F}_{3}$ generated by two matrices I have two matrices: $A=\begin{bmatrix}0 & 2 &1\\1 & 2&1\\1 &2&0\end{bmatrix}$
and $B=\begin{bmatrix}2 & 1 &0\\0 & 1&0\\0 &1&2\end{bmatrix}$. I need to describe subgroup generated by these matrices.I know that group generated by A and B, say G, is isomorphic to $Q_{8}$ or $D_{4}$ or $S_{3}$ or $S_{4}$ or $A_{4}$. Any hints?
 [/INST] We have $A^2=\begin{bmatrix}0&0&2\\ 0&2&0\\ 2&0&0\end{bmatrix}$,  $A^4=\begin{bmatrix}1&0&0\\ 0&1&0\\ 0&0&1\end{bmatrix}$, $B^2=\begin{bmatrix}1&0&0\\ 0&1&0\\ 0&0&1\end{bmatrix}$ and $BAB=A^{-1}$ since $A^3=A^{-1}=\begin{bmatrix}2&1&0\\ 2&1&2\\\ 0&1&2\end{bmatrix}$ and $BAB=\begin{bmatrix}2&1&0\\ 2&1&2\\\ 0&1&2\end{bmatrix}$.
The dihedral group $D_8$ has presentation $\langle a,b\ |\ a^4=b^2=1, bab=a^{-1}\rangle$, clearly $A$ and $B$ satisfy these relations, so we can conclude $\langle A,B\rangle\cong D_8$.
</s>