LU decomposition, explained
5 min read
Short answer
LU decomposition writes with lower triangular (ones on the diagonal) and upper triangular, recording the steps of Gaussian elimination. To solve : solve (forward substitution), then (back substitution).
What L and U are
Gaussian elimination turns into the upper triangular . The multiplier used to clear each entry, , goes below the diagonal of . Together holds exactly.
Pivoting
If a pivot is zero or tiny, swap rows first. This gives with a permutation matrix , the form used by practical solvers.
Worked example
Factor and solve .
Multiplier : , . Forward: , . Back: , . Check: , . ✓
Try it yourself
How many operations does each extra right-hand side cost, compared with the factorization?
Show the answer
About for the two triangular solves, versus about for the factorization, so many right-hand sides are cheap after one LU.
Keep going with practice
Vidi's linear algebra lessons teach the elimination that LU records.