# How many elements are there in the group of invertible $2\times 2$ matrices over the field of seven elements?

How many elements are there in the group of invertible $2\times 2$ matrices over the field of seven elements?

Sorry I have no idea so nothing to say? Any clue!

An $n\times n$ matrix over a field is invertible if and only if its rows are linearly independent. So a $2\times 2$ matrix is invertible if and only if neither row is a scalar multiple of the other; in particular, if the first row is nonzero, the matrix is invertible if and only if the second row is not a scalar multiple of the first row.
Now, how many possibilities are there for the first row? As many as there are nonzero vectors in $(\mathbb{F}_7)^2$.
Having chosen the first row, how many possibilities are there for the second row? As many as there are vectors in $(\mathbb{F}_7)^2$ that are not in the span of the first row; the first row has <fill in the blank> scalar multiples, so that gives <finish the problem>.
For bonus points: using the above method, determine the number of $n\times n$ invertible matrices with coefficients in $\mathbb{F}_q$.