LU Decomposition
LU decomposition factors a matrix into a lower triangular matrix and an upper triangular matrix :
The Matrices
- β lower triangular (1βs on diagonal, multipliers below)
- β upper triangular (the result of elimination)
Why Itβs Useful
Instead of solving once, we solve:
- (forward substitution)
- (back substitution)
This is fast! And if you have many right-hand sides , you only factor once.
With Row Exchanges
If row exchanges are needed, we get:
Where is a permutation matrix that records the row swaps.
Cost
- Factorization:
- Each solve:
Much cheaper than inverting the matrix!