Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Solve a System by Gauss-Jordan Elimination

Gauss-Jordan elimination is Gaussian elimination carried one stage further: every pivot is scaled to 11 and every entry above it is cleared too. At the end each row says "this unknown equals this number", so no back substitution is needed.

Recognize the task

The same systems as Gaussian elimination, when you want the answer in the cleanest form: a system with free variables, a problem that asks for the reduced form, or the inverse of a matrix through [A∣I][A \mid I]. Test: will you need every pivot variable written in terms of the free ones? Then go all the way to reduced form.
The backward pass is described in the lesson section Gauss-Jordan Elimination.

Steps

StepOn x+y+z=6, 2x+3y+z=11, x−y+2z=5x + y + z = 6,\ 2x + 3y + z = 11,\ x - y + 2z = 5
1Reduce to echelon form. The forward pass of Gaussian elimination: clear below each pivot.[111601−1−100−1−3]\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -1 & -1 \\ 0 & 0 & -1 & -3 \end{array}\right]
2Scale each pivot row so the pivot is 1. Divide the whole row, constant included, by its pivot.Elementary row operations ↗−R3→R3-R_3 \to R_3: [0 0 1∣3][0\ 0\ 1 \mid 3]
3Clear above each pivot, starting from the bottom one. Use the pivot row to make every entry above the pivot zero. Working bottom-up keeps the zeros you have already made.Elementary row operations ↗R2+R3, R1−R3R_2 + R_3,\ R_1 - R_3, then R1−R2R_1 - R_2
4Read the solution. Each pivot row gives one unknown. A column without a pivot is a free variable.[100101020013]\left[\begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 3 \end{array}\right]: x=1, y=2, z=3x = 1,\ y = 2,\ z = 3

Worked examples

Example 1 · two equations

2 × 2
2x+4y=10, x+3y=72x + 4y = 10,\ x + 3y = 7
12R1\frac{1}{2}R_1: [1 2∣5][1\ 2 \mid 5]; R2−R1R_2 - R_1: [0 1∣2][0\ 1 \mid 2]
pivot 1, clear below
R1−2R2R_1 - 2R_2: [1 0∣1][1\ 0 \mid 1]
clear above
x=1, y=2x = 1,\ y = 2
read the rows

Example 2 · three equations

3 × 3
[121125331334]\left[\begin{array}{ccc|c} 1 & 2 & 1 & 1 \\ 2 & 5 & 3 & 3 \\ 1 & 3 & 3 & 4 \end{array}\right]
R2−2R1, R3−R1, R3−R2R_2 - 2R_1,\ R_3 - R_1,\ R_3 - R_2: [0 0 1∣2][0\ 0\ 1 \mid 2]
forward pass
R2−R3R_2 - R_3: [0 1 0∣−1][0\ 1\ 0 \mid {-1}]; R1−R3R_1 - R_3: [1 2 0∣−1][1\ 2\ 0 \mid {-1}]
clear above the third pivot
R1−2R2R_1 - 2R_2: x=1, y=−1, z=2x = 1,\ y = -1,\ z = 2
clear above the second pivot

Example 3 · a free variable

more unknowns
x+2y+z=4, 2x+4y+3z=11x + 2y + z = 4,\ 2x + 4y + 3z = 11
R2−2R1R_2 - 2R_1: [0 0 1∣3][0\ 0\ 1 \mid 3]
pivot jumps to column 3
R1−R2R_1 - R_2: [1 2 0∣1][1\ 2\ 0 \mid 1]
clear above
y=sy = s: x=1−2s, z=3x = 1 - 2s,\ z = 3
yy has no pivot: free
For free variables, continue with parametric solutions.

See it happen

Reduced form is the system rewritten so that each equation mentions one pivot unknown and nothing else except free unknowns. Clearing above a pivot removes that unknown from every other equation, which is exactly what back substitution would do one row at a time. Gauss-Jordan simply does it on the matrix instead of on the equations. The Gaussian elimination visualizer shows both passes.

Common mistakes

Stopping at echelon form

✗ reading (6,−1,−3)(6, -1, -3) from [1 1 1∣6][1\ 1\ 1 \mid 6], [0 1 −1∣−1][0\ 1\ {-1} \mid {-1}], [0 0 −1∣−3][0\ 0\ {-1} \mid {-3}]
✓ finish the backward pass: (1,2,3)(1, 2, 3)

Clearing with a pivot that is not 1

✗ R1−R3R_1 - R_3 with R3=[0 0 −1∣−3]R_3 = [0\ 0\ {-1} \mid {-3}] gives [1 1 2∣9][1\ 1\ 2 \mid 9]
✓ scale first, R3=[0 0 1∣3]R_3 = [0\ 0\ 1 \mid 3]; then R1−R3=[1 1 0∣3]R_1 - R_3 = [1\ 1\ 0 \mid 3]

Forgetting to scale the last pivot

✗ [2 0∣2][2\ 0 \mid 2] read as x=2x = 2
✓ divide the row by 22: x=1x = 1