LINEAR-ALGEBRA · Unit 4 · Video 4 · Interactive Practice

Permutation Matrices — Row Exchanges, Groups, and P⁻¹ = Pᵀ

IKey Formulas

Formula Name Description
P1=PTP^{-1} = P^T Inverse rule The inverse of any permutation matrix is its transpose
PPT=IPP^T = I Orthogonality Product with transpose gives the identity
n!n! Count of n×nn \times n permutation matrices e.g., 3!=63! = 6, 4!=244! = 24, 5!=1205! = 120
PA=LUPA = LU LU with pivoting Permutation fixes zero pivots in elimination

IIVisualization 1 — Row Exchanges Build P

Each swap left-multiplies by a transposition; stack a few and watch PP reorder the rows of AA.

IIIVisualization 2 — Products Stay in the Group

The six 3×33 \times 3 permutations are closed — any product P1P2P_1 P_2 is again one of the six.

IVVisualization 3 — The Symmetric Group S₃

Every product in the table is one of the six: closure, the identity, and each element's inverse at a glance.

💡 These six matrices are the symmetric group S3S_3; an n×nn \times n board has n!n! of them (4!=244! = 24, 5!=1205! = 120).

VVisualization 4 — Pᵀ Undoes P

Apply PP, then PTP^T, and the rows snap back to 1,2,31,2,3 — so PTP=IP^T P = I.

💡 A permutation matrix has orthonormal rows, so it is orthogonal — the same reason Q1=QTQ^{-1} = Q^T holds for every orthogonal QQ.

VIQuiz Questions

Question 1

Consider the permutation matrix P13P_{13} that swaps rows 1 and 3:

P13=[001010100]P_{13} = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix}

If A=[abcdefghi]A = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}, what is the first row of P13AP_{13} \cdot A?

Correct! The 1 in column 3 of row 1 selects row 3 of A.

Not quite. Look at where the 1 sits in the first row of P₁₃ — its column tells you which row of A to pick.

Show solution

Solution:

Row 1 of P13P_{13} is [0,0,1][0, 0, 1]. The dot product with each column of AA:

[0,0,1]A=0(row 1)+0(row 2)+1(row 3)=[g,h,i][0, 0, 1] \cdot A = 0 \cdot \text{(row 1)} + 0 \cdot \text{(row 2)} + 1 \cdot \text{(row 3)} = [g, h, i]

The single 1 in column 3 selects row 3 of AA.

The answer is [g, h, i].

Question 2

What is the product P12P12P_{12} \cdot P_{12}?

P12=[010100001]P_{12} = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}

Correct! Swapping the same two rows twice undoes the swap — you get the identity.

Not quite. Think about what happens physically: swap rows 1 and 2, then swap them again.

Show solution

Solution:

P12P_{12} swaps rows 1 and 2. Applying it twice:

  • First: swap rows 1 ↔ 2
  • Second: swap rows 1 ↔ 2 again (undoing the first swap!)

P122=[010100001][010100001]=[100010001]=IP_{12}^2 = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} = I

Swapping the same two rows twice returns everything to its original position. Every row-swap permutation is its own inverse: P121=P12P_{12}^{-1} = P_{12}.

Question 3

True or False: Every permutation matrix satisfies P2=IP^2 = I (i.e., every permutation matrix is its own inverse).

Correct! Row-swap permutations are self-inverse, but cyclic permutations are not. The universal rule is P⁻¹ = Pᵀ.

Not quite. Consider the cyclic permutation (1→2→3→1) — does applying it twice return to the identity?

Show solution

Solution: False

This is true for row-swap (transposition) permutations like P12P_{12}, P13P_{13}, P23P_{23}, but not for cyclic permutations.

Counterexample: The cyclic permutation P=[001100010]P = \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}

P2=[010001100]IP^2 = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix} \neq I

P2P^2 is the reverse cycle. You need P3=IP^3 = I for this permutation.

The correct general rule is: P1=PTP^{-1} = P^T (the transpose), which works for every permutation matrix.

Question 4

How many distinct 4×44 \times 4 permutation matrices exist?

Correct! There are 4! = 24 ways to arrange 4 rows, giving 24 permutation matrices.

Not quite. The count equals n! — the number of ways to arrange n rows. For n = 4, compute 4 × 3 × 2 × 1.

Show solution

Solution: 24

An n×nn \times n permutation matrix is the identity with its rows rearranged. The number of ways to arrange nn rows is n!n! (n factorial):

4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 24

Size Count
2×22 \times 2 2!=22! = 2
3×33 \times 3 3!=63! = 6
4×44 \times 4 4!=244! = \mathbf{24}
5×55 \times 5 5!=1205! = 120

These n!n! matrices form the symmetric group SnS_n.

Solved: 0 / 4