Linear Algebra, Live
Strang §2.6 · Elimination = factorization

A = LU: the triangle U and the receipt L.

Elimination turns A into an upper triangular U. The multipliers you used fit into a lower triangular L, exactly where you used them. Multiply back and you get A.

A = LU    L = 100ℓ₂₁10ℓ₃₁ℓ₃₂1

Think: meal prep

On Sunday you chop every vegetable for the week. That is the slow part. On weekdays each dinner takes five minutes.

Factoring A = LU is the Sunday work. Each new right-hand side b is a weekday dinner: two quick triangular solves.

Lc = b  (forward, top to bottom)    then    Ux = c  (back, bottom to top)

Why the multipliers drop right in

Elimination is E₃₂E₃₁E₂₁A = U. Undo the cards in reverse order and you get A = E₂₁⁻¹E₃₁⁻¹E₃₂⁻¹U. That product of inverses is L.

Each inverse just has +ℓ where E had −ℓ. Multiplied in this order, they don't interfere: every ℓ lands in its own position. No extra arithmetic. L is the receipt of every step you took.

Worked example

From the last two slides: ℓ₂₁ = 2, ℓ₃₁ = −1, ℓ₃₂ = −1.
L = 100210−1−11   U = 2110−8−2001
Row 3 of LU: −1·(2, 1, 1) − 1·(0, −8, −2) + 1·(0, 0, 1) = (−2, 7, 2) ✓

Why it matters

For n unknowns, factoring costs about n³/3 operations. Each solve after that costs about n². With n = 1000: around 330 million for the factoring, then about a million per new b.

So when the matrix stays the same and only the right side changes, as in a simulation stepping through time, you factor once and reuse it. The lab has lu(A) if you want to check your own matrices.

Exercise Fill in the missing multiplier ℓ₃₂ in L so that L @ U gives back A. Edit the code and press Run.
slide_5.py Loading Python…
1
Output · Ctrl+Enter runs
Press Run to execute this slide's code. Ctrl+Enter works too.
✎Lesson review
3 more worked examples and 5 mixed problems with solutions
→