LU Decomposition
Divide a matrix to L(lower triangular matrix) and U(upper triangular matrix), such that A = LU
unit lower triangular matrix L : a square matrix with diagonal equals to 1 and elements above diagonal are all zeros; lower triangular matrix: a square matrix with elements above diagonal are all zero, diagonal not necessary be 1
upper triangular matrix: a square matrix with diagonal below are all zeros; If the diagonal of upper triangular matrix is 1, then it is unit upper triangular matrix
These can be written in the form of as:
Here,
- find U(REF, Gaussian Elimination)
- find L, look at the multipliers that are used to eliminate entries below the main diagonal when transforming A into U.
To transform A into an upper triangular matrix U, we eliminate the 6 in the position a21 by subtract 1.5 times Row 1 from the Row 2
- set LZ = B to get Z
- set Ux=Z to get x
Example of 4x4 matrix: