Skip to main content

Gauss-Jordan vs. Gaussian Elimination

Both algorithms solve linear systems. Here is exactly how they differ and when to use each.

📖 5 min read · Updated May 2026 · Reviewed by our math editorial team

The Short Answer

Gaussian elimination transforms a matrix to Row Echelon Form (REF). It only eliminates entries below each pivot. To solve a system, back-substitution is required after the forward elimination pass.

Gauss-Jordan elimination continues beyond REF to Reduced Row Echelon Form (RREF). It eliminates entries both above and below each pivot. Solutions can be read directly from RREF — try the RREF calculator to see every row operation applied in sequence with no back-substitution needed.

Both methods use the same three elementary row operations: row swap, row scaling, and row replacement. The difference is purely in how far the elimination is carried.

Side-by-Side Comparison

Gaussian Elimination → REF

  • ✓ Eliminate below each pivot
  • ✓ Pivots need not equal 1
  • ✗ Entries above pivots stay
  • Result: upper triangular matrix
  • Requires back-substitution to solve
  • REF is NOT unique
  • Fewer row operations

Gauss-Jordan → RREF

  • ✓ Eliminate above AND below each pivot
  • ✓ Scale each pivot row so pivot = 1
  • ✓ Zeros everywhere in pivot columns except the pivot
  • Result: RREF (unique)
  • Solution readable directly — no back-substitution
  • RREF IS unique
  • More row operations

Worked Example: Same Matrix, Both Methods

Matrix: [[2, 1, −1 | 8], [−3, −1, 2 | −11], [−2, 1, 2 | −3]].

Gaussian Elimination (to REF):

Start:
[ 2   1  -1 |  8 ]
[-3  -1   2 | -11]
[-2   1   2 |  -3]

After forward elimination (below each pivot only):
[ 2   1  -1 |  8  ]
[ 0  1/2  1/2| 1  ]
[ 0   2   1  | 5  ]

After second forward pass:
[ 2   1  -1 |  8  ]
[ 0  1/2  1/2| 1  ]
[ 0   0  -1 |  1  ]  ← REF

Now back-substitute: z = −1. Substitute into row 2: (1/2)y + (1/2)(−1) = 1 → y = 3. Into row 1: 2x + 1(3) − 1(−1) = 8 → x = 2.

Gauss-Jordan (to RREF):

Continue from REF, scaling each pivot to 1 and eliminating above:

From REF, continue:
Scale R₁ → (1/2)R₁, scale R₂ → 2R₂, scale R₃ → (−1)R₃:
[ 1  1/2  -1/2 |  4  ]
[ 0   1    1   |  2  ]
[ 0   0    1   | -1  ]

Eliminate above third pivot (R₁ and R₂):
[ 1  1/2   0  |  7/2 ]
[ 0   1    0  |   3  ]
[ 0   0    1  |  -1  ]

Eliminate above second pivot (R₁):
[ 1   0    0  |  2  ]
[ 0   1    0  |  3  ]
[ 0   0    1  | -1  ]  ← RREF

Read off immediately: x = 2, y = 3, z = −1. Same answer, no back-substitution needed. For a complete walkthrough of each row operation in examples like this, see the step-by-step RREF tutorial.

Operation Count: Which Is Faster?

For an n×n system, Gaussian elimination requires O(n³/3) multiplications for the forward pass, then O(n²/2) for back-substitution. Gauss-Jordan requires O(n³/2) multiplications total — the back-elimination pass roughly doubles the forward-pass cost.

For a single solve, Gaussian elimination is faster by roughly a factor of 3/2. However, for finding matrix inverses with the matrix inverse calculator (solving n systems simultaneously), Gauss-Jordan on [A|I] is natural and no slower than the alternatives.

For small systems (2×2 to 6×6 as in this calculator), the difference is negligible. The pedagogical advantage of RREF — a unique, self-reading answer — outweighs the minor extra computation for educational use.

When to Use Gaussian Elimination

  • Solving a single linear system quickly by hand (back-substitution is straightforward)
  • Computing determinants (upper triangular form makes this easy: det = product of diagonal entries)
  • LU decomposition — Gaussian elimination is precisely the L in A = LU
  • Computational efficiency matters and you don't need RREF

When to Use Gauss-Jordan (RREF)

  • Finding the inverse of a matrix: Gauss-Jordan on [A|I] → [I|A⁻¹]
  • Determining rank and null space: RREF clearly shows pivots and free variables
  • Solving many systems with the same matrix and different right-hand sides — the augmented matrix calculator handles this with full step-by-step output
  • Educational settings: RREF is unique, so there is one "right answer" to compare against
  • Computer algebra systems: CAS use RREF as the canonical form

Both Methods Produce Row-Equivalent Matrices

A fundamental fact: elementary row operations produce row-equivalent matrices — matrices that have the same row space, the same rank, and the same solution set (for the same right-hand side b). Neither Gaussian elimination nor Gauss-Jordan changes the solution set.

This is the key theorem underlying both methods: if [A|b] and [B|c] are row-equivalent augmented matrices, then the systems Ax = b and Bx = c have exactly the same solutions.

Operation Count: Explicit O(n³) Analysis

For an n×n matrix, here are the precise operation counts (multiplications + additions):

  • Gaussian elimination (forward pass only): approximately n³/3 + n² − n/3 operations. For n = 100: ~340,000 operations.
  • Back-substitution: approximately n²/2 operations. For n = 100: ~5,000 operations.
  • Gaussian elimination + back-substitution total: ≈ n³/3 + 3n²/2. For n = 100: ~345,000 operations.
  • Gauss-Jordan (full RREF): approximately n³/2 + n² operations. For n = 100: ~510,000 operations.

Both are O(n³) — the same asymptotic complexity. For large systems (n > 1000), both are slow and numerical linear algebra libraries (NumPy, LAPACK, MATLAB's backslash operator) use LU decomposition with partial pivoting, which is Gaussian elimination with extra bookkeeping that handles numerical instability for large floating-point matrices.

For n ≤ 6 as in this calculator, all methods complete in microseconds. The operation count difference between Gaussian and Gauss-Jordan is irrelevant at this scale. The educational value of showing every RREF step matters far more than the marginal extra operations.

Numerical Stability: Does the Choice Matter?

For floating-point arithmetic (used in most numerical software), Gaussian elimination with partial pivoting — always swapping so the largest-magnitude entry in the column becomes the pivot — is significantly more numerically stable than Gauss-Jordan. This is because large multipliers (eliminating above a small pivot) can amplify rounding errors.

This site uses exact rational arithmetic (BigInt fractions), which has no floating-point error. Numerical stability is a non-issue here — every arithmetic result is mathematically exact regardless of pivot size. The calculator does use partial pivoting (choosing the first available non-zero pivot rather than the largest), but this is done for pedagogical consistency with textbook presentations, not for numerical stability reasons.

When reading about numerical linear algebra, keep in mind that "Gaussian elimination with partial pivoting" and "LU decomposition" refer to float-arithmetic algorithms that prioritize stability. The pedagogical RREF calculation you do by hand (or with this calculator) is Gauss-Jordan on exact rationals, where these concerns don't apply.

Historical Context

Gaussian elimination is named after Carl Friedrich Gauss, who described a systematic procedure for solving linear systems in the early 19th century in his work on least squares and geodesy. The "Jordan" in Gauss-Jordan refers to Wilhelm Jordan (1842–1899), a German geodesist who extended Gauss's method to produce what we now call RREF — specifically to make it easier to solve overdetermined systems by inspection.

The RREF uniqueness theorem — that every matrix has exactly one RREF — was known but not emphasized in early treatments. Modern textbooks like Lay's and Strang's treat RREF as the standard form precisely because its uniqueness makes it a canonical object: a fingerprint of the matrix's structure. Two matrices with the same RREF have the same row space, the same rank, and the same solution set for Ax = b.

Practical Tips: Choosing the Right Method

  • Exam with calculator banned, single 3×3 system: Gaussian elimination + back-substitution. Fewer steps, less arithmetic.
  • Finding null space or checking linear independence: Always Gauss-Jordan (RREF). Free variables are immediately visible.
  • Finding the matrix inverse: Gauss-Jordan on [A|I]. This is the standard algorithm.
  • Checking your own work: Enter the matrix into this calculator to see both the step-by-step process and the final RREF.
  • Large systems in software (n ≥ 50): Neither — use a library. NumPy: np.linalg.solve(A, b). MATLAB/Octave: A \ b. These use LU decomposition with pivoting.
  • Teaching a class: RREF. The unique canonical form makes grading deterministic and allows students to compare results unambiguously.