Another special type of permutation group is the dihedral group. Recall the symmetry group of an equilateral triangle in Chapter 3. Such groups consist of the rigid motions of a regular $n$-sided polygon or $n$-gon. For $n = 3, 4, \ldots$, we define the nth dihedral group to be the group of rigid motions of a regular $n$-gon. We will denote this group by $D_n$. We can number the vertices of a regular $n$-gon by $1, 2, \ldots, n$ (Figure 5.19). Notice that there are exactly $n$ choices to replace the first vertex. If we replace the first vertex by $k$, then the second vertex must be replaced either by vertex $k+1$ or by vertex $k-1$; hence, there are $2n$ possible rigid motions of the $n$-gon. We summarize these results in the following theorem.
The group of rigid motions of a square, $D_4$, consists of eight elements. With the vertices numbered 1, 2, 3, 4 (Figure 5.25), the rotations are \begin{align*} r & = (1234)\\ r^2 & = (13)(24)\\ r^3 & = (1432)\\ r^4 & = (1) \end{align*} and the reflections are \begin{align*} s_1 & = (24)\\ s_2 & = (13). \end{align*} The order of $D_4$ is 8. The remaining two elements are \begin{align*} r s_1 & = (12)(34)\\ r^3 s_1 & = (14)(23). \end{align*}
We can investigate the groups of rigid motions of geometric objects other than a regular $n$-sided polygon to obtain interesting examples of permutation groups. Let us consider the group of rigid motions of a cube. One of the first questions that we can ask about this group is “what is its order?” A cube has 6 sides. If a particular side is facing upward, then there are four possible rotations of the cube that will preserve the upward-facing side. Hence, the order of the group is $6 \cdot 4 = 24$. We have just proved the following proposition.