---
title: Dihedral and Symmetric Groups
module: Groups and Symmetry
moduleNumber: 2
lessonNumber: 2
order: 202
summary: >
  The dihedral group D_{2n} is the symmetries of a regular n-gon, generated by a
  rotation r and a reflection s subject to three relations. The symmetric group
  S_n is all permutations of n objects, written in cycle notation. Orders,
  generators and relations, cycle decomposition, the order of a permutation from
  its cycle type, and the parity that splits S_n in half.
topics: [Groups and Symmetry]
sources:
  - book: Dummit & Foote
    ref: "Ch. 1 — Introduction to Groups; §1.2 Dihedral Groups, §1.3 Symmetric Groups"
  - book: Judson
    ref: "Ch. 5 — Permutation Groups; §5.1 Definitions and Notation"
draft: false
---

Two families of finite nonabelian groups supply nearly every example in the first
half of the subject: the dihedral groups, the symmetries of regular polygons, and
the symmetric groups, all rearrangements of a finite set. Both admit compact
descriptions — the dihedral groups through two generators and three relations, the
symmetric groups through cycle notation — and both test the abstract
[group axioms](/abstract-algebra/groups-and-symmetry/group-axioms-and-first-examples)
against noncommutative structure.

## The dihedral group

Fix an integer $n \ge 3$. A **symmetry** of a regular $n$-gon is a rigid motion
that carries the polygon onto itself: pick up a copy, move it through space, and
set it back so it exactly covers the original.

> **Definition (Dihedral group).** For $n \ge 3$, the **dihedral group** $D_{2n}$
> is the set of all symmetries of a regular $n$-gon, with the operation of
> composition (apply the right motion first). Its order is $|D_{2n}| = 2n$, which
> is why the subscript records $2n$ rather than $n$.

Label the vertices $1, 2, \dots, n$ clockwise. Each symmetry $s$ is determined by
where it sends the vertices, so it corresponds to a permutation of the labels;
composition of symmetries corresponds to composition of these permutations, which
is associative. The identity motion fixes every vertex, and every motion reverses,
so the axioms hold.[^df-dih]

### Counting the symmetries

The count $2n$ comes from a two-step choice. A symmetry can send vertex $1$ to any
of the $n$ positions. Once vertex $1$ is placed, vertex $2$ (its neighbor) must go
to one of the two positions adjacent to it, and both are achievable — one by a
rotation, the other by following with a reflection. After the images of the
adjacent pair $1, 2$ are fixed, rigidity determines the rest. So there are exactly
$n \cdot 2 = 2n$ symmetries: $n$ rotations and $n$ reflections.

$$
% caption: The regular pentagon with vertices labelled clockwise; r is the
% rotation by one fifth of a turn, and each dashed line is a reflection axis
% through a vertex and the midpoint of the opposite edge.
\begin{tikzpicture}[font=\small, >=stealth]
  \definecolor{acc}{HTML}{2A6F97}
  \foreach \i/\ang in {1/90, 2/18, 3/-54, 4/-126, 5/162}
    \coordinate (v\i) at (\ang:2.2);
  \draw[thick] (v1) -- (v2) -- (v3) -- (v4) -- (v5) -- cycle;
  \foreach \i/\pos in {1/above, 2/right, 3/below right, 4/below left, 5/left}
    \node[\pos] at (v\i) {$\i$};
  % reflection axes: vertex to opposite edge midpoint
  \draw[acc, dashed] (v1) -- ($(v3)!0.5!(v4)$);
  \draw[acc, dashed] (v2) -- ($(v4)!0.5!(v5)$);
  \draw[acc, dashed] (v3) -- ($(v5)!0.5!(v1)$);
  \draw[acc, dashed] (v4) -- ($(v1)!0.5!(v2)$);
  \draw[acc, dashed] (v5) -- ($(v2)!0.5!(v3)$);
  % rotation arrow
  \draw[->, thick, black] (66:1.0) arc (66:-6:1.0);
  \node[black] at (30:0.62) {$r$};
\end{tikzpicture}
$$

### Generators and relations

Let $r$ be the clockwise rotation through $2\pi/n$ radians and let $s$ be the
reflection across the axis through vertex $1$ and the center. Direct calculation
establishes the following facts.[^df-dih]

- $1, r, r^2, \dots, r^{n-1}$ are distinct and $r^n = 1$, so $|r| = n$.
- $|s| = 2$, and $s$ is not a power of $r$.
- Every element of $D_{2n}$ is $s^k r^i$ for a unique $k \in \{0, 1\}$ and
  $i \in \{0, 1, \dots, n-1\}$ — the $n$ rotations $r^i$ and the $n$ reflections
  $s r^i$.
- $rs = s r^{-1}$, and more generally $r^i s = s r^{-i}$.

The last relation is the one used in every computation: it says how to move an
$s$ past a power of $r$. Because $r$ and $s$ do not commute, $D_{2n}$ is
nonabelian for every $n \ge 3$. All of this compresses into a **presentation**:

$$
D_{2n} = \langle\, r, s \mid r^n = s^2 = 1,\ rs = sr^{-1} \,\rangle.
$$

> **Definition (Generators and relations).** A subset $S \subseteq G$ is a set of
> **generators**, written $G = \langle S \rangle$, if every element of $G$ is a
> finite product of elements of $S$ and their inverses. An equation the generators
> satisfy is a **relation**. A **presentation** $\langle S \mid R_1, \dots, R_m \rangle$
> lists generators and enough relations that every other relation is a consequence.

With the presentation in hand, every product reduces to the normal form $s^k r^i$
by pushing all $s$'s left and reducing exponents mod $n$. For example, in
$D_{24}$ ($n = 12$),

$$
(s r^9)(s r^6) = s (r^9 s) r^6 = s (s r^{-9}) r^6 = s^2 r^{-3} = r^{-3} = r^{9}.
$$

A presentation is delicate: relations can interact to collapse the group to
something smaller than expected, so a presentation alone does not reveal the
order. For $D_{2n}$ the collapse does not happen, because the geometry already
exhibits a group of order $2n$ satisfying the relations, pinning the order at
exactly $2n$.[^df-dih]

$$
% caption: The four axes of symmetry of a square: the two diagonals and the two
% perpendicular bisectors of opposite edges give the four reflections of D_8,
% which together with the four rotations make eight symmetries.
\begin{tikzpicture}[font=\small]
  \definecolor{acc}{HTML}{2A6F97}
  \coordinate (a) at (-1.7,1.7);
  \coordinate (b) at (1.7,1.7);
  \coordinate (c) at (1.7,-1.7);
  \coordinate (d) at (-1.7,-1.7);
  \draw[thick] (a) -- (b) -- (c) -- (d) -- cycle;
  \node[above left] at (a) {$1$};
  \node[above right] at (b) {$2$};
  \node[below right] at (c) {$3$};
  \node[below left] at (d) {$4$};
  % diagonals
  \draw[acc, dashed] (a) -- (c);
  \draw[acc, dashed] (b) -- (d);
  % edge bisectors
  \draw[acc, dashed] (0,2.3) -- (0,-2.3);
  \draw[acc, dashed] (-2.3,0) -- (2.3,0);
  \node[acc, font=\footnotesize, anchor=west] at (2.6,0.5) {2 diagonals};
  \node[acc, font=\footnotesize, anchor=west] at (2.6,-0.5) {2 edge bisectors};
\end{tikzpicture}
$$

The same counting principle computes the rotation groups of the Platonic solids:
find how many positions an adjacent pair of vertices can be sent to. A tetrahedron
gives $12$, a cube and an octahedron each $24$, a dodecahedron and an icosahedron
each $60$.

> **Worked example.** Work in $D_{16}$, the symmetries of the octagon, where
> $r^8 = s^2 = 1$ and $s r^i = r^{-i} s$. To reduce the product of two reflections
> $(r^3 s)(r^5 s)$, push the middle $s$ left past $r^5$:
>
> $$
> (r^3 s)(r^5 s) = r^3 (s r^5) s = r^3 (r^{-5} s) s = r^{3-5} s^2 = r^{-2} = r^{6},
> $$
>
> a rotation — the product of two reflections. The same relation shows every
> reflection $s r^i$ has order $2$:
>
> $$
> (s r^i)^2 = s (r^i s) r^i = s (s r^{-i}) r^i = s^2 r^{-i} r^i = 1.
> $$

## The symmetric group

Where dihedral groups permute the vertices of one polygon, symmetric groups
permute an arbitrary finite set with no geometric constraint.

> **Definition (Symmetric group).** For a nonempty set $\Omega$, the **symmetric
> group** $S_\Omega$ is the set of all bijections $\Omega \to \Omega$ (the
> **permutations** of $\Omega$) under composition. When $\Omega = \{1, 2, \dots, n\}$
> we write $S_n$, the **symmetric group of degree $n$**.

Composition of bijections is a bijection and is associative; the identity map is
the identity element; every bijection has an inverse. The elements of $S_n$ are
the permutations, not the numbers being permuted.

> **Theorem (Order of $S_n$).** $|S_n| = n!$.

> **Proof.** A permutation $\sigma$ may send $1$ to any of $n$ values, then $2$ to
> any of the remaining $n-1$, then $3$ to any of the remaining $n-2$, and so on.
> Multiplying the choices gives $n(n-1)\cdots 2 \cdot 1 = n!$ injective — hence, on
> a finite set, bijective — maps.[^df-sym]

### Cycle notation

Writing $\sigma$ as a table of values is unwieldy. **Cycle notation** records the
orbits of the map instead.

> **Definition (Cycle).** The **cycle** $(a_1\ a_2\ \cdots\ a_m)$ is the
> permutation sending $a_i \mapsto a_{i+1}$ for $i < m$, sending $a_m \mapsto a_1$,
> and fixing every other point. Its **length** is $m$; a cycle of length $m$ is an
> **$m$-cycle**. Two cycles are **disjoint** if they share no entries.

To read $\sigma$, trace each point forward until it returns. Take $n = 13$ and

$$
\sigma(1) = 12,\ \sigma(12) = 8,\ \sigma(8) = 10,\ \sigma(10) = 4,\ \sigma(4) = 1,
$$

which closes the cycle $(1\ 12\ 8\ 10\ 4)$; continuing with the smallest unused
label gives the full **cycle decomposition**

$$
\sigma = (1\ 12\ 8\ 10\ 4)(2\ 13)(5\ 11\ 7)(6\ 9),
$$

a product of pairwise disjoint cycles. The fixed point $3$ would be a $1$-cycle
$(3)$; by convention $1$-cycles are omitted, so an unwritten label is understood
to be fixed.

$$
% caption: A permutation of thirteen points decomposes into disjoint cycles, one
% closed loop per orbit; every point returns to its start after one trip round
% its own cycle, and fixed points are loops of length one.
\begin{tikzpicture}[font=\small, >=stealth,
  v/.style={circle, draw, minimum size=6.5mm, inner sep=0pt}]
  \definecolor{acc}{HTML}{2A6F97}
  % 5-cycle
  \foreach \lab/\ang in {1/90, 12/18, 8/-54, 10/-126, 4/162}
    \node[v] (a\lab) at ($(-4,0)+(\ang:1.05)$) {$\lab$};
  \foreach \i/\j in {1/12, 12/8, 8/10, 10/4, 4/1}
    \draw[->, acc] (a\i) to[bend left=16] (a\j);
  % 3-cycle
  \foreach \lab/\ang in {5/90, 11/-30, 7/210}
    \node[v] (b\lab) at ($(-0.2,0.1)+(\ang:0.95)$) {$\lab$};
  \foreach \i/\j in {5/11, 11/7, 7/5}
    \draw[->, acc] (b\i) to[bend left=16] (b\j);
  % 2-cycles
  \node[v] (c2) at (2.6,0.7) {$2$};
  \node[v] (c13) at (2.6,-0.7) {$13$};
  \draw[->, acc] (c2) to[bend left=22] (c13);
  \draw[->, acc] (c13) to[bend left=22] (c2);
  \node[v] (d6) at (4.4,0.7) {$6$};
  \node[v] (d9) at (4.4,-0.7) {$9$};
  \draw[->, acc] (d6) to[bend left=22] (d9);
  \draw[->, acc] (d9) to[bend left=22] (d6);
\end{tikzpicture}
$$

### Multiplying permutations

Products are computed by tracing a point through both maps, right to left. For
$(1\ 2\ 3) \circ (1\ 2)(3\ 4)$: the right factor sends $1 \mapsto 2$, then the
left sends $2 \mapsto 3$, so the composite sends $1 \mapsto 3$. Continuing yields
$(1\ 2\ 3) \circ (1\ 2)(3\ 4) = (1\ 3\ 4)$. Order matters:

$$
(1\ 2) \circ (1\ 3) = (1\ 3\ 2), \qquad (1\ 3) \circ (1\ 2) = (1\ 2\ 3),
$$

so $S_n$ is nonabelian for every $n \ge 3$. Two structural facts make cycle
notation efficient: disjoint cycles **commute** (they move disjoint sets of
points), and the entries within a single cycle may be **rotated** without
changing the permutation, e.g. $(1\ 2\ 3\ 4) = (3\ 4\ 1\ 2)$.

$$
% caption: Composing two permutations by tracing each label right-to-left through
% the lower map and then the upper; the composite label is read off the top row.
\begin{tikzpicture}[font=\small, >=stealth, x=13mm, y=13mm]
  \definecolor{acc}{HTML}{2A6F97}
  % three rows of four dots: input (bottom), middle, output (top)
  \foreach \i in {1,2,3,4} {
    \node[circle, draw, minimum size=5mm, inner sep=0] (in\i) at (\i,0) {$\i$};
    \coordinate (mid\i) at (\i,1.4);
    \node[circle, draw, minimum size=5mm, inner sep=0] (out\i) at (\i,2.8) {$\i$};
    \fill (mid\i) circle (1.4pt);
  }
  \node[anchor=east, font=\footnotesize] at (0.5,0) {apply $(1\ 2)(3\ 4)$};
  \node[anchor=east, font=\footnotesize] at (0.5,1.4) {then};
  \node[anchor=east, font=\footnotesize] at (0.5,2.8) {apply $(1\ 2\ 3)$};
  % lower map (1 2)(3 4): 1->2,2->1,3->4,4->3
  \draw[->, black] (in1) -- (mid2);
  \draw[->, black] (in2) -- (mid1);
  \draw[->, black] (in3) -- (mid4);
  \draw[->, black] (in4) -- (mid3);
  % upper map (1 2 3): 1->2,2->3,3->1,4->4
  \draw[->, acc] (mid1) -- (out2);
  \draw[->, acc] (mid2) -- (out3);
  \draw[->, acc] (mid3) -- (out1);
  \draw[->, acc] (mid4) -- (out4);
\end{tikzpicture}
$$

### Order from cycle type

The order of a permutation is legible in its decomposition.

> **Theorem (Order of a permutation).** The order of $\sigma \in S_n$ is the least
> common multiple of the lengths of the cycles in its cycle decomposition.

> **Proof sketch.** An $m$-cycle has order $m$, since it takes $m$ applications to
> return every entry to its start. Disjoint cycles commute, so a power $\sigma^k$ is
> the identity exactly when $k$ is a multiple of every cycle length at once, i.e. a
> multiple of their least common multiple.[^df-sym] For the $\sigma$ above, with
> cycle lengths $5, 2, 3, 2$, the order is $\operatorname{lcm}(5, 2, 3, 2) = 30$.

## Parity and the alternating group

A single transposition — a $2$-cycle — is the atom of $S_n$. Any $m$-cycle
factors into transpositions,

$$
(a_1\ a_2\ \cdots\ a_m) = (a_1\ a_m)(a_1\ a_{m-1}) \cdots (a_1\ a_2),
$$

so every permutation is a product of transpositions.[^judson-perm] The
factorization is far from unique: the identity is both $(1\ 2)(1\ 2)$ and
$(1\ 3)(2\ 4)(1\ 3)(2\ 4)$. One invariant is nonetheless well defined.

> **Theorem (Parity).** No permutation is simultaneously a product of an even
> number and of an odd number of transpositions. A permutation is **even** if it
> is a product of an even number of transpositions and **odd** otherwise; parity
> is well defined.

The proof rests on a lemma: if the identity equals a product of $r$ transpositions,
then $r$ is even. One shows that the leftmost repeated symbol can always be pushed
right or cancelled, reducing $r$ by two at a time until an obvious cancellation
remains, so $r$ can never be odd.[^judson-perm] Since every permutation has a
fixed parity, the assignment $\sigma \mapsto (\text{parity of } \sigma)$ splits
$S_n$ cleanly in two.

> **Definition (Alternating group).** The **alternating group** $A_n$ is the set
> of even permutations in $S_n$. It is closed under products and inverses, and for
> $n \ge 2$ it contains exactly half of $S_n$, so $|A_n| = n!/2$.

$$
% caption: Parity splits the symmetric group into two equal halves; the even
% permutations form the alternating group, and composing across the divide flips
% parity while composing within it preserves parity.
\begin{tikzpicture}[font=\small]
  \definecolor{acc}{HTML}{2A6F97}
  \draw[thick] (-3.4,-1.3) rectangle (3.4,1.3);
  \draw[thick] (0,-1.3) -- (0,1.3);
  \fill[acc!12] (-3.4,-1.3) rectangle (0,1.3);
  \node[align=center] at (-1.7,0.5) {\textbf{even}};
  \node[align=center, font=\footnotesize] at (-1.7,-0.2) {the group $A_n$\\ size $\frac{n!}{2}$};
  \node[align=center] at (1.7,0.5) {\textbf{odd}};
  \node[align=center, font=\footnotesize] at (1.7,-0.2) {a transposition\\ times $A_n$};
  \node[font=\footnotesize, anchor=north] at (0,-1.7) {each half has $\frac{n!}{2}$ permutations};
\end{tikzpicture}
$$

> **Worked example.** In $S_6$, let $\sigma = (1\ 3\ 5\ 2)(4\ 6)$ and
> $\tau = (1\ 2\ 4)(3\ 6)$. Trace each label through the product $\sigma\tau$
> (apply $\tau$ first, then $\sigma$):
>
> $$
> 1 \mapsto 1,\quad 2 \mapsto 6,\quad 3 \mapsto 4,\quad 4 \mapsto 3,\quad 5 \mapsto 2,\quad 6 \mapsto 5,
> $$
>
> so $\sigma\tau = (2\ 6\ 5)(3\ 4)$, fixing $1$. Its order is
> $\operatorname{lcm}(3, 2) = 6$. As transpositions,
> $(2\ 6\ 5)(3\ 4) = (2\ 5)(2\ 6)(3\ 4)$ — three factors, so $\sigma\tau$ is odd.

## Comparing the two families

| | $D_{2n}$ | $S_n$ |
| --- | --- | --- |
| Elements | symmetries of a regular $n$-gon | all permutations of $n$ labels |
| Order | $2n$ | $n!$ |
| Generators | $r$ (rotation), $s$ (reflection) | transpositions, e.g. $(1\ 2), \dots, (n{-}1\ n)$ |
| Abelian? | no (for $n \ge 3$) | no (for $n \ge 3$) |
| Relation to each other | $D_{2n}$ embeds in $S_n$ via the vertex action | contains every $D_{2n}$ as a subgroup |

For $n = 3$ the two families coincide: $|D_6| = 6 = 3! = |S_3|$, and every
permutation of three vertices is realized by a symmetry of the triangle, so
$D_6 \cong S_3$. For $n \ge 4$ the polygon is too rigid to realize every
permutation, and $|D_{2n}| = 2n < n! = |S_n|$. The precise sense in which one
group "sits inside" or "equals" another is
[homomorphism and isomorphism](/abstract-algebra/groups-and-symmetry/homomorphisms-and-group-actions),
and the vertex-permutation correspondence used here is an instance of a
[group action](/abstract-algebra/groups-and-symmetry/homomorphisms-and-group-actions).

[^df-dih]: **Dummit & Foote**, _Abstract Algebra_, §1.2 — the dihedral group of order $2n$, the count of symmetries, the generators $r, s$ with relations $r^n = s^2 = 1$ and $rs = sr^{-1}$, presentations, and the rotation groups of the Platonic solids.
[^df-sym]: **Dummit & Foote**, _Abstract Algebra_, §1.3 — the symmetric group, $|S_n| = n!$, the cycle decomposition algorithm, disjoint cycles commuting, and the order of a permutation as the least common multiple of its cycle lengths.
[^judson-perm]: **Judson**, _Abstract Algebra: Theory and Applications_, §5.1 — transpositions, factoring cycles into transpositions, the well-definedness of parity (the identity is a product of an even number of transpositions), and the alternating group $A_n$.
