# Number of Symmetric matrices of fix rank over finite fields

This might be a question that shouldn't be asked here. But I need some help. I want to count the number of $n\times n$ symmetric matrices over the finite field $\mathbb{F}_q$ and rank $r$. I found the following note

http://www.math.clemson.edu/~kevja/REU/2004/SymmetricRankRMatrices.pdf

But I think the formula given here is not correct. For example, it says that the number of symmetric matrices of rank $n$ is given by $$q^{{n \choose 2}}\prod\limits_{j=0}^s\left(1-(\frac{1}{q})^{2j-1}\right)$$

where $s=\lfloor{\frac{n}{2}}\rfloor$. But this is not matching with the simplest case, i.e. when $n=1$. Is there any other reference?

## 1 Answer

The number of symmetric matrices of a given rank over a finite field is computed in Theorem 2 in the following article.

In particular, the number of symmetric $n\times n$ matrices of full rank with entries in $\mathbb{F}_q$ is equal to $$q^{\binom{n+1}{2}}\prod_{1\leq i\leq n\atop i \, odd}\left(1-\frac{1}{q^i}\right).$$

This number agrees with the formula in the the linked REU article modulo a typo.

• For some further information and references, see the solution to Exercise 1.198 of Enumerative Combinatorics, vol. 1, second ed. – Richard Stanley Feb 12 '18 at 17:32
• Thanks. The article of MacWilliams seems interesting. I did not know about it. – Singh Feb 13 '18 at 14:14
• @Singh If this answer is sufficient for you, then you can accept it, so that people reading MathOverflow will know that the question doesn't still need to be answered. – Zach Teitler Aug 24 '18 at 16:44
• @Zach Teitler Yes, the given answers are sufficient. I apologize as I did not know I had to accept it. – Singh Aug 27 '18 at 8:55
• @Singh I think Zach Teitler is referring to the formal process of accepting answers. – Philipp Lampe Aug 28 '18 at 9:57