Step-by-Step RREF Calculator | Matrix Row Reduction Tool

RREF Calculator

RREF Calculator

Enter the coefficients of your augmented matrix. Select the matrix size, fill in each cell, then click Calculate. The vertical line separates the coefficient matrix from the constants column. Leave any cell blank to treat it as zero.

Matrix size:

The matrix below is an augmented matrix [A|b]. The last column (separated by a vertical line) represents the constants on the right side of the system of equations.

What Is RREF?

RREF stands for Reduced Row Echelon Form. It is a specific standardized form that any matrix can be transformed into by performing a sequence of elementary row operations. RREF is one of the most fundamental tools in linear algebra because it provides a systematic, algorithmic way to solve systems of linear equations, determine whether solutions exist, find the rank of a matrix, identify free variables, and compute the null space and column space of a matrix.

Every matrix has a unique RREF. No matter what sequence of row operations you use to reduce it, you will always arrive at the same RREF. This uniqueness makes RREF an extremely reliable tool for analysis.

The Four Conditions for RREF

A matrix is in Reduced Row Echelon Form if and only if it satisfies all four of the following conditions simultaneously:

1
All rows consisting entirely of zeros are at the bottom of the matrix.
2
The leading entry (pivot) of each non-zero row is the number 1.
3
Each pivot is strictly to the right of the pivot in the row above it.
4
Each pivot is the only non-zero entry in its entire column.

The Three Elementary Row Operations

RREF is achieved exclusively through three types of elementary row operations. These operations do not change the solution set of the corresponding system of equations.

Row Swap (Ri ↔ Rj): Interchange any two rows. Used to bring a non-zero entry into the pivot position.
Row Scaling (Ri → k·Ri): Multiply every entry in a row by a non-zero constant. Used to make the pivot equal to 1.
Row Replacement (Ri → Ri + k·Rj): Add a multiple of one row to another row. Used to eliminate entries above and below the pivot.

The Gauss-Jordan Elimination Algorithm

The standard algorithm used to compute RREF is called Gauss-Jordan Elimination. It is an extension of Gaussian Elimination that continues past row echelon form (REF) to fully reduce the matrix. The algorithm proceeds column by column, left to right, and performs the following steps for each column:

Step 1 — Find a pivot: Identify the first non-zero entry in the current column at or below the current row position. If none exists, move to the next column.
Step 2 — Swap rows: If the pivot is not already in the current row, swap the pivot row with the current row.
Step 3 — Scale the pivot row: Divide the entire pivot row by the pivot value so that the pivot becomes exactly 1.
Step 4 — Eliminate the column: For every other row (both above and below), add a suitable multiple of the pivot row to make every other entry in the pivot column equal to zero.
Step 5 — Advance: Move to the next row and the next column, and repeat from Step 1 until the entire matrix is processed.

Interpreting the RREF of an Augmented Matrix

When an augmented matrix [A|b] is reduced to RREF, the result directly reveals the solution structure of the system Ax = b.

Unique solution: Every variable corresponds to a pivot column, and no row produces a contradiction (0 = non-zero). The values of all variables can be read directly from the RREF.
Infinitely many solutions: At least one variable is free (its column has no pivot). The system is consistent but has free parameters. The solution can be written in parametric form.
No solution (inconsistent): A row appears in the form [0 0 … 0 | c] where c is non-zero. This represents the false equation 0 = c, which has no solution.

Rank of a Matrix

The rank of a matrix is defined as the number of pivot positions (leading 1s) in its RREF. It equals both the dimension of the column space and the dimension of the row space. For an m × n matrix A, the following relationships hold:

rank(A) = number of pivot columns in RREF(A)
nullity(A) = n – rank(A)   (number of free variables)
rank(A) + nullity(A) = n   (Rank-Nullity Theorem)
Consistent system requires rank(A) = rank([A|b])

REF vs RREF

Row Echelon Form (REF) is a partially reduced form where each leading entry is to the right of the one above, and all entries below each leading entry are zero. REF is not unique — there are many valid REFs for a given matrix. Reduced Row Echelon Form (RREF) goes further by additionally requiring that each leading entry is 1 and that all entries above each leading entry are also zero. RREF is unique for any given matrix.

Applications of RREF in Linear Algebra

Solving linear systems: RREF of the augmented matrix [A|b] gives the complete solution to Ax = b, including identifying free variables and writing parametric solutions.
Computing rank: Count the number of pivot rows in RREF(A). This equals the rank of A.
Finding the null space: Set up the homogeneous system Ax = 0 and reduce [A|0] to RREF. Express the free variables as parameters to describe the null space.
Column space basis: The pivot columns of the original matrix (not the RREF) form a basis for the column space of A.
Row space basis: The non-zero rows of RREF(A) form a basis for the row space of A.
Linear dependence / independence: The columns of A are linearly independent if and only if every column is a pivot column in RREF(A).

Fraction Arithmetic in RREF

During the elimination process, intermediate calculations frequently produce fractions even when the original matrix contains only integers. This calculator stores all values as exact fractions (numerator and denominator as integers) throughout the computation, only converting to decimal notation at the display stage. This approach avoids the rounding errors that accumulate when using floating-point arithmetic, ensuring that the RREF is computed exactly.