Row Echelon Method Calculator

Enter the coefficients of a 2×2, 3×3, or 4×4 system of linear equations and solve using Gaussian elimination. Every row operation is shown with the updated augmented matrix so you can trace each step.

Number of variables:
x₁x₂x₃= b

Notes

How Gaussian Elimination Works

Gaussian elimination transforms the augmented matrix [A|b] into row echelon form (upper triangular) using elementary row operations, then solves via back substitution.

  1. Write the augmented matrix [A|b].
  2. Select the leftmost non-zero column as the pivot column.
  3. Swap rows if needed to bring the largest absolute value to the pivot position (partial pivoting).
  4. Eliminate all entries below the pivot using Rᵢ → Rᵢ − (aᵢⱼ/aₚⱼ)·Rₚ.
  5. Repeat for the next pivot until upper triangular form is reached.
  6. Apply back substitution to find each variable from the last equation upward.
If a row [0 0 … 0 | c] with c ≠ 0 appears, the system has no solution. If a row [0 0 … 0 | 0] appears, there are free variables and infinitely many solutions.

Worked Example — 2×2

System: x₁ + 2x₂ = 8, 3x₁ − x₂ = 3

Worked Example — 3×3

System: 2x₁ + x₂ − x₃ = 8, −3x₁ − x₂ + 2x₃ = −11, −2x₁ + x₂ + 2x₃ = −3

Swap R₁ ↔ R₂ (partial pivoting, |−3| > |2|), then eliminate to get upper triangular form, then back-substitute:

Verify: 2(2)+3−(−1) = 8 ✓, −3(2)−3+2(−1) = −11 ✓, −2(2)+3+2(−1) = −3 ✓

Frequently Asked Questions

What is Gaussian elimination?

Gaussian elimination (row reduction) is an algorithm that transforms the augmented matrix of a linear system into upper triangular (row echelon) form using elementary row operations, then solves via back substitution.

What is partial pivoting?

Partial pivoting selects the row with the largest absolute value in the pivot column and swaps it to the pivot position before elimination. This reduces numerical errors and avoids division by zero.

What does row echelon form mean?

A matrix is in row echelon form when: all non-zero rows are above any all-zero rows; the leading (first non-zero) entry of each row is to the right of the leading entry of the row above it.

What is back substitution?

After reaching upper triangular form, back substitution solves for each variable starting from the last equation (which has only one unknown) and working upward, substituting known values into each equation.