1

Given an odd prime, p, and integers n and m, I would like to quickly list all invertible m x m matrices whose entries come from the finite field of size p^n. What is an efficient way to do this?

I could list all possible (p^n)^(m x m) matrices and filter for those with non-zero determinant, but this seems wasteful since it involves calculating many determinants.

By listing all lower-diagonal (L), diagonal (D), and upper diagonal matrices (U), I can list matrices with factorization LDU, but these will never have zeros on the diagonal.

Is there a simple and efficient way to list all invertible square matrices whose entries come from a finite field?

Thank you!

1 Answers1

1

I don't think filtering all matrices is a bad strategy. The fraction of nonsingular matrices is

(1 - q) (1 - q^2) ... (1 - q^m) > 1 - q - q^2 - ... - q^m > 1 - q/(1 - q),

where q = 1/(p^n). Unless p^n = 2, that's at least half of them (and I bet we could get a better bound for p^n = 2).

That being said you could do partial Gaussian elimination with each incoming row as you traverse down the search tree, which would save a factor of Theta(m) field operations.

David Eisenstat
  • 64,237
  • 7
  • 60
  • 120