Proof (order of dihedral group)
First, we will show that $$ \mathrm D_{2n} \supseteq \{e,r,r^2,\ldots, r^{n-1},s,rs,r^2s, \ldots, r^{n-1}s\}. $$ Since for all $x,y\in\mathbb C$, $$\begin{align*} |r(x) - r(y)| &= |e^{2\pi i/n}x-e^{2\pi i/n}y| \\ &= |e^{2\pi i/n}||x-y| \\ &= |x-y|, \end{align*}$$ $r$ is an isometry. Also since $$ r(e^{2\pi ik/n}) = e^{2\pi i(k+1)/n}, $$ $r$ is closed in $X$. So $r\in \mathrm D_{2n}$.
Similarly checking the same things for $s$, we have $s\in \mathrm D_{2n}$.
Therefore the group generated by $r$ and $s$, namely $\{e,r,r^2,\ldots, r^{n-1},s,rs,r^2s, \ldots, r^{n-1}s\}$, is a subgroup of $\mathrm D_{2n}$.
Now we will show that $\mathrm D_{2n}$ is a subset of this set. For all $f\in\mathrm D_{2n}$, we will consider what $f$ does to three non-collinear points $$ x = 1,\quad y=e^{2\pi i/n},\quad z=e^{-2\pi i/n}. $$
Let $f(x) = e^{2\pi ik/n}$ for some $k = 0,1,2,\ldots,n-1$. Therefore $$ r^{-k}\circ f(x) = 1 = x. $$
Since $r^{-k}\circ f\in\mathrm D_{2n}$, it is an isometry, so $$ r^{-k}\circ f(y) \in \{y,z\}, $$ and also $$ r^{-k}\circ f(z) \in \{y,z\}. $$ But since $r^{-k}\circ f$ is a bijection, $r^{-k}\circ f(y)\neq r^{-k}\circ f(z)$.
So we have two cases:
-
$r^{-k}\circ f(y) = y$ and $r^{-k}\circ f(z) = z$; or
-
$r^{-k}\circ f(y) = z$ and $r^{-k}\circ f(z) = y$.
-
In case 1, $r^{-k}\circ f$ fixes $x,y,z$, so by the three-point lemma, $$ r^{-k}\circ f = \mathrm{Id}_X $$ so $$ f = r^k. $$
-
In case 2, we have $$\begin{align*} r^{-k}\circ f(x) &= 1 = s(x) \\ r^{-k}\circ f(y) &= z = s(y) \\ r^{-k}\circ f(z) &= y = s(z), \end{align*}$$ so $s^{-1}\circ r^{-k}\circ f$ fixes $x,y,z$. Again by the three-point lemma, $$\begin{align*} s^{-1}\circ r^{-k}\circ f &= \mathrm{Id}_X \\ r^{-k}\circ f &= s \\ f &= r^{-k}\circ s. \end{align*}$$
Hence $\mathrm D_{2n} = \{e,r,r^2,\ldots, r^{n-1}, s,rs,r^2s, \ldots, r^{n-1}s \}$.
To show that $|\mathrm D_{2n}| = 2n$, we need to check that all the elements on our list are distinct. For all $k,l=0,1,2,\ldots,n-1$,
-
If $r^k=r^l$, then $$ e^{2\pi ik/n} = r^k(1) = r^l(1) = e^{2\pi il/n}, $$ so $k=l$.
-
If $r^k = s$, then $$ e^{2\pi ik/n} = r^k(1) = s(1) = 1 $$ so $k=0$, but then $s = r^0 = e$, which is a contradiction.
-
If $r^k = r^l s$, then $$ r^{k-l} = s, $$ which by the above is a contradiction.
-
If $r^k s = r^l s$, then multiplying by $s^{-1}$ on both sides gives $$ r^k = r^l, $$ which by the above results in $k=l$.