Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Solve a Triangular System by Back Substitution

In echelon form the last nonzero row has the fewest unknowns. Solve it, put the value into the row above, solve that row, and keep going up until every unknown is found.

Recognize the task

An augmented matrix already in echelon form, or an upper triangular system: x+2y−z=3x + 2y - z = 3, 3y+z=83y + z = 8, 2z=42z = 4. Also the last stage of every Gaussian elimination. Test: does each row start further right than the row above it? Then back substitution applies.
The procedure is the lesson section Back Substitution.

Steps

StepOn [12−1303180024]\left[\begin{array}{ccc|c} 1 & 2 & -1 & 3 \\ 0 & 3 & 1 & 8 \\ 0 & 0 & 2 & 4 \end{array}\right]
1Solve the last nonzero row. Divide the constant by the pivot.2z=4⇒z=22z = 4 \Rightarrow z = 2
2Substitute into the row above and solve it. Move the known terms to the right side; their sign changes.3y+2=8⇒y=23y + 2 = 8 \Rightarrow y = 2
3Repeat up to the first row. Each row needs only values found below it. A column without a pivot is a free variable: name it tt and carry it along.x+2(2)−2=3⇒x=1x + 2(2) - 2 = 3 \Rightarrow x = 1
4Check in the original equations. One substitution into each equation catches slips.1+4−2=31 + 4 - 2 = 3 ✓, 6+2=86 + 2 = 8 ✓, 4=44 = 4 ✓

Worked examples

Example 1 · two unknowns

2 × 2
3x+2y=13, 4y=83x + 2y = 13,\ 4y = 8
already triangular
y=2y = 2, then 3x=13−4=93x = 13 - 4 = 9
bottom row first
x=3, y=2x = 3,\ y = 2

Example 2 · a fraction appears

3 × 3
[21−130321004−4]\left[\begin{array}{ccc|c} 2 & 1 & -1 & 3 \\ 0 & 3 & 2 & 1 \\ 0 & 0 & 4 & -4 \end{array}\right]
z=−1z = -1; 3y−2=1⇒y=13y - 2 = 1 \Rightarrow y = 1
two rows from the bottom
2x+1+1=3⇒x=122x + 1 + 1 = 3 \Rightarrow x = \frac{1}{2}
top row last

Example 3 · a free variable

no pivot in column 2
[12150012]\left[\begin{array}{ccc|c} 1 & 2 & 1 & 5 \\ 0 & 0 & 1 & 2 \end{array}\right]
pivots in columns 1 and 3
z=2z = 2; y=ty = t
yy is free
x=5−2t−2=3−2tx = 5 - 2t - 2 = 3 - 2t
carry tt through
To skip this stage entirely, use Gauss-Jordan elimination.

See it happen

An echelon-form system is a chain: the last equation has one unknown, the one above has one new unknown, and so on to the top. Solving from the bottom means every equation you meet has exactly one unknown left once the values below are put in, so each step is a single division.

Common mistakes

Reading the last column as the answer

✗ (x,y,z)=(3,8,4)(x, y, z) = (3, 8, 4) from the matrix above
✓ back-substitute: (1,2,2)(1, 2, 2); the first try fails row 1, 3+16−4≠33 + 16 - 4 \neq 3

Forgetting the sign when moving a term

✗ 3y+2=8⇒3y=103y + 2 = 8 \Rightarrow 3y = 10
✓ 3y=8−2=63y = 8 - 2 = 6, so y=2y = 2

Not dividing by the pivot

✗ 2z=4⇒z=42z = 4 \Rightarrow z = 4
✓ z=42=2z = \frac{4}{2} = 2