Skip to content
Glacius
Linear algebraConcept reference

Back substitution

Back substitution solves a triangular system by substituting known later variables into the equations above them.

On this page 7 sections
  1. Overview
  2. Here the triangular system has nonzero diagonal coefficients
  3. Back substitution uses solved variables, not raw right-hand sides
  4. Check the result in every original equation
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections
Back substitution moves upward through a triangular system. From bottom to top: z=2, then y=3, then x=3. Empty cells indicate absent earlier variables.Back substitution moves upward through a triangular system. From bottom to top: z=2, then y=3, then x=3. Empty cells indicate absent earlier variables.
Figure 1Back substitution moves upward through a triangular system. From bottom to top: z=2, then y=3, then x=3. Empty cells indicate absent earlier variables.
Link to this figure ↗Download SVGDownload PNG

01Here the triangular system has nonzero diagonal coefficients#

Here the triangular system has nonzero diagonal coefficients. Its last equation contains only z: 2z=42z=4 gives z=2z=2. Substitute upward: y+z=5y+z=5 gives y=3y=3, then x+yz=4x+y-z=4 gives x=3x=3.

2z=4y+z=5x+yz=4\begin{aligned}2z&=4\\y+z&=5\\x+y-z&=4\end{aligned}

For 2x+y=82x+y=8 and 3y=63y=6, solve the second equation first: y=2y=2. Substitute that value into the first, then divide by 2.

x=822=3x=\frac{8-2}{2}=3
Check your reasoning

Solve for xx. x+y=82y=6\begin{aligned}x+y&=8\\2y&=6\end{aligned}

Show answer and explanation
5

First y=3y=3, then x=83=5x=8-3=5.

02Back substitution uses solved variables, not raw right-hand sides#

Back substitution uses solved variables, not raw right-hand sides. In 4y=84y=8, the known value is y=2y=2. Substituting 8 instead would violate that equation.

Check your reasoning

A learner takes y as 8. Repair (x,y)(x,y). xy=1x-y=1; 4y=84y=8

  1. A(3,2)
  2. B(9,8)
  3. C(1,2)
Show answer and explanation
(3,2)

First y=2y=2, then x=3x=3.

03Check the result in every original equation#

Check the result in every original equation. For 2x+y=82x+y=8 and 3y=63y=6, the pair (3,2)(3,2) gives 2(3)+2=82(3)+2=8 and 3(2)=63(2)=6.

Check your reasoning

A device reports 10 for twice x plus y. It reports 6 for three times y. Find (x,y)(x,y).

  1. A(2,4)
  2. B(2,6)
  3. C(4,2)
Show answer and explanation
(4,2)

First y=2y=2; then 2x=82x=8.

Key takeaway

Start at the last equation. Solve, substitute upward, and check every original equation.

  • Solve a triangular system by back substitution.

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Back substitution.” Math behind ML. /learn/la-backsolve