I came across this question on Quora:
How many $3\times 3$ matrices over the finite field $\{0,1,2\}$ satisfy the condition $A^{-1}=(A^T)^2$?
Thanks to NumPy, with sheer brute-force, I found that there are $33$ such matrices. (You may go through the code and the output.)
I believe that there is a more elegant/algebraic approach to this problem because of the following observations I made:
$A^{-1}=(A^T)^2\implies \det A= 1$ so there can be at most $\dfrac{(3^3-1)(3^3-3)(3^3-3^2)}{3-1}=5616\tag*{}$ such matrices. (Order of special linear group.)
All of them are symmetric i.e., $A^T=A$. (I don't know how to prove this but it's supported by observation.)
All of them satisfy $A^3=I$. (As a consequence of 2)
All of them have zero trace i.e., sum of the diagonal elements is $0$. (I don't know how to prove this either.)
There is only one such matrix which has $(1,1,1)$ on the diagonal. It is the identity matrix.
There are four matrices each which have $(2,2,2)$ or $(0,0,0)$ on their diagonal.
For each permutation $\sigma$ of $0$, $1$, $2$, there are four matrices such that $\text{diag}(A)=\sigma$.
This accounts for the $1+4+4+3!\cdot 4=33$ such matrices.
I would want to know why $(2)$ and $(4)$ are true.
Here's a short summary:
For a matrix $A$ over the field of three elements, it looks like: $$A^{-1}=(A^T)^2 \iff \begin{array}\ A^T=A\\ \text{det }A=1\\ A^3=I \end{array}\implies \text{tr}(A)=0$$
However, I don't have a proof, it's just observations.
Update:
After a long discussion in comments, it is clear to me why $(2)$ and $(4)$ are true.
Why (2) is true? You can rewrite the given condition as $A^T=(A^TA)^{-1}$; now take transpose on both sides to get $A=(AA^T)^{-1}$ and now, use these facts:
- The product of a matrix and its transpose is always symmetric.
- The inverse (if exists) of a symmetric matrix is symmetric.
Why (4) is true? $1$ is the eigen value of $A^3$ with algebraic multiplicity of $3$... This means that eigenvalues of $A$ are of the form cube-root of unity. There is only one cube root of unity in this field. It is $1$ iteself. So the eigenvalues of $A$ are $1,1,1$. Thus, $\text{tr}(A)=1+1+1=0$.
Account for 33 solutions: I think I have also got an idea for a more elegant approach which accounts for the $33$ solutions. I don't know if there is any fallacy in my logic, it is not at all rigorous :(
The properties $A^3=I$ and $A^T=A$ are preserved under conjugation by a non-singular diagonal matrix in this field. What I mean is that:
Let $D$ be a non-singular diagonal matrix (there are $2^3$ choices because $0$ can't be diagonal entry). If $A$ is a solution, $DAD^{-1}$ is also a solution.
Reason: $\mathbb Z_3^*$ is a cyclic group of order two and the group of diagonal matrices is isomorphic to $\mathbb Z_3^*\times \mathbb Z_3^*\times \mathbb Z_3^*$ which is Boolean group. Hence, $D^2=I$. This implies that $D^{-1}=D=D^{T}$. Thus, the conjugate $DAD^{-1}=DAD^T=(DAD^{-1})^T$ is symmetric. Also, notice that $(DAD^{-1})^3=DA^3D^{-1}=I$.
Another point to note is that Conjugation by a diagonal matrix preserves the diagonal… I mean that $\text{diag}(DAD^{-1})=\text{diag}(A)$.
Reason: When you left multiply $A$ by a diagonal matrix $D$, each row $i$ is scaled by $D_{ii}$. Following that right multiplication by $D^{-1}$, scales each column $i$ by $1/D_{ii}$. As a result, the diagonal elements remain unscaled and intact.
Given a solution $A$ with $\text{diag}(A)=(1,2,0)$, how many $D$-conjugates of $A$ exist?
$D$ and $-D$ yield the same conjugate because $DAD^{-1}=(-D)A(-D)^{-1}$… We have $8/2=4$ unique diagonal matrices upto sign, each of which yield a unique $D$-conjugate of $A$. These conjugates have the same diagonal as $A$ and also satisfy our condition.
Likewise, for every solution $A$ with $\text{diag}(A)=(2,2,2)$ or $(2,1,0)$, etc. (we make sure the trace is zero), we have $4$ solutions each by conjugating $A$ with diagonal matrices.
$A=I$ is an exception because $DID^{-1}=I$ so we don’t get any new solution.
Leaving $(1,1,1)$ aside, there are $8$ other arrangements for the diagonal entries which make the trace zero: $(0,0,0)$, $(2,2,2)$ or some permutation of $(1,2,0)$. For each of these types of arrangements along the diagonal, it is observed that there is at least one solution, which can be $D$-conjugated to generate new solutions.
\begin{array}{|c|c|}\hline \text{diag}(A) & \text{No. of $D$-conjugates}\\ \hline (1,1,1)&1\\ \hline(0,0,0)&4\\ \hline (2,2,2)&4\\ \hline (1,2,0)&4\\ \hline (1,0,2)&4\\ \hline (0,1,2)&4\\ \hline (0,2,1)&4\\ \hline (2,1,0)&4\\ \hline (2,0,1)&4\\ \hline \end{array}
That makes the count $8\times 4+1=33$.