Gaussian Elimination⚓︎
Lower–Upper (LU) decomposition or factorization factors a matrix as the product of a lower triangular matrix and an upper triangular matrix. The product sometimes includes a permutation matrix as well. LU decomposition can be viewed as the matrix form of Gaussian Elimination.
Introduction to LU Factorization⚓︎
General steps of Gaussian Elimination:
Question
: What is
In essence:
Define
And:
Then:
Note that the inverse of a lower triangular matrix is also a lower triangular matrix. The product of lower triangular matrices is also a lower triangular matrix.
Define
is the LU factorization.
Here are some useful conclusions:
Also note:
This is good for bookkeeping the solutions. Therefore:
To solve
Steps of Gaussian Elimination⚓︎
Algorithm
( Simple Gaussian Elimination (GE) ):
( Given
Let
For
- For
: ; ;
- End;
End
There are actually three loops for this algorithm.
Question
: What is the cost of the algorithm?
We measure the computational complexity by the number of flops (floating point operations):
Therefore, the cost of LU factorization is
Forward and Backward Substitution⚓︎
Consider
For
End. The cost for it is
Consider
For
Evaluation⚓︎
Gaussian-Elimination (Native) is not stable!
e.g., Matrix
e.g., For matrix
Apply GE, we get:
However, in computer representation, the actual matrix might be like:
Then:
A small mistake can lead to a large perturbation.
Solution to this problem is partial pivoting.