When do $2\times2$ matrices generate a finite semigroup? Let $A_i$, $i=1,\ldots, k$, be $2\times2$ real-valued matrices with determinant 1 or -1. Under what circumstances is the semigroup generated by these matrices finite? I can see that this will be the case if there exists $P \in GL(2,\mathbb{R})$ such that $P A_i P^{-1}$ is orthogonal with rational angles for every $i$. Is this the only possibility?
 A: In fact, it is generally true that any finite subgroup $G \subset GL(n,\Bbb R)$ will be contained in the group $O(n,\Bbb R)$ of orthogonal matrices. To see that this is the case, it suffices to consider the inner product
$$
\langle x,y \rangle = \sum_{g \in G} (gx)^T(gy).
$$
This inner product is group-invariant, which is to say that $\langle gx, gy \rangle = \langle x,y \rangle$ for all $g \in G$ and $x,y \in \Bbb R^n$. If we select $P$ to be an isomorphism between $(\Bbb R^n,\langle \cdot,\cdot,\rangle)$ and $\Bbb R^n$ with the standard inner product, we find that the matrices $P^{-1}gP$ are indeed inner-product preserving and hence orthogonal.
For a more concrete approach, note that
$$
\langle x,y \rangle = \sum_{g \in G} (gx)^T(gy) = x^T\left(\sum_{g \in G}g^Tg\right)y.
$$
Because $\sum_{g \in G}g^Tg$ is positive definite, we may select an invertible $P$ such that $P^TP = \sum_{g \in G}g^Tg$. We note that for any $g \in G$,
$$
[(PgP^{-1})x]^T[(PgP^{-1})y] = x^TP^{-T}[g^TP^TPg]P^{-1}y
\\ = x^TP^{-T}P^TPP^{-1}y = x^Ty,
$$
so that the elements $PgP^{-1}$ are indeed orthogonal.
