⎩⎨⎧a11x1+a12x2+⋯+a1nxn=b1a22x2+⋯+a2nxn=b2⋱⋮annxn=bn
Solve from the bottom up:
xn=annbn,xi=aiibi−j=i+1∑naijxjfor i=n−1,…,1
Where:
xi = The unknown variable being solved for in the i-th equation
aij = The coefficient of variable x_j in the i-th equation
bi = The constant on the right-hand side of the i-th equation
n = 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=3
Step 2: Substitute z = 3 into the second equation and solve for y.
2y+(3)=8⟹2y=5⟹y=25
Step 3: Substitute y = 5/2 and z = 3 into the first equation and solve for x.
x+3(25)−(3)=10⟹x+215−3=10⟹x=10−215+3=211
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=3
Step 2: Substitute y = 3 into the first equation and solve for x.
3x+6(3)=18⟹3x+18=18⟹3x=0⟹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-Substitution
Gauss-Jordan Elimination
Goal
Solve a system already in row-echelon form by substituting upward
Reduce the augmented matrix all the way to reduced row-echelon form so the solution can be read directly
Matrix form required
Row-echelon form (upper triangular)
Produces reduced row-echelon form (identity matrix on the left)
Technique
Algebraic substitution from the last equation upward
Additional row operations to eliminate entries above each pivot
When to use
After Gaussian elimination; efficient for hand calculations
When 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.