Elimination
View .md

LU Decomposition

LU decomposition factors a matrix into a lower triangular matrix LL and an upper triangular matrix UU:

A=LUA = LU

The Matrices

  • LL β€” lower triangular (1’s on diagonal, multipliers below)
  • UU β€” upper triangular (the result of elimination)

Why It’s Useful

Instead of solving Ax=bAx = b once, we solve:

  1. Lc=bLc = b (forward substitution)
  2. Ux=cUx = c (back substitution)

This is fast! And if you have many right-hand sides b1,b2,…b_1, b_2, \ldots, you only factor AA once.

With Row Exchanges

If row exchanges are needed, we get:

PA=LUPA = LU

Where PP is a permutation matrix that records the row swaps.

Cost

  • Factorization: O(13n3)O(\frac{1}{3}n^3)
  • Each solve: O(n2)O(n^2)

Much cheaper than inverting the matrix!