TITLE: Order of group $GL_{2}\left( \mathbb{F}_{p}\right) $
QUESTION [6 upvotes]: I'm having a hard time counting. I need to count the number of elements for
the multiplicative group of invertible $2\times 2$ matrices $GL_{2}\left( \mathbb{F}_{p}\right) $
with elements from the field $\mathbb{F}_{p}$ where $p$ is any prime number.
David S. Dummit and Richar M. Foote's Abstract Algebra (3rd edition) has a
solution on page 413 but that approach is by counting the possible number of
basis of vector spaces but I wanted to see if there was a direct way. The
book says that $\left\vert GL_{n}\left( \mathbb{F}_{p}\right) \right\vert
=\left( p^{n}-1\right) \left( p^{n}-p\right) ...\left( p^{n}-p^{n-1}\right) $
so my case reduces to $p^{4}-p^{3}-p^{2}+p$. For any matrix $\left( 
\begin{array}{cc}
a & b \\ 
c & d%
\end{array}%
\right) $ with $a,b,c,d\in \mathbb{F}_{p}$, I understand that $p^{4}$ is the
total number of 2x2 matrices and that we need to subtract the possible
combinations for $ad=bc$ (non-invertible elements) but I can't account for
the rest. In particular, that plus sign is absolutely baffling. Any hint
would be appreciated. I'd then take this up for the general $n$x$n$ case but
first I need to dispose the 2x2 case.
P.S. I tried looking for a pre-existing answer and a related answer is present here but it's by the same approach as the book and I'd like to have an approach without resorting to linear independence. This answer, too, was a case for $p=3$ but I couldn't see the pattern.

REPLY [12 votes]: How many quadruples $(a,b,c,d)$ are there in which $ad=bc$?
Case 1, $a=0$.  Then $d$ is arbitrary and $b$ or $c$, or both, must be zero.  There are $p$ choices for $d$ and $2p-1$ for $b$ and $c$.
Case 2, $a\ne0$.  Then $b,c$ are arbitrary and $d=bc/a$.  There are $p-1$ choices for $a$ and $p^2$ for $b$ and $c$.
Total,
$$p(2p-1)+(p-1)p^2=p^3+p^2-p\ ,$$
and as you have already pointed out you must now subtract this from $p^4$.
BTW for the general case I doubt that you will be able to avoid the argument involving linear independence.