Number of invertible symmetric $3\times 3$ matrices over a finite field $F =\mathbb{F}_q$

111 Views Asked by At

I was trying to find the number of symmetric invertible matrices of size $n\times n$ over a finite field $F= \mathbb{F}_q$ ( $q$ odd for simplicity)

For $n=2$ it has to do with counting the number of zeroes of a quadratic form over a finite field, something that was seen before on this site.

For $n = 3$ it is a completely new problem.

I am trying it in this way:

The first subset of (symmetric) invertible matrices are the one having a Gauss decomposition

$$A = L D U$$

where $L$ is lower triangular unipotent, $U$ is upper triangular unipotent, and $D$ is diagonal with non-zero diagonal values. If $A$ is moreover symmetric then $L = U^t$. Now the number of such matrices is simple to determine. The matrices with a Gauss decomposition are those for which $D_1$, $\ldots$, $D_n \ne 0$. where $D_k$ are the leading minors, $1\le k \le n$. So we got a subset of the set of symmetric invertible matrices.

Let's try to determine the number of $n\times n$ symmetric invertible matrices. Now, let $d_{n-1}$ the number of symmetric $(n-1)\times (n-1)$ matrices that are invertible. From this we can complete the off diagonal elements in $q^{n-1}$ ways, and the last diagonal element in $(q-1)$ ways ( use the Cauchy formula for expanding the determinant).

The problem is what happens if the $D_{n-1}$ leading minor is in fact zero. Now its rank starts to matter. Perhaps I could cover the case $n=3$, but it looks a bit confusing.

Notes: I am aware there exists a paper that solves this problem ( symmetric matrices with $0$ determinant over the ring $\mathbb{Z}_m$), but it seems hard to read. Even inequalities would be helpful.

Any feedback would be welcome!

1

There are 1 best solutions below

7
On BEST ANSWER

The linked paper only seems to address the question directly for the case that $q$ is itself prime (in the notation of that reference, $\mu = 1$), since $\Bbb Z_{p^a} \not\cong \Bbb F_{p^a}$ for $p$ prime and $a > 1$.

In any case, the linked paper's formula simplifies substantially in the case that $q$ is prime (which we'll assume herein, as well as that $q > 2$), and in fact that case was resolved a few decades earlier in:

Carlitz, L. Representations by quadratic forms in a finite field. Duke Math. J. (1954) 21(1), 123–137. doi:10.1215/s0012-7094-54-02114-6

In particular, the coefficients $T_\beta(k, s) = T_\beta(k, 0)$ in the linked paper of Brent & McKay are identically $1$, as is the leading coefficient of equation (5.2) there. That equation gives the proportion $P(n, q)$ of symmetric $n \times n$ matrices over $\Bbb F_q$ that are nondegenerate, and there are $q^{{n + 1} \choose 2}$ symmetric matrices, so multiplying gives a general formula for the count $q^{{n + 1} \choose 2} P(n, q)$ that depends on the parity of $n$. (Unfortunately, the linked paper instead denotes the prime by $p$ and defines $q = \frac{1}{p}$. The below formulae are instead consistent with the question statement.)

  • If $n$ is even there are $$q^{{n + 1} \choose 2} \frac{\prod_{j = 1}^n (1 - q^{-j})}{\prod_{j = 1}^{n / 2} (1 - q^{-2 j})}$$ invertible, symmetric matrices over $\Bbb F_q$.
  • If $n$ is odd there are $$q^{{n + 1} \choose 2} (1 - q^{-n}) \frac{\prod_{j = 1}^{n - 1} (1 - q^{-j})}{\prod_{j = 1}^{(n - 1) / 2} (1 - q^{-2 j})} $$ invertible, symmetric matrices over $\Bbb F_q$.

In the special case that $n = 3$, there are $$(q^3 - 1) (q^3 - q^2) = q^6 - q^5 - q^3 + q^2$$ invertible, symmetric matrices over $\Bbb F_q$. A quick Maple script verifies this formula for $q = 3, 5, 7$. (This count is $\frac{1}{q^3 - q}$ times the number of invertible $3 \times 3$ matrices---not necessarily symmetric---over $\Bbb F_q$, and some meditation on that fact might suggest a slick way to produce the above formula.)