Gauss-Jordan elimination

RREF calculator with steps

Reduce a matrix over the real, rational, complex, or a finite prime field and inspect every elementary row operation.

RREF Calculator with Steps

Robert Eisele

The RREF calculator applies Gauss-Jordan elimination and records every effective elementary row operation. It accepts ordinary matrices and augmented matrices over the real numbers, exact rational numbers, complex numbers, and finite fields with prime modulus.

Reduced Row Echelon Form

A matrix is in reduced row echelon form when every nonzero row has a leading 1, each leading 1 is the only nonzero entry in its column, pivot positions move strictly to the right from one row to the next, and all zero rows appear below the nonzero rows. Every matrix over a field has exactly one RREF, even though different valid sequences of row operations may reach it.

Elementary Row Operations

The step trace uses the three invertible operations that preserve the solution set of an augmented system:

The calculator omits operations that would leave the matrix unchanged. Each displayed matrix is therefore the direct result of the operation printed above it, not an artificial animation frame.

Exact and Numerical Arithmetic

Rational mode is the best default for integer and fractional input because it keeps values such as \(1/3\) exact throughout the reduction. Real mode accepts decimals and scientific notation and uses partial pivoting: among the available rows, it chooses the entry with the largest absolute value in the active column. This reduces avoidable floating-point error but does not turn approximate input into exact algebra.

Complex mode accepts values such as 2-3i. Prime-field mode performs arithmetic modulo a prime \(p\); every nonzero residue then has a multiplicative inverse, which is precisely what pivot normalization requires. A composite modulus is not a field and is rejected rather than producing a misleading partial reduction.

Reading an Augmented Result

Marking the final column as augmented changes only the visual separator; the row reduction itself treats every column uniformly. For a system \([A\mid b]\), pivot columns in \(A\) identify basic variables and non-pivot columns identify free variables. A row of the form

\[ \begin{bmatrix}0 & 0 & \cdots & 0 & \mid & 1\end{bmatrix} \]

represents the contradiction \(0=1\), so the system is inconsistent. Otherwise, fewer pivots than variables indicate infinitely many solutions, while one pivot in every variable column gives a unique solution.

Matrix Input

Individual cells accept the notation of the selected field. The paste importer reads rows separated by line breaks or semicolons and accepts spaces, tabs, or commas between entries. Matrices are limited to 10 rows and 10 columns so that the full sequence of intermediate matrices remains readable and responsive.

Exact rational arithmetic is powered by Fraction.js, while complex arithmetic uses Complex.js.