TITLE: Number of bases of an n-dimensional vector space over q-element field.
QUESTION [7 upvotes]: If I have an n-dimensional vector space over a field with q elements, how can I find the number of bases of this vector space?

REPLY [18 votes]: There are $q^n-1$ ways of choosing the first element, since we can't choose zero. The subspace generated by this element has $q$ elements, so there are $q^n-q$ ways of choosing the second element. Repeating this process, we have $$(q^n-1)(q^n-q)\cdots(q^n-q^{n-1})$$ for the number of ordered bases. If you want unordered bases, divide this by $n!$.