Euler Hall — free maths guides

Finish back-substitution for an upper-triangular system

Work upward substituting the known unknowns. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.

In plain words

Back substitution is the same one-row step repeated until every unknown is found. The only thing that changes between steps is the amount of arithmetic: row 3 has one unknown, row 2 has two, row 1 has three.

Row 3.2x3=42x_3=4, sox3=2x_3=2.

Row 2.3x2+x3=83x_2+x_3=8. Substitutex3=2x_3=2:3x2=63x_2=6, sox2=2x_2=2.

Row 1.2x1+x2+x3=92x_1+x_2+x_3=9. Substitute both:2x1+2+2=92x_1+2+2=9, so2x1=52x_1=5 andx1=52x_1=\frac52.

Check.2⋅52+2+2=5+4=92\cdot\frac52+2+2=5+4=9 ✓

Three rows, three divisions, three substitutions. That is the whole algorithm.

Why working upward is the only route

Rowkk of an upper triangular system containsxkx_k and the unknowns after it. In the bottom row, "the unknowns after it" is the empty set. In the row above, it is one unknown. So the number of unknowns decreases as you move down, and exactly one row — the last — is solvable at the start.

This is not a convention about presentation; it is a statement about what is determined. Any attempt to solve row 1 first faces three unknowns and one equation, which has a two-parameter family of solutions, none of them the solution.

The division is by the pivot in that row, and the pivot is nonzero by construction — elimination refused to leave a zero on the diagonal. If one survives, the substitution stops there, and that is a failure of the elimination rather than of the substitution.

Worked example, in the exam's shape

SolveUx=cU\mathbf{x}=\mathbf{c} with

Row 3.6x3=186x_3=18 ⟹x3=3x_3=3.

Row 2.4x2+5x3=234x_2+5x_3=23. Write the term:4x2+15=234x_2+15=23, so4x2=84x_2=8 andx2=2x_2=2.

Row 1.x1+2x2+3x3=14x_1+2x_2+3x_3=14. Write the terms:x1+4+9=14x_1+4+9=14, sox1=1x_1=1.

Check every row of the original system.

Row 1:1+2(2)+3(3)=1+4+9=141+2(2)+3(3)=1+4+9=14 ✓ Row 2:4(2)+5(3)=8+15=234(2)+5(3)=8+15=23 ✓ Row 3:6(3)=186(3)=18 ✓

Solution(1,2,3)(1,2,3). Note that each step needed the previous answers, so a single error in row 2 would have corrupted row 1 as well — which is exactly why the check is against the original rows and not against the step you just did.

By the end you can
  • Work upward substituting the known unknowns
  • Confirm a back-substituted solution in the original equations
  • Carry an exact fraction through the whole upward sweep
Check yourself
  1. 1.U=[3102]U=\begin{bmatrix}3&1\\0&2\end{bmatrix},c=(7,4)\mathbf{c}=(7,4). Solve.
  2. 2. In the same system, what isx2x_2?
  3. 3. How many substitutions does row 2 of a4×44\times4 triangular system need?
  4. 4. Ifx3=5x_3=5 and row 2 is2x2+4x3=222x_2+4x_3=22, what isx2x_2?
  5. 5. What does it mean if a diagonal entry ofUU is zero when you reach it?
Answers
  1. 1.x2=2x_2=2, then3x1+2=73x_1+2=7 sox1=53x_1=\frac53.
  2. 2.x2=4/2=2x_2=4/2=2.
  3. 3. Two —x3x_3 andx4x_4 appear in it.
  4. 4.2x2+20=222x_2+20=22, so2x2=22x_2=2 andx2=1x_2=1.
  5. 5. That the row cannot be divided, so the substitution stops. It is a defect of the elimination that producedUU, which should have exchanged rows.
Work out where to start — free, no accountAnswer six real questions — free, no account