numerical linear algebra
LU Factorization
You should know: matrices, determinant
Overview
LU factorization decomposes a square matrix A into a lower triangular matrix L and an upper triangular matrix U, so that A = LU (or A = PLU with a permutation matrix P for numerical stability). This factorization is the foundation of Gaussian elimination and enables efficient solution of linear systems, computation of determinants, and matrix inversion.
Intuition
Gaussian elimination — the process of using row operations to reduce a matrix to upper triangular form — is exactly LU factorization. Each elimination step corresponds to multiplying on the left by a lower triangular matrix. L records all the multipliers used during elimination, and U is the upper triangular result. Once you have A = LU, solving Ax = b reduces to two triangular solves, which are fast.
Formal Definition
Given an n×n matrix A, the LU factorization (with partial pivoting) is:
Notation
| Notation | Meaning |
|---|---|
| Lower triangular matrix with 1s on the diagonal | |
| Upper triangular matrix | |
| Permutation matrix for partial pivoting |
Properties
Existence
System solving
Determinant
Uniqueness
Applications
Solving large sparse linear systems in finite element analysis. LU factorization of the stiffness matrix is done once; then multiple right-hand sides can be solved cheaply.
Worked Examples
- 1
Eliminate column 1: use pivot a_{11}=2. Multipliers: l_{21}=4/2=2, l_{31}=8/2=4.
- 2
Eliminate column 2: pivot a_{22}=1. Multiplier: l_{32}=3/1=3.
- 3
U is the upper triangular result; L records multipliers.
- 4
Verify: L U = A.
✓ Answer
L = [[1,0,0],[2,1,0],[4,3,1]], U = [[2,1,1],[0,1,1],[0,0,2]].
Practice Problems
Find the LU factorization of A = [[1,2],[3,4]].
Using LU factorization, find det([[2,1],[4,3]]).
Common Mistakes
LU factorization always exists without pivoting.
Without pivoting, LU fails if a zero pivot is encountered (even for invertible matrices). Partial pivoting (PLU) is needed for numerical stability.
Quiz
Summary
- LU factorization writes A = LU with L lower triangular (diagonal 1s) and U upper triangular.
- It encodes Gaussian elimination: L records multipliers, U is the reduced form.
- Solving Ax = b via LU: forward-substitute Ly = b, then back-substitute Ux = y.
- det(A) = product of diagonal entries of U (times ±1 for row swaps).
- Partial pivoting (PA = LU) is needed for numerical stability in practice.
References
- WebsiteWikipedia — LU decomposition
Mathematics