Linear Algebra, Live
Strang §2.3 · Elimination using matrices

Each elimination step is a matrix.

Subtracting ℓ times row 1 from row 2 is the same as multiplying by E₂₁: the identity matrix with −ℓ in row 2, column 1.

E₂₁ = 100−ℓ10001    E₂₁A = A with row 2 − ℓ·(row 1)

Think: an instruction card

A row operation is an instruction: "take row 2, subtract 2 of row 1, leave everything else alone". E₂₁ is that instruction written as a matrix.

Multiplying by E is following the card. Elimination is a stack of cards applied one after another:

E₃₂ E₃₁ E₂₁ A = U
Read right to left, like socks and shoes: E₂₁ acts first.

Why it works: rows combine rows

Lesson 1 read Ax by columns. EA is easiest to read by rows: row i of EA is (row i of E) times A. That is a combination of the rows of A.

  • Row 1 of E₂₁ is (1, 0, 0): keep row 1 as it is.
  • Row 2 is (−ℓ, 1, 0): row 2 minus ℓ times row 1.
  • Row 3 is (0, 0, 1): keep row 3.

Worked example

With ℓ = 2, E₂₁ times A:
new row 2 = (4, −6, 0) − 2·(2, 1, 1) = (0, −8, −2)

Undoing a card

To undo "subtract 2 of row 1", add 2 of row 1 back. So E₂₁⁻¹ is the identity with +ℓ in the same spot. Hold on to that: it is the key to A = LU on the next slide.

Exercise Build E₃₁ so that E₃₁ E₂₁ A has zeros below the first pivot. Edit the code and press Run.
slide_4.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
→