The Symmetric Group
\(S_n\) is the group whose elements are the bijections from \(\{1, 2, \dots, n\}\) to itself, and whose operation is composition. Its elements are functions, not numbers, and it is the course’s first group in which the order of a product matters. The definition of a group is in groups, and the two ingredients are one-to-one-and-onto-functions and composition-of-functions. First met in 2026-09-24-definitions-and-examples-of-groups.
The definition
\(S_n\) is the group consisting of the set of all bijections from \(\{1, 2, \cdots, n\}\) to \(\{1, 2, \cdots, n\}\) together with the binary operation \(\circ\) denoting composition of functions.
An element of \(S_n\) is a way of sending each of \(1, \dots, n\) to one of \(1, \dots, n\), so that no two go to the same place and every place is used. To combine two elements, do one and then the other.
How many elements. A bijection in \(S_3\) can send 1 to any of three places. That leaves two places for 2, and then one for 3, so \(S_3\) has \(3 \cdot 2 \cdot 1 = 6\) elements. In general \(S_n\) has \(n!\) elements, one for each arrangement of \(1, \dots, n\) (counting-principles).
The six elements of \(S_3\)
They are named \(f_1\) to \(f_6\) here, and each can be drawn as an arrow diagram (2026-09-24-definitions-and-examples-of-groups). Each can also be written as a set of pairs or as a list of values.
| As a set of pairs | \(1 \mapsto\) | \(2 \mapsto\) | \(3 \mapsto\) | What it does | |
|---|---|---|---|---|---|
| \(f_1\) | \(\{(1,1),(2,2),(3,3)\}\) | 1 | 2 | 3 | nothing |
| \(f_2\) | \(\{(1,2),(2,1),(3,3)\}\) | 2 | 1 | 3 | swaps 1 and 2 |
| \(f_3\) | \(\{(1,3),(2,2),(3,1)\}\) | 3 | 2 | 1 | swaps 1 and 3 |
| \(f_4\) | \(\{(1,1),(2,3),(3,2)\}\) | 1 | 3 | 2 | swaps 2 and 3 |
| \(f_5\) | \(\{(1,2),(2,3),(3,1)\}\) | 2 | 3 | 1 | moves all three |
| \(f_6\) | \(\{(1,3),(2,1),(3,2)\}\) | 3 | 1 | 2 | moves all three, the other way |
The pair form is the definition of a function as a set of pairs (functions-on-general-sets). The names \(f_1, \dots, f_6\) are just labels, and other sources number the six differently.
Composing
\[(f \circ g)(x) = f(g(x))\]
The function on the right acts first. To work out \(f \circ g\), take each of 1, 2, 3 in turn, apply \(g\), then apply \(f\) to the result.
\(f_2 \circ f_3\): \(f_3\) first, then \(f_2\).
| \(x\) | \(f_3(x)\) | \(f_2(f_3(x))\) |
|---|---|---|
| 1 | 3 | 3 |
| 2 | 2 | 1 |
| 3 | 1 | 2 |
So \(f_2 \circ f_3\) sends \(1 \mapsto 3\), \(2 \mapsto 1\), \(3 \mapsto 2\), which is \(f_6\).
\(f_3 \circ f_2\): \(f_2\) first, then \(f_3\).
| \(x\) | \(f_2(x)\) | \(f_3(f_2(x))\) |
|---|---|---|
| 1 | 2 | 2 |
| 2 | 1 | 3 |
| 3 | 3 | 1 |
So \(f_3 \circ f_2\) sends \(1 \mapsto 2\), \(2 \mapsto 3\), \(3 \mapsto 1\), which is \(f_5\).
The same two functions in the two orders give different answers. \(f_2 \circ f_3 = f_6\) but \(f_3 \circ f_2 = f_5\).
Figure 1: The same two elements of \(S_3\) composed in both orders. Top: \(f_3\) first and then \(f_2\), which is \(f_2 \circ f_3\). Following each number through both steps gives \(1 \to 3\), \(2 \to 1\), \(3 \to 2\), the element \(f_6\). Bottom: \(f_2\) first and then \(f_3\), which is \(f_3 \circ f_2\). Now the result is \(1 \to 2\), \(2 \to 3\), \(3 \to 1\), the element \(f_5\). In each row the picture runs left to right in the order things happen, and the formula names the functions right to left.
Why it is a group
For \(S_3\) the properties can be checked from its table, with associativity by a general argument (2026-09-24-definitions-and-examples-of-groups). Each one also follows, for every \(n\), from facts about functions:
- Closure. The composition of two bijections is a bijection (composition-of-functions).
- Associativity. For any three functions, \(f \circ (g \circ h)\) and \((f \circ g) \circ h\) both send \(x\) to \(f(g(h(x)))\).
- Identity. The function that sends every number to itself, \(f_1\) in \(S_3\). Composing with it on either side changes nothing.
- Inverses. A bijection has an inverse function (inverse-functions), which is again a bijection, and composing the two in either order gives the identity (composition-of-functions).
So the inverse of \(f\) in the group \(S_n\) is the inverse function \(f^{-1}\), and the two uses of the notation agree. In an arrow diagram the inverse is found by reversing every arrow.
Figure 2: Inverses in \(S_3\) by reversing arrows. Top: \(f_5\) sends \(1 \to 2\), \(2 \to 3\), \(3 \to 1\). Turning each arrow round gives \(2 \to 1\), \(3 \to 2\), \(1 \to 3\), and reading that as a function of 1, 2, 3 gives \(1 \to 3\), \(2 \to 1\), \(3 \to 2\), which is \(f_6\). So \(f_5^{-1} = f_6\). Bottom: \(f_2\) swaps 1 and 2. Turning its arrows round gives the same diagram, so \(f_2\) is its own inverse. The same holds for \(f_3\) and \(f_4\), the other two swaps.
The Cayley table of \(S_3\)
The entry in the row of \(f\) and the column of \(g\) is \(f \circ g\) (cayley-tables).
| \(\circ\) | \(f_1\) | \(f_2\) | \(f_3\) | \(f_4\) | \(f_5\) | \(f_6\) |
|---|---|---|---|---|---|---|
| \(\mathbf{f}_1\) | \(f_1\) | \(f_2\) | \(f_3\) | \(f_4\) | \(f_5\) | \(f_6\) |
| \(\mathbf{f}_2\) | \(f_2\) | \(f_1\) | \(f_6\) | \(f_5\) | \(f_4\) | \(f_3\) |
| \(\mathbf{f}_3\) | \(f_3\) | \(f_5\) | \(f_1\) | \(f_6\) | \(f_2\) | \(f_4\) |
| \(\mathbf{f}_4\) | \(f_4\) | \(f_6\) | \(f_5\) | \(f_1\) | \(f_3\) | \(f_2\) |
| \(\mathbf{f}_5\) | \(f_5\) | \(f_3\) | \(f_4\) | \(f_2\) | \(f_6\) | \(f_1\) |
| \(\mathbf{f}_6\) | \(f_6\) | \(f_4\) | \(f_2\) | \(f_3\) | \(f_1\) | \(f_5\) |
Read off it:
- Identity: \(f_1\).
- Inverses: \(f_1^{-1} = f_1\), \(f_2^{-1} = f_2\), \(f_3^{-1} = f_3\), \(f_4^{-1} = f_4\), \(f_5^{-1} = f_6\), \(f_6^{-1} = f_5\).
- Not abelian: \(f_2 \circ f_3 = f_6\) but \(f_3 \circ f_2 = f_5\).
The three swaps are their own inverses: doing a swap twice puts everything back. \(f_5\) and \(f_6\) undo each other. The table also shows \(f_5 \circ f_5 = f_6\) and \(f_6 \circ f_5 = f_1\), so doing \(f_5\) three times returns everything to where it started.
Non-abelian does not mean nothing commutes. \(f_5 \circ f_6 = f_6 \circ f_5 = f_1\), and \(f_1\) commutes with everything. A group is non-abelian as soon as one pair fails to commute.
Powers and cyclic subgroups of \(S_3\)
Powers are defined in any group (subgroups-and-cyclic-groups). In \(S_3\) a power is a repeated composition, \(f^2 = f \circ f\), and \(f^0 = f_1\). Read from the table:
- \(f_5\). \(f_5^1 = f_5\), \(\ f_5^2 = f_5 \circ f_5 = f_6\), \(\ f_5^3 = f_5^2 \circ f_5 = f_6 \circ f_5 = f_1\). This is “doing \(f_5\) three times returns everything to where it started”: \(f_5\) moves \(1 \to 2 \to 3 \to 1\), and three moves bring each number home. So \(\langle f_5 \rangle = \{f_5, f_6, f_1\}\).
- \(f_6\). \(f_6 = f_5^{-1}\), so \(\langle f_6 \rangle = \langle f_5 \rangle\). Directly: \(f_6^2 = f_6 \circ f_6 = f_5\) and \(f_6^3 = f_5 \circ f_6 = f_1\).
- The swaps. \(f_2^2 = f_2 \circ f_2 = f_1\), since swapping twice changes nothing. So \(\langle f_2 \rangle = \{f_2, f_1\}\), and likewise \(\langle f_3 \rangle = \{f_3, f_1\}\) and \(\langle f_4 \rangle = \{f_4, f_1\}\).
- The identity. \(\langle f_1 \rangle = \{f_1\}\).
| \(a\) | Powers of \(a\) until \(f_1\) | \(\langle a \rangle\) |
|---|---|---|
| \(f_1\) | \(f_1\) | \(\{f_1\}\) |
| \(f_2\) | \(f_2, f_1\) | \(\{f_1, f_2\}\) |
| \(f_3\) | \(f_3, f_1\) | \(\{f_1, f_3\}\) |
| \(f_4\) | \(f_4, f_1\) | \(\{f_1, f_4\}\) |
| \(f_5\) | \(f_5, f_6, f_1\) | \(\{f_1, f_5, f_6\}\) |
| \(f_6\) | \(f_6, f_5, f_1\) | \(\{f_1, f_5, f_6\}\) |
Figure 3: The cyclic subgroups of \(S_3\), drawn inside it. Each petal is the set of powers of one element. The identity \(f_1\), where the petals meet, is in every one, and it is the only element any two of them share. The three swaps \(f_2\), \(f_3\), \(f_4\) each generate a subgroup of two elements, because a swap done twice changes nothing. \(f_5\) and \(f_6\) move all three numbers round and are each other’s inverses, so they generate the same subgroup \({f_1, f_5, f_6}\). No petal is the whole of \(S_3\), so no element generates it and \(S_3\) is not cyclic.
None of the six is all of \(S_3\), so \(S_3\) is not cyclic. It could not have been: every cyclic group is abelian, and \(S_3\) is not (subgroups-and-cyclic-groups). \(\{f_1, f_5, f_6\}\) also shows up as a block of the table when its elements are listed first (cayley-tables).
Common mistakes
- Composing in the wrong order. \(f \circ g\) means \(g\) first. Reading it left to right gives the other product, which in \(S_3\) is usually a different element.
- Reading the table as column \(\circ\) row.
- Thinking \(S_3\) has three elements. It has six. The 3 is the size of the set being rearranged.
- Treating the elements as numbers. \(f_2\) is a function. \(f_2 \circ f_3\) is a composition, not a multiplication of 2 and 3.
- Reading \(f^{-1}\) as \(\frac1f\). It is the inverse function.
- Concluding from “non-abelian” that no two elements commute.
See also
- groups — the definition, and abelian against non-abelian
- cayley-tables — reading a table, and why its rows and columns have no repeats
- composition-of-functions — the operation of \(S_n\), and why it is done right to left
- one-to-one-and-onto-functions · inverse-functions — bijections and their inverses, the elements of \(S_n\) and their group inverses
- functions-on-general-sets — a function as a set of pairs
- subgroups-and-cyclic-groups — powers, cyclic subgroups, and why a non-abelian group cannot be cyclic
- 2026-09-24-definitions-and-examples-of-groups — Lecture 26 · 2026-10-06-elementary-properties-of-groups — Lecture 27
- practice-problems — §33, with full worked solutions