Gauss-Jordan Elimination Calculator

Solve systems of linear equations Ax=b via augmented matrix Gauss-Jordan elimination with step-by-step row operations, back substitution display, and solution visualization.

Coefficient Matrix A and Constants b
xyzb
Solution Type
Unique ✓
Exactly one solution found
Rank
3
of 3 possible
Steps
12
Total row operations
x
2.000000
Solution for variable x
y
3.000000
Solution for variable y
z
-1.000000
Solution for variable z

Solution Visualization

x
2.0000
y
3.0000
z
-1.0000

Step-by-Step Row Operations

#OperationAugmented Matrix
1Augmented matrix [A|b][2.000, 1.000, -1.000, 8.000] [-3.000, -1.000, 2.000, -11.000] [-2.000, 1.000, 2.000, -3.000]
2R1 ↔ R2[-3.000, -1.000, 2.000, -11.000] [2.000, 1.000, -1.000, 8.000] [-2.000, 1.000, 2.000, -3.000]
3R1 / -3.0000[1.000, 0.333, -0.667, 3.667] [2.000, 1.000, -1.000, 8.000] [-2.000, 1.000, 2.000, -3.000]
4R2 − 2.0000·R1 → R2[1.000, 0.333, -0.667, 3.667] [0.000, 0.333, 0.333, 0.667] [-2.000, 1.000, 2.000, -3.000]
5R3 − -2.0000·R1 → R3[1.000, 0.333, -0.667, 3.667] [0.000, 0.333, 0.333, 0.667] [0.000, 1.667, 0.667, 4.333]
6R2 ↔ R3[1.000, 0.333, -0.667, 3.667] [0.000, 1.667, 0.667, 4.333] [0.000, 0.333, 0.333, 0.667]
7R2 / 1.6667[1.000, 0.333, -0.667, 3.667] [0.000, 1.000, 0.400, 2.600] [0.000, 0.333, 0.333, 0.667]
8R1 − 0.3333·R2 → R1[1.000, 0.000, -0.800, 2.800] [0.000, 1.000, 0.400, 2.600] [0.000, 0.333, 0.333, 0.667]
9R3 − 0.3333·R2 → R3[1.000, 0.000, -0.800, 2.800] [0.000, 1.000, 0.400, 2.600] [0.000, 0.000, 0.200, -0.200]
10R3 / 0.2000[1.000, 0.000, -0.800, 2.800] [0.000, 1.000, 0.400, 2.600] [0.000, 0.000, 1.000, -1.000]
11R1 − -0.8000·R3 → R1[1.000, 0.000, 0.000, 2.000] [0.000, 1.000, 0.400, 2.600] [0.000, 0.000, 1.000, -1.000]
12R2 − 0.4000·R3 → R2[1.000, 0.000, 0.000, 2.000] [0.000, 1.000, 0.000, 3.000] [0.000, 0.000, 1.000, -1.000]

Solution Verification

EquationLHSRHS (b)Match
Eq 1: 2.00x +1.00y -1.00z = 8.008.0000008.000000
Eq 2: -3.00x -1.00y +2.00z = -11.00-11.000000-11.000000
Eq 3: -2.00x +1.00y +2.00z = -3.00-3.000000-3.000000

Method Reference

PhaseGoalOperations
ForwardZeros below pivotsSwap, scale, eliminate downward
BackwardZeros above pivotsEliminate upward, scale pivots to 1
ReadExtract solutionEach row gives one variable directly
Planning notes, formulas, and examples

About the Gauss-Jordan Elimination Calculator

Gauss-Jordan elimination is the standard algorithm for solving systems of linear equations. Given a system Ax = b, the method augments the coefficient matrix A with the constant vector b, then applies elementary row operations to reduce the augmented matrix to Reduced Row Echelon Form (RREF), from which the solution can be read directly.

This calculator handles systems of 2 to 5 equations with 2 to 5 unknowns. It forms the augmented matrix [A|b], performs forward elimination to create zeros below each pivot, then back-eliminates to create zeros above each pivot while scaling pivots to 1. Every row operation is logged step by step so you can follow the algorithm exactly.

The tool automatically classifies the system as having a unique solution, infinitely many solutions, or no solution. For unique solutions, the values are displayed directly. For infinite solutions, the parametric form is described with free variables identified. For inconsistent systems, the contradictory row is highlighted.

Practical presets include classic textbook systems in 2, 3, and 4 variables covering all three solution types. Students can enter their own systems to check homework, and instructors can demonstrate the algorithm live. The solution verification feature substitutes the answer back into the original equations to confirm correctness.

When This Page Helps

Gauss-Jordan elimination involves many sequential row operations — scaling, swapping, and subtracting multiples of rows — where a single arithmetic mistake propagates through every subsequent step. This calculator logs every row operation, shows the augmented matrix at each stage, and automatically classifies the system as having a unique solution, infinitely many solutions, or no solution. It is the go-to tool for students learning row reduction, instructors demonstrating the algorithm, and anyone needing to solve or verify a linear system quickly.

How to Use the Inputs

  1. Select the number of equations and variables
  2. Enter the coefficient matrix A and constant vector b, or choose a preset
  3. Click through or view all step-by-step row operations
  4. See the solution classification (unique, infinite, or none)
  5. Check the solution verification section for correctness
  6. Study the augmented matrix at each stage of elimination
Formula used
Form [A|b], apply row operations to reach RREF. If consistent with rank = n unknowns → unique solution. If rank < n → infinite solutions with n−rank free variables.

Example Calculation

Result: x = 2, y = 3, z = −1

The augmented matrix [[2,1,-1,8],[-3,-1,2,-11],[-2,1,2,-3]] reduces to RREF [[1,0,0,2],[0,1,0,3],[0,0,1,-1]], giving the unique solution directly.

Tips & Best Practices

  • Always check the determinant first — if det ≠ 0, the system has a unique solution
  • Use partial pivoting (swap rows to get the largest pivot) for numerical stability
  • If you get a row of all zeros in the augmented part, you have a dependent equation
  • A row [0 0... 0 | b] with b ≠ 0 means no solution exists
  • For large systems, LU decomposition is more efficient than Gauss-Jordan

The Row Reduction Algorithm

Gauss-Jordan elimination is a two-phase process. In the **forward phase**, the algorithm scans left to right, finding pivot positions and zeroing out all entries below each pivot using row replacement operations (Rᵢ − factor·Rⱼ). Partial pivoting — swapping rows to place the largest absolute value in the pivot position — improves numerical stability. In the **backward phase**, the algorithm works upward, eliminating entries above each pivot and scaling pivots to 1. The result is **Reduced Row Echelon Form (RREF)**, where each pivot column has exactly one 1 and all other entries are zero.

Solution Classification

The rank of the coefficient matrix and the augmented matrix determine the solution type. If rank(A) = rank([A|b]) = n (number of unknowns), there is a **unique solution** readable directly from the RREF. If rank(A) = rank([A|b]) < n, there are **infinitely many solutions** parameterized by n − rank free variables. If rank(A) < rank([A|b]), the system is **inconsistent** — at least one row has the form [0 0 … 0 | c] with c ≠ 0, representing a contradictory equation 0 = c.

Gauss-Jordan vs. Gaussian Elimination

Standard Gaussian elimination reduces only to Row Echelon Form (REF), then uses **back substitution** to find the solution. Gauss-Jordan continues to RREF, eliminating above pivots too, so no back substitution is needed. Gauss-Jordan requires slightly more operations (≈n³/2 vs. ≈n³/3 for the forward phase alone) but produces a cleaner final form and is easier to implement. It is also the method used to compute matrix inverses: augment [A|I] and reduce — if A is invertible, the result is [I|A⁻¹].

Sources & Methodology

Last updated:

Frequently Asked Questions

  • It is a method for solving systems of linear equations by forming an augmented matrix and reducing it to RREF using elementary row operations. The solution is read directly from the final form.