TITLE: Order of matrices in $GL_2(\mathbb{Z})$
QUESTION [25 upvotes]: Let $A\in GL_2\left(\mathbb{Z}\right)$, the group of invertible matrices with integer coefficients, and denote by $\omega(A)$ the order of $A$.
How we prove that
$$\left\{\omega(A);A\in GL_2\left(\mathbb{Z}\right)\right\}=\{1,2,3,4,6,\infty\}.$$

REPLY [3 votes]: Suppose $A\in\mathrm{GL}_2(\mathbb Q)$ has order $n$. Clearly, there is a degree-$2$ extension $\mathbb Q(\sqrt d)/\mathbb Q$ such that $A\in\mathrm{GL}_2(\mathbb Q(\sqrt d))$ is diagonalizable, say $PAP^{-1}=\begin{bmatrix}a & c\\&b\end{bmatrix}$ for $P\in\mathrm{GL}_2(\mathbb Q(\sqrt d))$.
Since this matrix has order $n$ (conjugation doesn't change the order), we must have $a^n=b^n=1$. Thus, the multiplicative group $\langle a,b\rangle\subseteq \mathbb Q^\times$ is $\langle\zeta_n\rangle$, so we must have $\mathbb Q(a,b)=\mathbb Q(\zeta_n)\subseteq\mathbb Q(\sqrt d)$. However, since $\mathrm{Gal}(\mathbb Q(\zeta_n)/\mathbb Q)\cong(\mathbb Z/n)^\times$, the extension $\mathbb Q(\zeta_n)/\mathbb Q$ has degree $\varphi(n)$. Thus, we obtain $\varphi(n)=[\mathbb Q(\zeta_n):\mathbb Q]\le[\mathbb Q(\sqrt d):\mathbb Q]=2$.
To summarize, we need $\varphi(n)\le2$, which can only happen for $n\in\{1,2,3,4,6\}$.