Solution (source code)

= Solution

For $M=\begin{pmatrix}a&b\\c&d\end{pmatrix}$ in the <special linear group over a finite field>, define the <Möbius transformation> $M\cdot x=(ax+b)/(cx+d)$ when the denominator is nonzero, and set $M\cdot x=\infty$ when it is zero. At the extra point, $M\cdot\infty=a/c$ for $c\ne0$, and $M\cdot\infty=\infty$ for $c=0$. <Determinant> one prevents simultaneous zero numerator and denominator.

The <orbit-stabiliser theorem> states $|G\cdot x|=[G:G_x]$, and for a <finite group> $|G|=|G\cdot x||G_x|$. The matrix $\begin{pmatrix}t&-1\\1&0\end{pmatrix}$ sends infinity to any chosen $t\in\mathbb F_p$, so \b[the orbit of infinity is the whole <projective line>], of size $p+1$. Its <stabilizer subgroup> is
$$
\boxed{G_\infty=\left\{\begin{pmatrix}a&b\\0&a^{-1}\end{pmatrix}:a\in\mathbb F_p^*,\ b\in\mathbb F_p\right\},}
$$
which has $p(p-1)$ elements. Consequently
$$
\boxed{|\mathrm{SL}_2(p)|=(p+1)p(p-1)=p(p^2-1).}
$$
The <SL2 action on a finite projective line> need not be faithful: scalar matrices can fix every projective point. Faithfulness is not needed for this orbit calculation.