Banded, LU, and Cholesky
Advanced factorization techniques for efficiency and speed.
🎯 Lecture Goals
- 1 Review Tridiagonal and Banded systems.
- 2 Understand LU Decomposition.
- 3 Master Cholesky Factorization ($LL^T$).
Tridiagonal Systems
Efficiency
- Storage: Only $3n-2$ entries vs $n^2$. No need to store zeros!
- Speed: Operations can be saved.
Elimination Algorithm
Cost: $\mathcal{O}(n)$
Banded Systems
Bandwidth $m=5$
Bandwidth $m=11$
Fill-in
Fill-in: During Gaussian Elimination, zeros inside the band can become non-zeros.
Cost for $m$-band system: $\mathcal{O}(m^2 n)$.
Motivation: Graph Theory
Example Graph Structure
Graph Laplacian Matrix
Why Factorize?
Graph problems often require solving $Ax=b$ for many different $b$ vectors.
- Gaussian Elimination (for $k$ vectors): $\mO(k n^3)$
- LU Decomposition (solve $k$ times): $\mO(n^3 + k n^2)$
LU Decomposition
Factorize $A$ into Lower ($L$) and Upper ($U$) triangular matrices: $A = LU$.
The Solve Process
$A \to L, U$
$Ly = b$
$Ux = y$
With Pivoting
With pivoting, we get $PA = LU$, where $P$ is a permutation matrix.
Cholesky Factorization ($LL^T$)
Requirements
Matrix $A$ must be:
- Symmetric: $A = A^T$
- Positive Definite (SPD): $x^T A x > 0$ for all $x \ne 0$.
Advantages
- Half the FLOPS: Only calculate $L$.
- Memory Efficient: Save 50% storage.
- Stable: No pivoting required! Elements of $L$ do not grow excessively.
- Fast: Usually >2x faster than LU.
Algorithm
The Backslash Operator (\)
In MATLAB, x = A \ b is smart!
🧠 Final Challenge +20 XP
Why is Cholesky factorization preferred over LU factorization for Symmetric Positive Definite (SPD) matrices?