Linear Algebra, Live
Strang §2.2 · Pivots

Pivots clear the columns. Back substitution climbs back up.

With three equations, use the first pivot to clear column 1, then the second pivot to clear column 2. You end with a triangle U. Its last row has a single unknown.

2114−60−272  →  2110−8−2001

Think: a chain of keys

Picture three locked boxes. The key to box 2 is inside box 3. The key to box 1 is inside box 2. You can only start with box 3.

An upper triangular system works the same way. The last equation has one unknown, so you open it first. Its value unlocks the equation above, and so on to the top. That is back substitution.

Forward: clear column by column

  • Column 1: the pivot is 2. ℓ₂₁ = 4 ÷ 2 = 2 and ℓ₃₁ = −2 ÷ 2 = −1. Subtract ℓ times row 1 from rows 2 and 3.
  • Column 2: the new second row starts 0, −8. The pivot is −8. Use it to clear the 8 below it.

The pivots are the numbers on the diagonal of U: 2, −8 and 1. A pivot is never zero. You divide by it to get each multiplier.

Worked example

Solve with b = (5, −2, 9). Do the same subtractions to b:
b₂: −2 − 2·5 = −12    b₃: 9 + 5 = 14, then 14 + (−12) = 2
z = 2  →  −8y − 2·2 = −12, so y = 1  →  2x + 1 + 2 = 5, so x = 1
Check in the original first row: 2·1 + 1 + 2 = 5 ✓

Watch out

Always do the same step to b. Changing A without changing b gives a different system.

The multiplier uses the current pivot, after earlier steps, not the original entry. Here ℓ₃₂ uses the −8, not the −6.

Exercise Finish the elimination: find ℓ₃₂ so that U is upper triangular. Edit the code and press Run.
slide_2.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
→