LU Decomposition
Definition
The LU decomposition of a matrix is a factorization , where is unit lower-triangular (ones on the diagonal) and is upper-triangular.
Intuition
Gaussian elimination simultaneously produces two matrices: the upper-triangular result and the record of elimination multipliers . LU decomposition simply names and stores both, amortising the elimination cost across all future solves with the same .
Formal Description
From Elementary Matrices, Gaussian elimination gives
Inverting each elementary matrix simply negates the off-diagonal multiplier:
The lower-triangular factor is assembled by simply placing the elimination multipliers into their respective positions:
The full decomposition for the example matrix is:
The off-diagonal entries of are exactly the elimination multipliers used during Gaussian elimination. LU decomposition requires operations; once computed, each solve costs only .
Applications
Solving for many vectors — see Solving (LU)x=b. Also used internally for determinant computation and matrix inversion.
Trade-offs
- Requires to be non-singular (or at minimum that no zero pivot is encountered without row swaps); a singular matrix has no LU factorisation without permutation.
- Without pivoting the decomposition exists only if no pivot is zero; partial pivoting (producing ) is required for general non-singular matrices.
- Storing both and uses memory, the same as itself (they can be packed into a single matrix).