Mathwords logoReference LibraryMathwords

Back-Substitution

Back-Substitution

The process of solving a linear system of equations that has been transformed into row-echelon form or reduced row-echelon form. The last equation is solved first, then the next-to-last, etc.

 

Example:

Consider a system with the given row-echelon form for its augmented matrix.

Augmented matrix in row-echelon form: rows [1, -2, 1 | 4], [0, 1, 6 | -1], [0, 0, 1 | 2]

The equations for this system are

\(\eqalign{x - 2y + z &= 4\\y + 6z &= - 1\\z &= 2}\)

The last equation says z = 2. Substitute this into the second equation to get

\(\eqalign{y + 6\left( 2 \right) &= - 1\\y &= - 13}\)

Now substitute z = 2 and y = –13 into the first equation to get

\(\eqalign{x - 2\left( { - 13} \right) + \left( 2 \right) &= 4\\x &= - 24}\)

Thus the solution is x = –24, y = –13, and z = 2.

 

See also

Augmented matrix

Key Formula

{a11x1+a12x2++a1nxn=b1a22x2++a2nxn=b2annxn=bn\begin{cases} a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n = b_1 \\ a_{22}x_2 + \cdots + a_{2n}x_n = b_2 \\ \quad\quad\quad\quad\ddots \quad\quad\vdots \\ a_{nn}x_n = b_n \end{cases} Solve from the bottom up: xn=bnann,xi=bij=i+1naijxjaiifor i=n1,,1x_n = \frac{b_n}{a_{nn}}, \quad x_i = \frac{b_i - \displaystyle\sum_{j=i+1}^{n} a_{ij}\,x_j}{a_{ii}} \quad \text{for } i = n-1, \ldots, 1
Where:
  • xix_i = The unknown variable being solved for in the i-th equation
  • aija_{ij} = The coefficient of variable x_j in the i-th equation
  • bib_i = The constant on the right-hand side of the i-th equation
  • nn = The total number of equations (and unknowns)

Worked Example

Problem: Solve the following system, which is already in row-echelon form: x + 3y − z = 10 2y + z = 8 z = 3
Step 1: Start with the last equation and solve for z directly.
z=3z = 3
Step 2: Substitute z = 3 into the second equation and solve for y.
2y+(3)=8    2y=5    y=522y + (3) = 8 \implies 2y = 5 \implies y = \frac{5}{2}
Step 3: Substitute y = 5/2 and z = 3 into the first equation and solve for x.
x+3 ⁣(52)(3)=10    x+1523=10    x=10152+3=112x + 3\!\left(\frac{5}{2}\right) - (3) = 10 \implies x + \frac{15}{2} - 3 = 10 \implies x = 10 - \frac{15}{2} + 3 = \frac{11}{2}
Answer: The solution is x = 11/2, y = 5/2, z = 3.

Another Example

This example uses a simpler 2-variable system to show that back-substitution works the same way regardless of the number of variables. It also demonstrates the common case where the leading coefficient of the first equation is not 1.

Problem: Use back-substitution on the 2×2 upper-triangular system: 3x + 6y = 18 4y = 12
Step 1: Solve the last equation for y.
4y=12    y=34y = 12 \implies y = 3
Step 2: Substitute y = 3 into the first equation and solve for x.
3x+6(3)=18    3x+18=18    3x=0    x=03x + 6(3) = 18 \implies 3x + 18 = 18 \implies 3x = 0 \implies x = 0
Answer: The solution is x = 0, y = 3.

Frequently Asked Questions

What is the difference between back-substitution and Gaussian elimination?
Gaussian elimination is the process of using row operations to transform a system into row-echelon form. Back-substitution is the step that comes after: once the system is in that triangular form, you solve from the bottom equation upward. Together, the two steps give you the full solution.
When do you use back-substitution?
You use back-substitution whenever a system of linear equations is in upper-triangular (row-echelon) form, meaning each equation has one fewer leading variable than the one above it. This typically happens after performing Gaussian elimination or after factoring a matrix into LU form.
Does back-substitution work for systems with infinitely many solutions?
If a row-echelon system has more unknowns than pivot variables (non-zero rows), some variables become free parameters. You can still use back-substitution to express the pivot variables in terms of those free parameters, giving you a general solution rather than a unique one.

Back-Substitution vs. Gauss-Jordan Elimination

Back-SubstitutionGauss-Jordan Elimination
GoalSolve a system already in row-echelon form by substituting upwardReduce the augmented matrix all the way to reduced row-echelon form so the solution can be read directly
Matrix form requiredRow-echelon form (upper triangular)Produces reduced row-echelon form (identity matrix on the left)
TechniqueAlgebraic substitution from the last equation upwardAdditional row operations to eliminate entries above each pivot
When to useAfter Gaussian elimination; efficient for hand calculationsWhen you want to avoid substitution entirely; common in automated algorithms

Why It Matters

Back-substitution is a core step in solving systems of linear equations, which appear throughout algebra, engineering, physics, and computer science. Any time you use Gaussian elimination—whether in a high school algebra class or a university linear algebra course—back-substitution is how you extract the final answer. It also forms part of the LU decomposition algorithm used in numerical computing to solve large systems efficiently.

Common Mistakes

Mistake: Forgetting to substitute ALL previously found values into earlier equations.
Correction: When solving for a variable in equation i, you must substitute every variable you've already found (from equations i+1 through n), not just the one from the equation directly below. For example, when solving the first equation in a 3-variable system, plug in both z and y.
Mistake: Making sign errors when substituting negative values.
Correction: Use parentheses around every substituted value, especially negatives. Writing −2(−13) with clear parentheses prevents misreading it as −2·13. This is the most common arithmetic error in back-substitution.

Related Terms