# # of invertible $n \times n$ matrices with entries in field $k$ with $q$ elements? [duplicate]

What is the number of invertible $n \times n$ matrices with entries in a field $k$ with $q$ elements?

## marked as duplicate by André 3000, mrf, vonbrand, TravisJ, Community♦Sep 15 '15 at 23:56

The row vectors of such a matrix have to be linear independent. For the first row we have $q^n-1$ possibilities. For the next row there are $q^n-q$ left and so on. So we get for the total number $$\prod_{i=0}^{n-1} (q^n -q^i) = q^{\frac{n(n-1)}{2}} \prod_{i=1}^{n} (q^i -1).$$