Report

Help us improve this tool

Gauss Jordan Elimination Calculator

Solve systems of linear equations and find Reduced Row Echelon Form (RREF) step-by-step using the Gauss-Jordan elimination method with matrix visualization.

O M T

What is Gauss-Jordan Elimination?

Gauss-Jordan elimination is an algorithm used in linear algebra to solve systems of linear equations, compute matrix inverses, and transform matrices into Reduced Row Echelon Form (RREF). It extends standard Gaussian elimination by continuing row operations past row echelon form until every pivot column contains a 1 on the pivot entry and zeros everywhere else in that column.

Whether you are working with $2 \times 2$, $3 \times 3$, or higher-dimensional linear systems, this tool demonstrates each elementary row operation step-by-step with exact rational fractions or decimal values. For related linear algebra techniques, explore the Elimination Method Calculator, Gram-Schmidt Calculator, or Eigenvalue Eigenvector Calculator.

Elementary Row Operations in Gauss-Jordan Elimination

The Gauss-Jordan elimination algorithm relies exclusively on three elementary row operations that preserve the solution space of the linear system:

  • Row Swapping ($R_i \leftrightarrow R_j$): Interchanging two rows to move a non-zero element into the pivot position.
  • Row Scaling ($R_i \leftarrow c \cdot R_i$): Multiplying every entry in a row by a non-zero scalar $c$ so the leading coefficient becomes $1$.
  • Row Addition / Elimination ($R_i \leftarrow R_i + c \cdot R_j$): Adding a scalar multiple of one row to another row to eliminate other coefficients in the pivot column, creating zeros above and below the pivot.

Step-by-Step Gauss-Jordan Process

  1. Form the Augmented Matrix: For a system of equations $Ax = b$, construct the augmented matrix $[A \mid b]$.
  2. Forward Elimination: Locate the leftmost non-zero pivot column, swap rows if necessary, scale the pivot row so the pivot entry is $1$, and add multiples of the pivot row to rows below it to clear lower entries.
  3. Backward Elimination: Starting from the bottom-right pivot and working upwards, eliminate all non-zero entries located above each pivot entry.
  4. Read the Solution: If every variable column has a leading $1$ and the system is consistent, read the unique solution directly from the final column.

Types of Solutions in Linear Systems

Applying Gauss-Jordan elimination to an augmented matrix $[A \mid b]$ results in one of three possible outcomes:

  • Unique Solution: The rank of matrix $A$ equals the number of variables and the augmented matrix is consistent (e.g. $[I \mid s]$, giving $x_1 = s_1, x_2 = s_2, \dots$).
  • Infinitely Many Solutions: The system is consistent, but there are fewer pivot entries than variables. The variables without pivots are declared free variables, allowing parametric solution expressions.
  • Inconsistent System (No Solution): A row of the form $[0 \ 0 \ \dots \ 0 \mid c]$ with $c \neq 0$ appears, representing the contradiction $0 = c$.

Computing Matrix Inverses with Gauss-Jordan

Gauss-Jordan elimination can also compute the multiplicative inverse $A^{-1}$ of an $n \times n$ square matrix $A$:

  1. Construct the augmented matrix $[A \mid I_n]$, where $I_n$ is the $n \times n$ identity matrix.
  2. Apply Gauss-Jordan row operations to transform the left side into $I_n$.
  3. The resulting matrix on the right side will be the exact inverse: $[I_n \mid A^{-1}]$.
  4. If the left side cannot be transformed into $I_n$ (row of zeros occurs), the matrix is singular and has no inverse.

Frequently Asked Questions

What is the difference between Gaussian elimination and Gauss-Jordan elimination?

Gaussian elimination reduces a matrix to Row Echelon Form (REF), which is an upper triangular matrix requiring back-substitution to solve for the variables. Gauss-Jordan elimination continues the process further to Reduced Row Echelon Form (RREF), eliminating entries above pivots as well so the values of the variables can be read off directly without back-substitution.

Can this calculator handle fractions?

Yes. You can enter exact fractions like 2/3, -5/4, or decimals. By default, the calculator performs exact rational arithmetic so the steps and solutions do not suffer from floating-point rounding errors. You can toggle between fraction and decimal display at any time.

How do I know if a system has no solution?

During elimination, if a row emerges where all variable coefficients are zero but the constant term is non-zero (such as 0x + 0y + 0z = 4), the system is mathematically inconsistent and has no solution.

What is a pivot in Gauss-Jordan elimination?

A pivot is the first non-zero entry in a row of a matrix in echelon form. In Gauss-Jordan elimination, each pivot is normalized to 1, and row operations clear all other numbers in that pivot's column to zero.

Why is Gauss-Jordan elimination useful for finding matrix inverses?

Because multiplying elementary row matrices is equivalent to multiplying by an invertible matrix $E$, transforming $[A \mid I]$ into $[I \mid E]$ guarantees that $E \cdot A = I$, proving that $E = A^{-1}$.