For $n \ge 3$ the symmetries of the regular $n$-gon form the dihedral group $D_n$ of order $2n$. With the corners numbered by $\mathbb{Z}_n$, every symmetry is a rotation $x \mapsto x + k$ or a reflection $x \mapsto k - x$. The rotation $r$ and the reflection $s$ generate $D_n$, with $r^n = s^2 = 1$ and $sr = r^{-1}s$, and every product follows the rule $(r^a s^i)(r^b s^j) = r^{a + (-1)^i b} s^{i + j}$; $D_n$ is nonabelian. The rotation $r^k$ has order $n/\gcd(n, k)$ and every reflection has order 2, so $D_n$ has $n$ elements of order 2 for odd $n$ and $n + 1$ for even $n$. For odd $n$ every mirror line passes through one corner; for even $n$, half pass through two corners and half through none. Two reflections compose to a rotation through twice the angle between their lines.
A stop sign is a regular octagon. Take one that has been unbolted from its post, lift it, move it about, and lay it back in its outline. The motions that end with the sign covering the outline exactly, regarded only for where they leave it, are its symmetries. Turning it through any multiple of 45 degrees works, which gives eight. Flipping it over about a line through the center also works, provided the line passes through two opposite corners or through the midpoints of two opposite sides. That gives eight more. This article proves that these sixteen motions are all of them, and gives the rule for combining two of them.
The motions can be combined, one after another, and each can be undone, so by the definition they form a group. It is the dihedral group $D_8$. The regular polygon with $n$ sides has in the same way a dihedral group $D_n$ with $2n$ elements. The dihedral groups are the simplest nonabelian groups to picture, and also the simplest to compute in, because a single idea does all the work. Number the corners $0, 1, \ldots, n - 1$ around the polygon and treat the numbers as elements of $\mathbb{Z}_n$. Every rotation then adds a constant, every reflection subtracts from a constant, and composing symmetries becomes arithmetic modulo $n$.
First we prove that there are exactly $2n$ symmetries. Then we derive the rules for multiplying them from two generators, and read off the Cayley table and the orders of elements. Finally we locate the mirror lines and describe the symmetries as matrices and as permutations of the corners. The stop sign, the octagon, is the running example throughout.
This is the second article of Groups, and it assumes the definition and the order of an element from Groups: Definition and First Examples. The course text introduces the symmetries of the square and the dihedral groups among the examples of §7.1 (Hungerford, 2014). Judson (2026, §5.2) treats them as permutation groups.
Symmetries of a regular polygon
Fix $n \ge 3$ and let $P$ be the regular $n$-gon centered at the origin of the plane with vertices
$$v_k = \left(\cos \tfrac{2\pi k}{n}, \; \sin \tfrac{2\pi k}{n}\right), \qquad k = 0, 1, \ldots, n - 1,$$
numbered counterclockwise. Vertex labels are read modulo $n$, so that vertex $n$ is vertex 0 and vertex $-1$ is vertex $n - 1$; the neighbors of vertex $k$ are $k + 1$ and $k - 1$. A symmetry of $P$ is a distance-preserving map of the plane onto itself that carries $P$ onto $P$. The symmetries of $P$ form a group under composition (see groups of transformations), called the dihedral group $D_n$. The product $fg$ of two symmetries is the composite $f \circ g$: first $g$, then $f$.
Two kinds of symmetry are visible at once.
- Rotations about the origin through the angles $2\pi k/n$, for $k = 0, 1, \ldots, n - 1$. The rotation through $2\pi k/n$ moves each vertex $k$ places counterclockwise, so it sends vertex $x$ to vertex $x + k$.
- Reflections in the lines through the origin at the angles $\pi k/n$, for $k = 0, 1, \ldots, n - 1$. Reflection in the line at angle $\alpha$ sends the point at angle $\theta$ on the unit circle to the point at angle $2\alpha - \theta$; with $\alpha = \pi k/n$ it sends $v_x$, at angle $2\pi x/n$, to the point at angle $2\pi(k - x)/n$, which is $v_{k - x}$.
These are $2n$ maps, and each carries the set of vertices onto itself: $x \mapsto x + k$ and $x \mapsto k - x$ are bijections of $\mathbb{Z}_n$, undone by $x \mapsto x - k$ and by $x \mapsto k - x$ itself. Each is a linear map, and the polygon is the set of weighted averages of its vertices, which a linear map carries to the weighted averages of their images. Hence each carries the polygon onto itself. Could some cleverer motion be a symmetry too? The theorem below shows that there are no others.
Here is the idea. A symmetry is pinned down by where it puts vertices 0 and 1, and two neighbors can only go to two neighbors, which leaves $n \cdot 2$ choices. Two geometric facts make this precise.
Symmetries are determined by two vertices. The proof needs one fact from plane geometry, which is taken as known. Every distance-preserving map of the plane has the form $y \mapsto Ay + c$ for an invertible $2 \times 2$ matrix $A$ and a vector $c$, and one that fixes the origin is linear (Judson, 2026, §12.2 and Lemma 12.2.2). Such a map carries line segments onto line segments. The vertices of $P$ are its corners, the points of $P$ that do not lie strictly inside a segment joining two other points of $P$. A symmetry $f$ of $P$ carries $P$ onto $P$ and segments onto segments, and so does its inverse $f^{-1}$, which is also a symmetry. So $f$ carries vertices to vertices. Suppose a vertex $v$ had an image $f(v)$ lying strictly inside a segment joining two other points of $P$. Applying $f^{-1}$ would put $v$ strictly inside the segment joining their images, which are two other points of $P$, and $v$ would not be a corner.
A further consequence is that every symmetry $f$ of $P$ fixes the center. The map $f$ permutes the vertices, and a map of the form $y \mapsto Ay + c$ sends the average of points to the average of their images. So it sends the average of the vertices to the average of the same vertices in another order, which is the same point. That point is the origin. The rotation through $2\pi/n$ is linear and permutes the vertices, so it too sends their average to itself. That rotation fixes no point of the plane except the origin: it moves a point at angle $\theta$ and positive distance from the origin to the point at angle $\theta + 2\pi/n$ at that distance, a different point because $0 < 2\pi/n < 2\pi$. So every symmetry $f$ fixes the origin, and $f$ is linear. A linear map of the plane is determined by its values on two vectors that are not multiples of each other, here $v_0$ and $v_1$. A symmetry is therefore determined by where it sends vertices 0 and 1.
Symmetries preserve adjacency. Two vertices are neighbors exactly when their distance is the side length of $P$, the smallest distance between distinct vertices, and distances are preserved. In detail, two vertices that are $d$ places apart around the polygon, with $1 \le d \le n/2$, subtend the angle $2\pi d/n$ at the center, so their distance is the chord $2\sin(\pi d/n)$. The angle $\pi d/n$ lies between 0 and $\pi/2$, where the sine increases, so the distance is smallest exactly when $d = 1$.
Theorem. For $n \ge 3$ the dihedral group $D_n$ has exactly $2n$ elements. Each symmetry acts on the vertex labels by one of the maps
$$x \mapsto x + k \quad \text{or} \quad x \mapsto k - x \qquad (\text{modulo } n),$$
for some $k$ in $\{0, 1, \ldots, n - 1\}$; the first is the rotation through $2\pi k/n$ and the second is the reflection in the line at angle $\pi k/n$.
Proof. Let $f$ be a symmetry and let $\phi$ be the permutation of $\mathbb{Z}_n$ it induces, $f(v_x) = v_{\phi(x)}$. Put $k = \phi(0)$. Since vertex 1 is a neighbor of vertex 0, $\phi(1)$ is a neighbor of $k$, so $\phi(1) = k + 1$ or $\phi(1) = k - 1$; these are different vertices because $n \ge 3$.
Suppose $\phi(1) = k + 1$. Then $\phi$ agrees with the map $x \mapsto x + k$ at 0 and at 1, and so $f$ agrees with the rotation through $2\pi k/n$ at $v_0$ and $v_1$. Both are symmetries, so by the observation in bold above they are equal. If instead $\phi(1) = k - 1$, then $f$ agrees with the reflection $x \mapsto k - x$ at $v_0$ and $v_1$, and so $f$ is that reflection.
So every symmetry is one of the $2n$ rotations and reflections listed above. These $2n$ maps are different from each other, because they differ in where they send vertex 0 or vertex 1. The rotation $x \mapsto x + k$ sends $(0, 1)$ to $(k, k + 1)$ and the reflection $x \mapsto k - x$ sends $(0, 1)$ to $(k, k - 1)$, and the $2n$ pairs $(k, k \pm 1)$ are distinct. Hence $\lvert D_n \rvert = 2n$. $\blacksquare$
The count has a simple reading. A symmetry may put vertex 0 at any of the $n$ vertices, and vertex 1 at either neighbor of that one, after which there is no further freedom. For the stop sign that is $8 \cdot 2 = 16$, the sixteen motions of the opening. The script for this article confirms the theorem's combinatorial core for $n = 3, \ldots, 10$ by listing every permutation of $\mathbb{Z}_n$ that preserves adjacency. There are exactly $2n$, and they are exactly the maps $x \mapsto \pm x + k$.
Example (a symmetry from two vertices). The symmetry of the octagon that sends vertex 0 to vertex 3 and vertex 1 to vertex 2 is the reflection $x \mapsto 3 - x$, and it fixes no vertex. It is that reflection because $\phi(1) = k - 1$ with $k = 3$. Its mirror line is at angle $3\pi/8$, or 67.5 degrees. It fixes no vertex, because $3 - x = x$ would need $2x \equiv 3 \pmod 8$, and $2x$ is always even modulo 8. Its mirror line passes through the midpoints of two sides, a pattern explained in the section on mirror lines below.
Two generators and their relations
Sixteen symmetries are too many to multiply one pair at a time. Two of them, and a few rules, do all the work. Let $r$ be the rotation through $2\pi/n$ and $s$ the reflection in the horizontal axis (the line through vertex 0). On labels,
$$r(x) = x + 1, \qquad s(x) = -x.$$
The rotation $x \mapsto x + k$ is $r^k$, since applying $r$ $k$ times adds $k$. The reflection $x \mapsto k - x$ is $r^k s$, since $r^k(s(x)) = -x + k$. So
$$D_n = \{\, 1, r, r^2, \ldots, r^{n-1}, \; s, rs, r^2 s, \ldots, r^{n-1} s \,\},$$
with every element written uniquely as $r^a$ or $r^a s$ for $0 \le a \le n - 1$. Here $1$ denotes the identity.
Every computation in $D_n$ follows from the formula for composing two maps of the form $x \mapsto \varepsilon x + k$, where $\varepsilon = \pm 1$. If $f(x) = \varepsilon_1 x + k_1$ and $g(x) = \varepsilon_2 x + k_2$, then
$$(fg)(x) = f(\varepsilon_2 x + k_2) = \varepsilon_1 \varepsilon_2 \, x + (\varepsilon_1 k_2 + k_1).$$
Proposition. In $D_n$,
$$r^n = 1, \qquad s^2 = 1, \qquad s r = r^{-1} s,$$
and more generally $s r^k = r^{-k} s$ for every integer $k$. Every product of the form $(r^a s^i)(r^b s^j)$, with $i, j \in \{0, 1\}$, equals
$$r^{\,a + (-1)^i b} \, s^{\,i + j},$$
where the exponent of $r$ is read modulo $n$ and that of $s$ modulo 2.
The idea: each relation is an identity between maps $x \mapsto \pm x + k$ on $\mathbb{Z}_n$, checked by evaluating both sides at $x$. Flipping first negates whatever rotation follows it, which is the relation $sr = r^{-1}s$.
Proof. $r^n(x) = x + n = x$ in $\mathbb{Z}_n$, and $s^2(x) = -(-x) = x$. For the third relation, $(s r^k)(x) = s(x + k) = -x - k$, while $(r^{-k} s)(x) = r^{-k}(-x) = -x - k$; with $k = 1$ this is $sr = r^{-1}s$. For the product rule: if $i = 0$, then $r^a r^b s^j = r^{a + b} s^j$. If $i = 1$, then $r^a s r^b s^j = r^a r^{-b} s \, s^j = r^{a - b} s^{1 + j}$, using $s r^b = r^{-b} s$. In both cases the exponent of $r$ is $a + (-1)^i b$. Finally $s^{i + j}$ depends only on $i + j$ modulo 2, because $s^2 = 1$. $\blacksquare$
The relation $s r = r^{-1} s$ is the whole content of the group's multiplication. An $s$ can be moved past a power of $r$ from left to right at the cost of inverting the power. Combined with $r^n = 1$ and $s^2 = 1$ it reduces any word in $r$ and $s$ to the form $r^a$ or $r^a s$. A word is a product of factors $r$, $s$, $r^{-1} = r^{n-1}$ and $s^{-1} = s$. Each factor has the form $r^b s^j$, so multiplying the factors in one at a time, from the left, applies the product rule once per factor and keeps the form $r^a s^i$ at every step. The script checks the product rule for all $4n^2$ products in $D_8$. For this reason $D_n$ is often described by the presentation
$$D_n = \langle\, r, s \mid r^n = s^2 = 1, \; s r s = r^{-1} \,\rangle,$$
meaning that $D_n$ is generated by $r$ and $s$ and that every relation between them follows from these three. Judson (2026, Theorem 5.2.3) describes $D_n$ by the same generators and relations. The first half of that meaning was proved above. The second half is stated here, not proved, since the course does not define presentations formally, and nothing below depends on it. The reason behind it is the reduction just described, which uses only the three relations. They give $s r^k s = (s r s)^k = r^{-k}$ for every integer $k$ (the inner factors $s s = 1$ cancel), and hence $s r^k = r^{-k} s$. So they alone turn every word into one of the $2n$ forms $r^a s^i$, and these $2n$ forms are $2n$ different symmetries.
What the relations say geometrically
The product rule turns any word in $r$ and $s$ into arithmetic, but its most useful consequences are general identities with a geometric meaning.
Inverses come first. A rotation $r^a$ has inverse $r^{-a} = r^{n - a}$. A reflection is its own inverse: $(r^a s)(r^a s) = r^{a - a} s^2 = 1$.
A reflection reverses every rotation. For any reflection $r^a s$ and any rotation $r^k$, the product rule gives
$$(r^a s)\, r^k \,(r^a s)^{-1} = (r^a s \cdot r^k)(r^a s) = r^{a - k} s \cdot r^a s = r^{(a - k) - a} = r^{-k}.$$
Flip the sign over, turn it, and flip it back: the result is the same turn in the opposite direction, whichever mirror line is used. On the stop sign, flipping, making a quarter turn and flipping back is a quarter turn the other way.
A rotation turns every mirror line. For a rotation $r^j$ and a reflection $r^a s$,
$$r^j \,(r^a s)\, r^{-j} = r^{j + a} s \, r^{-j} = r^{j + a + j} s = r^{a + 2j} s.$$
The reflection $r^a s$ has its mirror line at angle $\pi a/n$, and $r^{a + 2j}s$ at angle $\pi a/n + 2\pi j/n$. So turning the polygon, reflecting and turning back is reflection in the mirror line turned through the same angle. In the octagon the rotations carry $s$ only to the reflections $r^{2j}s$ with even exponent, and $rs$ only to those with odd exponent. The eight reflections fall into two families of four, a split that the section on mirror lines below explains. The script checks both identities for every rotation and reflection of $D_8$.
Example (the half turn commutes with $s$). The half turn $r^4$ of the octagon commutes with $s$, although moving $s$ past a rotation inverts it: $s r^4 = r^{-4} s = r^4 s$, because $r^8 = 1$ gives $r^{-4} = r^4$. In general $s r^k = r^k s$ exactly when $r^{2k} = 1$. The reason is that $s r^k = r^{-k} s$, and $r^{-k} s = r^k s$ exactly when $r^{-k} = r^k$ (multiply both sides on the right by $s$), that is, when $r^{2k} = 1$. In $D_8$, $r^{2k} = 1$ means $8 \mid 2k$, which for $0 \le k \le 7$ happens only for $k = 0$ and $k = 4$. For $r$ itself $r^{-1} \neq r$, so $sr \neq rs$.
$D_n$ is not abelian
Proposition. For $n \ge 3$, $rs \neq sr$; so $D_n$ is nonabelian.
The idea: $rs$ and $sr$ are two different reflections, and evaluating both at vertex 0 shows it.
Proof. $rs$ is the map $x \mapsto 1 - x$ and $sr = r^{-1} s$ is the map $x \mapsto -1 - x$. They differ at $x = 0$, since $1 \neq -1$ in $\mathbb{Z}_n$ when $n \ge 3$. $\blacksquare$
Geometrically, $rs$ and $sr$ are both reflections, but in different lines: $rs = r^1 s$ reflects in the line at angle $\pi/n$, and $sr = r^{n-1} s$ in the line at angle $-\pi/n$.
The Cayley table
The product rule produces the whole Cayley table of $D_8$ at once. Its structure is visible when the rotations are listed first and the reflections second.
- A product of two rotations or of two reflections is a rotation.
- A product of a rotation and a reflection, in either order, is a reflection.
This is the product rule's statement that the exponent of $s$ adds modulo 2. It says that the map sending rotations to $+1$ and reflections to $-1$ turns products into products, the first example in this unit of a homomorphism.
Orders of elements
The Cayley table shows every product once. The order of a symmetry says how often it must be repeated before the sign is back where it started.
Proposition. In $D_n$ the rotation $r^k$ has order $n/\gcd(n, k)$, and every reflection has order 2.
The idea: $(r^k)^m$ is the identity when the total turn of $km$ steps is a whole number of revolutions, that is, when $n \mid km$. The gcd removes the factors that $k$ already shares with $n$.
Proof. Let $d = \gcd(n, k)$. For a positive integer $m$, $(r^k)^m = r^{km}$ is the identity exactly when $n$ divides $km$. Write $n = d n'$ and $k = d k'$, where $\gcd(n', k') = 1$. Then $n \mid km$ means $n' \mid k' m$. Since $n'$ and $k'$ are relatively prime, this happens exactly when $n' \mid m$, by the theorem in Divisibility and the Euclidean Algorithm that $a \mid bc$ and $\gcd(a, b) = 1$ imply $a \mid c$. The smallest such positive $m$ is $n' = n/d$. For a reflection, $(r^a s)^2 = 1$ was shown above, and $r^a s \neq 1$, so its order is 2. $\blacksquare$
In particular $r$ itself has order $n$, and the rotations of order $n$ are the powers $r^k$ with $\gcd(k, n) = 1$, of which there are $\varphi(n)$, the number of units of $\mathbb{Z}_n$. More generally, for each divisor $m$ of $n$ the rotations of order $m$ are the $r^k$ with $\gcd(n, k) = n/m$, and there are $\varphi(m)$ of them. To count them, put $c = n/m$, so that $n = cm$. If $\gcd(n, k) = c$ with $0 \le k < n$, then $c \mid k$, so $k = cj$ with $0 \le j < m$. For such a $k$, $\gcd(n, k) = c$ exactly when $\gcd(m, j) = 1$. If some $e > 1$ divides both $m$ and $j$, then $ce$ divides both $n = cm$ and $k = cj$, and $ce > c$, so $\gcd(n, k) \neq c$. If $\gcd(m, j) = 1$, write $1 = mu + jv$ with integers $u$ and $v$ (Bezout's identity). Then $c = nu + kv$, so every common divisor of $n$ and $k$ divides $c$; and $c$ is itself a common divisor, so $\gcd(n, k) = c$. The number of $j$ with $0 \le j < m$ and $\gcd(m, j) = 1$ is $\varphi(m)$. The script checks these counts for $n = 3$ to 12. No element of $D_n$ has order larger than $n$: rotations have orders dividing $n$, and reflections order 2.
Example (elements of order 2). $D_n$ has $n$ elements of order 2 when $n$ is odd and $n + 1$ when $n$ is even. All $n$ reflections have order 2. A rotation $r^k$, $0 \le k < n$, has order 2 exactly when $n/\gcd(n, k) = 2$. That needs $n$ even and $\gcd(n, k) = n/2$; then $n/2$ divides $k$ and $k \neq 0$, so $k = n/2$, the half turn, which does have order 2. So $D_n$ has $n$ elements of order 2 when $n$ is odd and $n + 1$ when $n$ is even. The script confirms both counts for $n = 3$ to 12.
For the stop sign this gives nine elements of order 2, and no element of order 16, since the largest order is 8. This proves a claim made in Groups: Definition and First Examples. $D_8$ and the additive group $\mathbb{Z}_{16}$ have the same order but are different groups: $\mathbb{Z}_{16}$ has an element of order 16 (the class of 1) and an abelian table, and $D_8$ has neither.
The mirror lines
The opening said that the stop sign's mirror lines run through opposite corners or through midpoints of opposite sides. The vertices that a reflection fixes decide which kind it is. The reflection $r^k s$ is $x \mapsto k - x$, and it fixes vertex $x$ exactly when $k - x = x$, that is, when
$$2x \equiv k \pmod n.$$
This is a linear congruence, and the theory of $ax = b$ in $\mathbb{Z}_n$ counts its solutions. There are $\gcd(2, n)$ of them if $\gcd(2, n)$ divides $k$, and none otherwise.
- $n$ odd. Then $\gcd(2, n) = 1$, so 2 is a unit modulo $n$ and every reflection fixes exactly one vertex. Its mirror line runs from that vertex through the center to the midpoint of the opposite side. In the heptagon, for example, $r s$ fixes vertex 4, since $2 \cdot 4 = 8 \equiv 1 \pmod 7$.
- $n$ even. Then $\gcd(2, n) = 2$. For even $k$ the reflection $r^k s$ fixes the two opposite vertices $k/2$ and $k/2 + n/2$. For odd $k$ it fixes no vertex, and its mirror line joins the midpoints of two opposite sides. So half of the $n$ reflections are of each kind.
Example (the decagon). In the regular decagon ($n = 10$) the reflection $r^3 s$ fixes no vertex, and $r^4 s$ fixes the vertices 2 and 7. Since 10 is even, the parity of $k$ decides. $2x \equiv 3 \pmod{10}$ has no solution, because $2x$ is even modulo 10, so $r^3 s$ fixes no vertex. $2x \equiv 4 \pmod{10}$ has exactly the solutions 2 and 7, two opposite vertices.
Two reflections make a rotation
A tempting guess is that combining two symmetries of order 2 gives another symmetry of order 2, or the identity. The reflections $s$ and $rs$ both have order 2. Their product is $(rs)s = r$, the turn through 45 degrees, of order 8.
The product rule gives $(r^a s)(r^b s) = r^{a - b}$ in general. The first factor reflects in the line at angle $\pi a/n$, the second in the line at angle $\pi b/n$. The product rotates through $2\pi(a - b)/n$, which is twice the angle from the second mirror line to the first. This is the classical fact that reflecting in two lines through a point, one after the other, rotates about that point through twice the angle between the lines. In the octagon, $(r^3 s)(r s) = r^2$: the mirror lines at $67.5$ and $22.5$ degrees are 45 degrees apart, and the product is the quarter turn. In the other order, $(r s)(r^3 s) = r^{-2} = r^6$, the quarter turn the other way.
A consequence is that $D_n$ is generated by its reflections alone: $r = (rs)s$ is the product of two reflections, so every rotation $r^k = ((rs)s)^k$ is a product of reflections too.
Matrices
So far symmetries have been maps on vertex labels. The geometry gives a second description, since every symmetry is linear and so has a matrix. The rotation $r$ and the reflection $s$ are
$$R = \begin{pmatrix} \cos \frac{2\pi}{n} & -\sin \frac{2\pi}{n} \\ \sin \frac{2\pi}{n} & \cos \frac{2\pi}{n} \end{pmatrix}, \qquad S = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix},$$
and composing symmetries multiplies their matrices. The $2n$ matrices $R^a$ and $R^a S$ form a group of order $2n$ inside $GL_2(\mathbb{R})$, a copy of $D_n$. For the square, $n = 4$, the rotation matrix is $\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$, which is the matrix $A$ of Rings: Definition and Examples, and $S$ is its matrix $B$. The calculation there that $AB \neq BA$ was a calculation in $D_4$. $AB = rs$ is the reflection in the line $y = x$ (at angle $\pi/4$), and $BA = sr = r^3 s$ is the reflection in the line $y = -x$.
Symmetries as permutations of the vertices
A third description needs no geometry at all. The proof of the theorem identified each symmetry with the permutation of the vertex labels that it induces, and those permutations can be described by their shapes, the cycle types of Symmetric Groups and Permutations, without writing any of them out.
- Rotations. The rotation $r^k$ is $x \mapsto x + k$. Following a label, $x \to x + k \to x + 2k \to \cdots$, it returns after $n/\gcd(n, k)$ steps, the order of $r^k$. So $r^k$ splits the $n$ labels into $\gcd(n, k)$ cycles, each of length $n/\gcd(n, k)$.
- Reflections. The reflection $r^k s$ is $x \mapsto k - x$, which pairs each label $x$ with $k - x$ and is its own inverse. So it consists of 2-cycles, together with the labels it fixes, the solutions of $2x \equiv k$ found in the section on mirror lines: one fixed label when $n$ is odd, two when $n$ and $k$ are even, none when $n$ is even and $k$ odd.
For the octagon the shapes are an 8-cycle for the four rotations of order 8, two 4-cycles for the quarter turns, four 2-cycles for the half turn, and for the reflections either three 2-cycles with two fixed labels or four 2-cycles. The script lists all 16 permutations and confirms every shape, and checks the rule for rotations for $n = 3$ to 12. Only 16 of the $8! = 40{,}320$ permutations of eight labels arise, since a symmetry must preserve adjacency. The assignment of a permutation to each symmetry respects composition and sends different symmetries to different permutations. So $D_n$ appears as a group of permutations of $n$ objects. Maps of this kind are homomorphisms, and Cayley's theorem shows that every group can be realized as a group of permutations in a similar way.
Example (symmetries that fix no corner). Eleven of the sixteen symmetries of the stop sign leave no corner where it was. A rotation other than the identity moves every corner, since $x + k = x$ needs $k \equiv 0$, which accounts for seven. A reflection $r^k s$ with $k$ odd fixes no corner, because $2x \equiv k \pmod 8$ has no solution, which accounts for four more. The identity and the four reflections through opposite corners each fix at least one. The script finds the same eleven.
Rotations alone, and other figures
What if a figure cannot be flipped? The $n$ rotations $1, r, \ldots, r^{n-1}$ form a group by themselves, since products and inverses of rotations are rotations. It is a group inside $D_n$ of half its size, all of whose elements are powers of the single element $r$. Such a group is cyclic, and groups inside groups are the subject of Subgroups and Cyclic Groups. It is the full symmetry group of a figure that can be turned but not flipped, such as a pinwheel with $n$ identical bent blades.
Polygons and pinwheels exhaust the possibilities. Every finite group of symmetries of a figure in the plane is either a group of $n$ rotations or a dihedral group $D_n$ (Judson, 2026, Theorem 12.2.4). Judson's historical note credits Leonardo da Vinci as probably the first to know all of these groups. Snowflakes, starfish and the floor plans of many buildings have dihedral symmetry. A figure in three dimensions can have more varied symmetry. The rotations of a cube, for example, form a group of order 24 (Judson, 2026, Proposition 5.2.8). Its layers, when they can be turned separately, generate the far larger Rubik's cube group.
Worked problems
These problems are from the course's assignment introducing groups. Each is solved in full from the results of this unit.
Problem 1. Consider the group $D_6$ of symmetries of a regular hexagon. Let $r$ be the clockwise rotation through $360/6 = 60$ degrees, and let $s$ be the flip about the vertical axis, where the hexagon is drawn with a horizontal side at the top. Then
$$D_6 = \{\, 1, r, r^2, r^3, r^4, r^5, \; s, sr, sr^2, sr^3, sr^4, sr^5 \,\}, \qquad s^2 = 1, \quad r^6 = 1, \quad rs = sr^5.$$
(a) Rewrite each of the following as one of the twelve listed elements: $s^{-1}$, $r^{-1}$, $r^8$, $r^{-2}$, $r^2 s$, $(sr)(sr^2)$ and $s^3 r^2 s^{-4} r^{-7} s r^3$. (b) Find the orders of all twelve elements.
The notation. The assignment's generators are not the $r$ and $s$ of this article, and it writes reflections as $s r^k$ with $s$ on the left. Within this problem, $r$ and $s$ have the assignment's meaning. In this article's labeling of the hexagon, with vertex 0 on the horizontal axis, the clockwise rotation through 60 degrees is $x \mapsto x - 1$, the article's $r^{-1} = r^5$. The vertical axis is the line at angle $\pi/2 = 3\pi/6$, so the flip is $x \mapsto 3 - x$, the article's $r^3 s$. It fixes no vertex, since $2x \equiv 3 \pmod 6$ has no solution, in agreement with a mirror line through the midpoints of the top and bottom sides. As before, the product $fg$ means first $g$, then $f$.
The rules. Three facts about the problem's $r$ and $s$ are needed, and each follows from the results above.
- $r^6 = 1$ and $r^j = r^k$ exactly when $j \equiv k \pmod 6$. The powers of the problem's $r$ are the maps $x \mapsto x - k$ on $\mathbb{Z}_6$, and $x - j = x - k$ in $\mathbb{Z}_6$ exactly when $j \equiv k \pmod 6$. So exponents of $r$ may be reduced modulo 6, negative exponents included.
- $s^2 = 1$, because every reflection is its own inverse. So $s^{-1} = s$, and $s^j$ is $s$ for odd $j$ and 1 for even $j$, negative exponents included.
- $r^k s = s r^{-k}$ and $s r^k = r^{-k} s$ for every integer $k$. A reflection reverses every rotation: $s \rho s^{-1} = \rho^{-1}$ for every rotation $\rho$. Multiplying on the right by $s$ gives $s \rho = \rho^{-1} s$. With $\rho = r^k$ this is $s r^k = r^{-k} s$, and with $\rho = r^{-k}$ it is $s r^{-k} = r^k s$. The case $k = 1$ of the latter is the assignment's relation $rs = sr^{-1} = sr^5$.
The twelve listed elements are all of $D_6$, each once. The powers $1, r, \ldots, r^5$ are the six rotations $x \mapsto x - k$. The products $s r^k$ are the maps $x \mapsto 3 - (x - k) = (3 + k) - x$ for $k = 0, \ldots, 5$, which are the six reflections. So each answer below is determined.
Solution of (a).
- $s^{-1} = s$, by rule 2.
- $r^{-1} = r^5$, by rule 1, since $-1 \equiv 5 \pmod 6$.
- $r^8 = r^2$, since $8 \equiv 2 \pmod 6$.
- $r^{-2} = r^4$, since $-2 \equiv 4 \pmod 6$.
- $r^2 s = s r^{-2} = s r^4$, by rule 3 and then rule 1.
- $(sr)(sr^2) = s (r s) r^2 = s (s r^{-1}) r^2 = s^2 \, r^{-1} r^2 = r$.
- For the last word, first reduce the powers: $s^3 = s$, $s^{-4} = 1$ and $r^{-7} = r^{-1}$. Then $s^3 r^2 s^{-4} r^{-7} s r^3 = s \, r^2 \, r^{-1} \, s \, r^3 = s \, (r s) \, r^3 = s \, (s r^{-1}) \, r^3 = s^2 \, r^2 = r^2$.
Solution of (b). The problem's $r^k$ is the article's $r^{-k} = r^{6 - k}$, so by the proposition on orders it has order $6/\gcd(6, 6 - k)$, and $\gcd(6, 6 - k) = \gcd(6, k)$ because the two pairs have the same common divisors. Each $s r^k$ is a reflection, of order 2. The table also shows each order directly, from the powers.
| Element | $1$ | $r$ | $r^2$ | $r^3$ | $r^4$ | $r^5$ |
|---|---|---|---|---|---|---|
| $\gcd(6, k)$ | 6 | 1 | 2 | 3 | 2 | 1 |
| Order | 1 | 6 | 3 | 2 | 3 | 6 |
| Element | $s$ | $sr$ | $sr^2$ | $sr^3$ | $sr^4$ | $sr^5$ |
|---|---|---|---|---|---|---|
| Order | 2 | 2 | 2 | 2 | 2 | 2 |
Directly: the powers of $r$ are $r, r^2, r^3, r^4, r^5, r^6 = 1$, and none before the sixth is 1, by rule 1. The powers of $r^2$ are $r^2, r^4, r^6 = 1$. Those of $r^3$ are $r^3, r^6 = 1$. Those of $r^4$ are $r^4, r^8 = r^2, r^{12} = 1$. Those of $r^5$ are $r^5, r^{10} = r^4, r^{15} = r^3, r^{20} = r^2, r^{25} = r, r^{30} = 1$. For a reflection, $(s r^k)(s r^k) = s (r^k s) r^k = s (s r^{-k}) r^k = 1$, and $s r^k \neq 1$. So $D_6$ has one element of order 1, seven of order 2 (the half turn $r^3$ and the six reflections), two of order 3 and two of order 6. Seven is the count $n + 1$ of the example on elements of order 2, with $n = 6$ even.
Where it leads
- The first theorems about groups, including the facts about orders used informally here, are in Basic Properties of Groups.
- The rotations form a cyclic subgroup of $D_n$, and the reflections each generate a subgroup of order 2. Subgroups and cyclic groups are in Subgroups and Cyclic Groups.
- The rotation/reflection sign and the vertex permutations are homomorphisms (Group Homomorphisms and Isomorphisms).
- Permutations and their cycle notation are developed in Symmetric Groups and Permutations, and every group is a permutation group by Cayley's Theorem.
- The rotations of $D_n$ make up half of the group, and the two halves, rotations and reflections, are the cosets of the rotation subgroup in Cosets and Lagrange's Theorem.
What we have learned
The stop sign has exactly the sixteen symmetries of the opening, and the regular $n$-gon has $2n$: every symmetry is $x \mapsto x + k$ or $x \mapsto k - x$ on the corners numbered by $\mathbb{Z}_n$. Two of them, $r$ and $s$, with $r^n = s^2 = 1$ and $sr = r^{-1}s$, generate the group and decide every product. Rotations have order $n/\gcd(n, k)$ and reflections order 2, so $D_8$ has no element of order 16. The parity of $n$ and $k$ decides which mirror lines pass through corners.
The next article, The Rubik's Cube Group, studies what happens when a solid is cut into layers that turn separately: the group generated by six turns of a cube's faces.
References
- Hungerford, T. W. (2014). Abstract Algebra: An Introduction (3rd ed.), §7.1. Brooks/Cole, Cengage Learning. The course text: the group of symmetries of the square as a first nonabelian group, and the dihedral group $D_n$ of a regular polygon with $n$ sides. record · 44 pages
- Judson, T. W. (2026). Abstract Algebra: Theory and Applications (annual edition, August 2026). Free online at judsonbooks.org. §5.2 (the dihedral groups: Theorem 5.2.2, $D_n$ has order $2n$; Theorem 5.2.3, $D_n$ consists of products of $r$ of order $n$ and $s$ of order 2 with $srs = r^{-1}$; Proposition 5.2.8, the rigid motions of a cube); §12.2 (isometries of the plane: Lemma 12.2.2, an isometry fixing the origin is linear; Theorem 12.2.4, the only finite symmetry groups in the plane are the cyclic and dihedral groups; §12.2.2, historical note on Leonardo da Vinci). record · 44 pages
Reviewed: verified, 16 Nov 2026 · editorial review, 23 Nov 2026 · 6 revisions