Permutations of Finite Sets
Learning objectives
- Define a permutation as a bijection from a set to itself
- Write permutations in two-line and cycle notation
- Compute the composition of permutations
A permutation is a bijection from a finite set to itself, nothing more, nothing less. Yet from that one definition flows an enormous part of modern mathematics: group theory, combinatorics, the resolution of polynomial equations, the symmetries of a Rubik's cube. The reason permutations matter so much is that any time you shuffle a finite collection of objects, the rule that says "where each object went" is a permutation, and the algebra of these shuffles has surprising structure.
Definition and the symmetric group
A permutation of a set is a bijection . When , the set of all permutations of is denoted and contains exactly elements. With composition as the operation, becomes the symmetric group on letters, the most-studied finite group in mathematics.
Two-line and cycle notation
The two-line notation stacks input above output:
\sigma = \begin{pmatrix} 1 & 2 & 3 & 4 \\ 3 & 1 & 4 & 2 \end{pmatrix}
means , , , . The cycle notation traces orbits: starting from , follow the arrows: . That orbit is the cycle . Each permutation decomposes uniquely into disjoint cycles.
A 2-cycle like is called a transposition, it swaps two elements and fixes the rest. Every permutation is a product of transpositions; the parity of the number of transpositions needed is a permanent property called the sign of the permutation. Permutations with an even number of transpositions are called even; odd ones are called odd.
- Cryptography: Symmetric ciphers (AES, ChaCha20) are essentially permutations of a 128-bit block; the cycle structure of these permutations is what cryptanalysts probe to find weaknesses.
- Algorithms: Sorting algorithms are permutations: the output is a re-ordering of the input. Big-O analysis of sorting counts the number of permutations the algorithm explores before stopping.
- Statistics: Permutation tests in statistics randomly relabel data points to estimate -values without assuming a parametric distribution; the test draws random permutations from a finite group.
(Drag the numbered tiles in the top row to swap wires. The widget shows the cycle notation and parity update live. Switch to compose mode to see two permutations stacked, tau wires first, then sigma wires below, with the resulting composition cycle notation at the bottom.)
Composition
Permutations compose like any other mappings: . Apply first, then . So if and :
So . Disjoint cycles commute (they touch different elements, so their order does not matter), but non-disjoint cycles generally do not.
Inverses and the identity
The identity permutation fixes every element. Every permutation has an inverse with . The inverse of a cycle reverses its order: . Inverting a product of disjoint cycles inverts each cycle separately.
Try it
- In single mode, drag the input tiles until the wiring shows the cycle . What is the parity?
- Predict first: compute and by hand for , , should they be equal? Switch to compose mode, set both, and verify order matters.
- How many permutations of are odd? Count by hand and check against the widget by listing.
Pause: a single transposition is odd. The composition of two transpositions is even. What does that say about the composition of three transpositions?
A trap to watch for
Composition of permutations reads right-to-left. Beginners compute by applying first because it is written on the left. That is backwards. The convention feeds the input to first, is the function closest to in the formula. So acts first. This is the same right-to-left rule from 14.2, and the same trap. Whenever you compose permutations, trace the path: where does go under ? Now where does that go under ? The result is . Some textbooks (notably some abstract algebra books) use the opposite convention, left-to-right, for permutations specifically. Always check the convention of the source.
What you now know
You can read a permutation in either two-line or cycle notation, decompose it into disjoint cycles, compute its inverse, compose two permutations correctly (right-to-left), and decide whether it is even or odd by counting transpositions. The next chapter introduces an entirely new number system, the complex numbers, built to give every polynomial a root and to provide the cleanest possible algebra of rotations and scalings in the plane.
Quick check
Mark section complete →
References
- Lang, S. (1971). Basic Mathematics. Springer. Chapter 14 §3, permutations of a finite set.
- Herstein, I. N. (1996). Topics in Algebra, 2nd ed. Wiley. Section 2.5: the symmetric group , cycle decomposition, parity.
- Dummit, D. S. & Foote, R. M. (2003). Abstract Algebra, 3rd ed. Wiley. Section 1.3: permutations, cycle notation, and the sign homomorphism.