LINEAR-ALGEBRA ยท Unit 5 ยท Video 1 ยท Interactive Practice

Permutation Matrices and the PA = LU Factorization

IKey Formulas

Formula Name Description
PA=LUPA = LU Universal factorization Works for every invertible matrix
Pโˆ’1=PTP^{-1} = P^T Permutation inverse Every permutation matrix is orthogonal
n!n! permutation matrices Counting formula Number of nร—nn \times n permutation matrices
A=LUA = LU when P=IP = I Special case No row swaps needed during elimination

IIVisualization 1 โ€” What a permutation does to the rows of AA

A permutation matrix reorders the rows of AA; only some orderings place a nonzero entry in the first pivot.

๐Ÿ’ก Challenge: only one of these six orderings gives a valid first pivot โ€” find it.

IIIVisualization 2 โ€” Building PA=LUPA = LU step by step

A zero pivot stalls elimination; a row swap PP restarts it, and PA=LUPA = LU records the whole run.

Step 0 ยท Zero pivot
a11=0a_{11} = 0: elimination cannot divide by the pivot.
Step 1 ยท Build P
Swap R1โ†”R2R_1 \leftrightarrow R_2 on the identity to form PP.
Step 2 ยท Form PA
PAPA now has a valid pivot (1,1)=1(1,1) = 1; elimination proceeds.
Step 3 ยท Clear (3,1)
โ„“31=21=2\ell_{31} = \tfrac{2}{1} = 2, so R3โ†R3โˆ’2R1R_3 \leftarrow R_3 - 2R_1 gives [0,3,7][0, 3, 7]. Store 22 in L31L_{31}.
Step 4 ยท Clear (3,2)
โ„“32=31=3\ell_{32} = \tfrac{3}{1} = 3, so R3โ†R3โˆ’3R2R_3 \leftarrow R_3 - 3R_2 gives [0,0,4][0, 0, 4]. Store 33 in L32L_{32}.
Step 5 ยท PA = LU
LL holds the multipliers 2,32, 3; UU holds the pivots 1,1,41, 1, 4.

๐Ÿ’ก In practice PP isn't known in advance โ€” you discover the swap only when elimination stalls on a zero pivot.

IVVisualization 3 โ€” Why Pโˆ’1=PTP^{-1} = P^{T}

Applying a permutation and then its transpose returns every row home, so PTP=IP^{T}P = I.

๐Ÿ’ก PTP=IP^{T}P = I says the columns of PP are orthonormal โ€” every permutation matrix is orthogonal, at any size.

VQuiz Questions

Question 1 ยท Counting Permutation Matrices

How many 4ร—44 \times 4 permutation matrices exist?

โœ… Correct! There are 4! = 24 permutation matrices of size 4ร—4.

โŒ Not quite. The count is n! (n factorial). For n = 4, compute 4 ร— 3 ร— 2 ร— 1.

Show solution

Solution:

The number of nร—nn \times n permutation matrices is n!n! (n factorial).

For n=4n = 4: 4!=4ร—3ร—2ร—1=244! = 4 \times 3 \times 2 \times 1 = 24

Each permutation matrix corresponds to one possible reordering of the 4 rows. The first row can go to any of 4 positions, the second to any of the remaining 3, and so on.

Question 2 ยท When Is A = LU Sufficient?

True or False: The factorization A=LUA = LU (without a permutation matrix PP) works for every invertible matrix.

โœ… Correct! A = LU only works when no row swaps are needed. PA = LU is the universal factorization.

โŒ Not quite. Consider what happens when elimination encounters a zero pivot โ€” can A = LU still work?

Show solution

Solution:

False. A=LUA = LU only works when elimination requires no row swaps โ€” that is, when every pivot encountered during elimination is nonzero without rearranging.

If a zero (or near-zero) pivot appears, we must swap rows. The permutation matrix PP records those swaps, giving the universal factorization PA=LUPA = LU.

A=LUA = LU is the special case of PA=LUPA = LU where P=IP = I (the identity).

Question 3 ยท Identifying the Permutation Matrix

To fix the zero pivot in A=[011121279]A = \begin{bmatrix} 0 & 1 & 1 \\ 1 & 2 & 1 \\ 2 & 7 & 9 \end{bmatrix}, we swap rows 1 and 2.

Which matrix is the correct permutation matrix PP for this swap?

โœ… Correct! Swapping rows 1 and 2 of the identity gives this P.

โŒ Not quite. To build P, apply the needed row swap to the identity matrix. We need to swap rows 1 and 2.

Show solution

Solution:

To swap rows 1 and 2, perform the same swap on the identity matrix:

I=[100010001]โ†’R1โ†”R2P=[010100001]I = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \xrightarrow{R_1 \leftrightarrow R_2} P = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}

  • Option A swaps rows 2 and 3 (wrong pair)
  • Option B swaps rows 1 and 2 โœ“
  • Option C swaps rows 1 and 3 (wrong pair)
  • Option D is the identity โ€” no swap at all

Question 4 ยท Computing the Multiplier

After the row swap, we have PA=[121011279]PA = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 2 & 7 & 9 \end{bmatrix}.

In the first elimination step, R3โ†R3โˆ’โ„“31โ‹…R1R_3 \leftarrow R_3 - \ell_{31} \cdot R_1, what is the multiplier โ„“31\ell_{31} and what does row 3 become?

โœ… Correct! The multiplier is 2 and row 3 becomes [0, 3, 7].

โŒ Not quite. The multiplier = (entry to eliminate) / (pivot) = 2/1 = 2. Subtract 2 times row 1 from row 3.

Show solution

Solution:

The multiplier is the entry to eliminate divided by the pivot: โ„“31=a31a11=21=2\ell_{31} = \frac{a_{31}}{a_{11}} = \frac{2}{1} = 2

Then R3โ†R3โˆ’2โ‹…R1R_3 \leftarrow R_3 - 2 \cdot R_1: [279]โˆ’2โ‹…[121]=[037]\begin{bmatrix} 2 & 7 & 9 \end{bmatrix} - 2 \cdot \begin{bmatrix} 1 & 2 & 1 \end{bmatrix} = \begin{bmatrix} 0 & 3 & 7 \end{bmatrix}

  • Column 1: 2โˆ’2(1)=02 - 2(1) = 0 โœ“ (eliminated!)
  • Column 2: 7โˆ’2(2)=37 - 2(2) = 3
  • Column 3: 9โˆ’2(1)=79 - 2(1) = 7

The multiplier โ„“31=2\ell_{31} = 2 is stored in position (3,1)(3,1) of LL.

Solved: 0 / 4