Introduction to Modern Algebra

Contents › Chapter 3. Permutations

3.2 Even and odd permutations

Every rearrangement of a row of cards can be made by swapping two cards at a time, and usually in many ways. Some rearrangements can be made with an even number of swaps and some with an odd number. No rearrangement can be made both ways, and the reason is a number attached to each permutation, its sign, 11 or −1-1, which every swap reverses.

Swaps

Definition 3.2.1 (Transposition).

A transposition is a 22-cycle (a b)(a\ b): the permutation that swaps the two points aa and bb and fixes every other point.

For example, (2 5)(2\ 5) in S5S_5 has the table (1234515342)\begin{pmatrix} 1 & 2 & 3 & 4 & 5 \\ 1 & 5 & 3 & 4 & 2 \end{pmatrix}. The same transposition can be written (a b)=(b a)(a\ b) = (b\ a), and swapping twice puts both points back: (a b)(a b)=e(a\ b)(a\ b) = e, so every transposition is its own inverse. A 33-cycle such as (1 2 3)(1\ 2\ 3) is not a transposition: it moves three points.

Theorem 3.2.2.

Every permutation of a finite set is a product of transpositions. More precisely, every cycle is a product of transpositions,

(a1 a2 … ak)=(a1 ak)⋯(a1 a3)(a1 a2),\begin{aligned} &(a_1\ a_2\ \dots\ a_k) \\ &\quad = (a_1\ a_k) \cdots (a_1\ a_3)(a_1\ a_2), \end{aligned}

a product of k−1k - 1 transpositions, and the identity is the product of no transpositions.

Proof.

Idea. Check the formula for one cycle point by point, reading the product from the right, so that (a1 a2)(a_1\ a_2) acts first. Then apply it to each cycle of a permutation.

  1. The product (a1 ak)⋯(a1 a3)(a1 a2)(a_1\ a_k) \cdots (a_1\ a_3)(a_1\ a_2) fixes every point outside {a1,…,ak}\{a_1, \dots, a_k\}.

    A point outside {a1,…,ak}\{a_1, \dots, a_k\} is fixed by every factor.

  2. The product sends a1a_1 to a2a_2.

    The point a1a_1 goes to a2a_2 under the first factor (a1 a2)(a_1\ a_2), and the later factors (a1 aj)(a_1\ a_j) with j≥3j \ge 3 fix a2a_2.

  3. For 2≤i≤k−12 \le i \le k - 1, the product sends aia_i to ai+1a_{i+1}.

    The point aia_i is fixed by the factors (a1 aj)(a_1\ a_j) with j<ij < i, sent to a1a_1 by (a1 ai)(a_1\ a_i), then sent to ai+1a_{i+1} by (a1 ai+1)(a_1\ a_{i+1}), and fixed by the factors after that.

  4. The product sends aka_k to a1a_1, so it equals the cycle (a1 a2 … ak)(a_1\ a_2\ \dots\ a_k).

    The point aka_k is fixed by every factor except the last, (a1 ak)(a_1\ a_k), which sends it to a1a_1. With the first three steps, the product agrees with the cycle at every point.

  5. Every permutation σ≠e\sigma \ne e is a product of transpositions.

    By Theorem 3.1.2, σ\sigma is a product of disjoint cycles. Replacing each cycle by its product of transpositions writes σ\sigma as a product of transpositions.

□

The sign

A rearrangement of the numbers 1,…,n1, \dots, n puts some pairs of them out of order. The sign records whether the number of such pairs is even or odd.

Definition 3.2.3 (Sign of a permutation).Not yet reviewed

Let σ∈Sn\sigma \in S_n. A pair of numbers i<ji < j in {1,…,n}\{1, \dots, n\} is an inversion of σ\sigma if σ(i)>σ(j)\sigma(i) > \sigma(j). The sign of σ\sigma is the product over all pairs i<ji < j

sgn⁡(σ)=∏1≤i<j≤nσ(j)−σ(i)j−i,\sgn(\sigma) = \prod_{1 \le i < j \le n} \frac{\sigma(j) - \sigma(i)}{j - i},

with sgn⁡(σ)=1\sgn(\sigma) = 1 when n=1n = 1. The permutation σ\sigma is even if sgn⁡(σ)=1\sgn(\sigma) = 1, and odd if sgn⁡(σ)=−1\sgn(\sigma) = -1.

The sign is always 11 or −1-1: precisely, sgn⁡(σ)=(−1)N\sgn(\sigma) = (-1)^N, where NN is the number of inversions of σ\sigma. Each pair i<ji < j gives one factor, which is negative exactly when the pair is an inversion. Up to sign, the numerators are the denominators in another order. Because σ\sigma is a bijection, the two-element sets {σ(i),σ(j)}\{\sigma(i), \sigma(j)\} run over all two-element subsets of {1,…,n}\{1, \dots, n\}, each exactly once, as {i,j}\{i, j\} does; so the product of the sizes ∣σ(j)−σ(i)∣\lvert \sigma(j) - \sigma(i) \rvert equals the product of the differences j−ij - i, and only the NN minus signs remain. In particular the identity, with no inversions, is even.

Even and odd, never both

Theorem 3.2.4 (The sign is multiplicative).Not yet reviewed

Let σ,τ∈Sn\sigma, \tau \in S_n.

  • (i) sgn⁡(στ)=sgn⁡(σ)sgn⁡(τ)\sgn(\sigma\tau) = \sgn(\sigma)\sgn(\tau).
  • (ii) Every transposition has sign −1-1.
  • (iii) If σ\sigma is a product of mm transpositions, then sgn⁡(σ)=(−1)m\sgn(\sigma) = (-1)^m. So an even permutation is a product of an even number of transpositions and never of an odd number, and an odd permutation is a product of an odd number of transpositions and never of an even number.
Proof.

Idea. In στ\sigma\tau, the permutation τ\tau first moves each pair i<ji < j to the pair τ(i),τ(j)\tau(i), \tau(j), which σ\sigma then moves. So each factor of sgn⁡(στ)\sgn(\sigma\tau) splits into a factor of sgn⁡(τ)\sgn(\tau) times a factor of sgn⁡(σ)\sgn(\sigma). Then (ii) is a count of inversions, and (iii) follows by multiplying.

  1. Each factor of sgn⁡(σ)\sgn(\sigma) is unchanged if its two numbers are named in the other order. So sgn⁡(σ)\sgn(\sigma) is the product of σ(q)−σ(p)q−p\frac{\sigma(q) - \sigma(p)}{q - p} over all two-element sets {p,q}⊆{1,…,n}\{p, q\} \subseteq \{1, \dots, n\}, each taken once, with pp and qq in either order.

    Swapping pp and qq changes the sign of the numerator and of the denominator.

  2. For i<ji < j, the factor of sgn⁡(στ)\sgn(\sigma\tau) for the pair i<ji < j is the factor of sgn⁡(σ)\sgn(\sigma) for the pair {τ(i),τ(j)}\{\tau(i), \tau(j)\} times the factor of sgn⁡(τ)\sgn(\tau) for the pair i<ji < j.

    Since τ\tau is injective, τ(j)−τ(i)≠0\tau(j) - \tau(i) \ne 0, so multiplying and dividing by it is allowed:

    σ(τ(j))−σ(τ(i))j−i=σ(τ(j))−σ(τ(i))τ(j)−τ(i)⋅τ(j)−τ(i)j−i.\begin{aligned} &\frac{\sigma(\tau(j)) - \sigma(\tau(i))}{j - i} \\ &\quad = \frac{\sigma(\tau(j)) - \sigma(\tau(i))}{\tau(j) - \tau(i)} \cdot \frac{\tau(j) - \tau(i)}{j - i}. \end{aligned}

    By the first step, the first fraction on the right is the factor of sgn⁡(σ)\sgn(\sigma) for the pair {τ(i),τ(j)}\{\tau(i), \tau(j)\}.

  3. Multiplying over all pairs i<ji < j gives sgn⁡(στ)=sgn⁡(σ)sgn⁡(τ)\sgn(\sigma\tau) = \sgn(\sigma)\sgn(\tau). This proves (i).

    The second factors multiply to sgn⁡(τ)\sgn(\tau), by definition. In the first factors, as {i,j}\{i, j\} runs over the two-element subsets of {1,…,n}\{1, \dots, n\}, each once, so does {τ(i),τ(j)}\{\tau(i), \tau(j)\}, because τ\tau is a bijection. By the first step, the first factors multiply to sgn⁡(σ)\sgn(\sigma).

  4. A transposition (a b)(a\ b) with a<ba < b has 2(b−a)−12(b - a) - 1 inversions, so its sign is −1-1. This proves (ii).

    Write π=(a b)\pi = (a\ b). The pair a<ba < b is an inversion, since π(a)=b>a=π(b)\pi(a) = b > a = \pi(b). For each kk with a<k<ba < k < b, the pairs a<ka < k and k<bk < b are inversions, since π(a)=b>k\pi(a) = b > k and k>a=π(b)k > a = \pi(b). Every other pair is in order. A pair of two fixed points keeps its order. A pair made of aa or bb and a point kk with k<ak < a or k>bk > b keeps its order too, because aa and bb lie on the same side of kk, so swapping them does not change which of the two numbers is larger. That makes 1+2(b−a−1)=2(b−a)−11 + 2(b - a - 1) = 2(b - a) - 1 inversions, an odd number, so sgn⁡(π)=−1\sgn(\pi) = -1 by the formula sgn⁡(π)=(−1)N\sgn(\pi) = (-1)^N.

  5. If σ=π1π2⋯πm\sigma = \pi_1 \pi_2 \cdots \pi_m with each πi\pi_i a transposition, then sgn⁡(σ)=(−1)m\sgn(\sigma) = (-1)^m.

    By (i), applied m−1m - 1 times, sgn⁡(σ)=sgn⁡(π1)sgn⁡(π2)⋯sgn⁡(πm)\sgn(\sigma) = \sgn(\pi_1)\sgn(\pi_2)\cdots\sgn(\pi_m), and each factor is −1-1 by (ii). For m=0m = 0, σ=e\sigma = e, which is even.

  6. So σ\sigma alone decides whether the number of transpositions is even or odd. This proves (iii).

    If σ\sigma is even, then (−1)m=1(-1)^m = 1 forces mm to be even for every product of mm transpositions equal to σ\sigma; if σ\sigma is odd, (−1)m=−1(-1)^m = -1 forces mm to be odd. By Theorem 3.2.2, every permutation is a product of transpositions, so each one is a product of an even number of them or of an odd number, according to its sign, and never both.

□