Lesson 4: Elementary Matrices and LU Factorization
Estimated time: 35-45 minutes
Learning Objectives
- Define elementary matrices and relate them to row operations
- Find the inverse of an elementary matrix
- Express a matrix as a product of elementary matrices and an upper-triangular matrix
- Understand the LU factorization A = LU
- Use LU factorization to solve systems efficiently
Elementary Matrices
Elementary Matrix: A matrix obtained by performing a single elementary row operation on the identity matrix. If E is the elementary matrix for a row operation, then EA performs that same operation on A.
Example: Three Types of Elementary Matrices (3x3)
Row swap R_1 ↔ R_2:
Row scaling 3R_2:
Row replacement R_3 + (-2)R_1 → R_3:
Key Insight
Every elementary matrix is invertible. Its inverse is the elementary matrix that undoes the operation:
- Swap inverse = same swap
- Scale by c inverse = scale by 1/c
- Add c times row j to row i inverse = subtract c times row j from row i
Factoring with Elementary Matrices
If you row reduce A to REF U using operations E_1, E_2, ..., E_k, then:
Solving for A: A = E_1^{-1} E_2^{-1} ... E_k^{-1} U. This expresses A as a product of elementary matrices and U.
If A is invertible and U = I, then A^{-1} = E_k ... E_2 E_1 (the product of the elementary matrices used in row reduction).
LU Factorization
LU Factorization: A = LU where L is lower triangular (zeros above diagonal) and U is upper triangular (zeros below diagonal). L captures the multipliers used during forward elimination.
Worked Example
Factor A = [ 2 1 ; 6 4 ].
Forward elimination: R_2 - 3R_1 → R_2 (multiplier = 3):
[ 0 1 ]
Build L: Start with the identity, place the multiplier (3) in position (2,1):
[ 3 1 ]
Verify: LU = [ 1(2)+0(0), 1(1)+0(1) ; 3(2)+1(0), 3(1)+1(1) ] = [ 2 1 ; 6 4 ] = A. ✓
Worked Example: 3x3 LU
Factor A = [ 1 2 1 ; 2 5 3 ; -1 1 2 ].
Step 1: R_2 - 2R_1 (multiplier m_{21} = 2) and R_3 + 1R_1 (multiplier m_{31} = -1):
[ 0 1 1 ]
[ 0 3 3 ]
Step 2: R_3 - 3R_2 (multiplier m_{32} = 3):
[ 0 1 1 ]
[ 0 0 0 ]
Build L from the multipliers:
[ 2 1 0 ]
[-1 3 1 ]
A = LU. ✓
Solving with LU
To solve Ax = b using A = LU:
- Forward solve Ly = b (easy because L is lower triangular).
- Back solve Ux = y (easy because U is upper triangular).
Advantage: If you need to solve Ax = b for many different b vectors (same A), compute the LU factorization once, then do two cheap triangular solves for each new b.
Check Your Understanding
1. What elementary matrix performs R_2 + 5R_1 on a 2x2 matrix?
2. What is the inverse of the elementary matrix E = [ 1 0 ; 5 1 ]?
3. In an LU factorization, where do the elimination multipliers go?
4. Why is LU factorization useful in practice?
Key Takeaways
- Elementary matrices are identity matrices with one row operation applied
- Left-multiplying by E performs that row operation: EA
- Every elementary matrix is invertible; its inverse undoes the operation
- LU factorization: A = LU where L is lower triangular (with multipliers) and U is upper triangular (REF)
- LU is efficient for solving multiple systems with the same coefficient matrix