Two-dimensional representations of a finite dihedral group (source code)

= Two-dimensional representations of a finite dihedral group

For $\omega=e^{2\pi i/n}$ and $1\leq j<n/2$, define
$$
r\longmapsto
\begin{pmatrix}\omega^j&0\\0&\omega^{-j}\end{pmatrix},
\qquad
s\longmapsto
\begin{pmatrix}0&1\\1&0\end{pmatrix}.
$$
These representations are irreducible and pairwise nonisomorphic. They give all two-dimensional irreducibles: $(n-1)/2$ of them for odd $n$, and $n/2-1$ for even $n$.