Reduced Row Echelon Form (RREF) Calculator
Enter your matrix coefficients to instantly compute the reduced row echelon form (RREF) or row echelon form (REF) using Gauss-Jordan elimination. Choose your matrix size, toggle between RREF and REF, and see every row operation with the resulting matrix at each step. For augmented matrices, the calculator also interprets whether the system has a unique solution, no solution, or infinitely many solutions.
What is reduced row echelon form?
A matrix is in reduced row echelon form (RREF) when it satisfies four conditions: (1) all zero rows are at the bottom; (2) the leading entry (pivot) in each non-zero row is 1; (3) the pivot in each row appears to the right of the pivot in the row above; and (4) each pivot is the only nonzero entry in its column. RREF is the unique, fully reduced result of Gauss-Jordan elimination. Because every pivot column contains exactly one nonzero entry, you can read the solution to the corresponding system of equations directly from the RREF without any back-substitution.
How Gauss-Jordan elimination works
The algorithm transforms a matrix using three elementary row operations: swapping two rows, multiplying a row by a nonzero scalar, and adding a multiple of one row to another. Starting from the leftmost column, it finds the topmost nonzero entry (the pivot), swaps it to the current pivot row, scales the row so the pivot equals 1, then subtracts multiples of that row from all other rows to make every other entry in the pivot column zero. Moving right and down, it repeats until no more pivots can be found. For REF, the elimination only goes downward; for RREF, the elimination also goes upward, producing the fully reduced form. This calculator tracks each operation and shows the intermediate matrix so you can follow every step.
Solving systems of linear equations
An augmented matrix [A|b] encodes the system Ax = b, where A is the coefficient matrix and b is the constants vector. Row-reducing the augmented matrix to RREF reveals the solution directly. If the RREF has a row of the form [0 0 ... 0 | c] with c not zero, the system is inconsistent (no solution). If the number of pivot columns is less than the number of variables, there are free variables and infinitely many solutions. Otherwise, there is a unique solution and each variable equals the constant in its pivot row. This calculator interprets all three cases when "Interpret as augmented" is enabled.
Rank and what it tells you
The rank of a matrix is the number of pivot columns (equivalently, the number of nonzero rows in the RREF). For an m x n coefficient matrix A, the rank determines the structure of solutions to Ax = b: if rank(A) equals n (the number of columns), the only solution to the homogeneous system Ax = 0 is the trivial solution. The nullity, the dimension of the solution space, equals n - rank(A) by the rank-nullity theorem. RREF makes the rank obvious at a glance.
Row Echelon Form vs. Reduced Row Echelon Form
| Property | REF | RREF |
|---|---|---|
| Leading entry in each row | 1 (pivot) | 1 (pivot) |
| Zeros below each pivot | Yes | Yes |
| Zeros above each pivot | No | Yes |
| Pivot is only nonzero in column | No | Yes |
| Form is unique for a given matrix | No | Yes |
| Directly reads off solution | Back-substitution needed | Yes, read directly |
| Algorithm | Gaussian elimination | Gauss-Jordan elimination |
Comparison of properties and when to use each form.
Frequently asked questions
What is the difference between REF and RREF?
Both forms have zeros below each pivot and leading entries of 1. The extra requirement of RREF is that each pivot is also the only nonzero entry in its entire column, not just below. This means RREF is unique for any given matrix, whereas REF is not, and RREF lets you read off the solution without back-substitution.
Can I enter fractions or decimals in the matrix?
Yes. Enter decimals directly (e.g. 0.5). The calculator converts them to exact fractions internally, so intermediate results remain exact. Switch the display to "Decimals" if you prefer decimal output. Integer inputs always give exact results.
What does "augmented matrix" mean?
An augmented matrix appends the constants vector b to the coefficient matrix A, written [A|b]. For example, the system 2x + y = 8 and x - y = 1 becomes the 2x3 augmented matrix [[2, 1, 8], [1, -1, 1]]. Row-reducing [A|b] directly solves the system. Enable "Interpret as augmented" to have this calculator identify the solution type and display the values of each variable.
What does "no solution" or "inconsistent" mean?
A system is inconsistent when the equations contradict each other - for example, 2x + y = 5 and 2x + y = 7. In RREF, this shows up as a row of the form [0 0 ... 0 | c] where c is nonzero, representing the equation 0 = c, which has no solution.
How do I interpret infinitely many solutions?
When a system has fewer independent equations than unknowns, one or more variables are "free" and can take any value. The RREF will have fewer pivot columns than variable columns. For each free variable, you assign it an arbitrary parameter (often called t or s), then express the pivot variables in terms of those parameters to get the general solution.
What is the rank of a matrix?
The rank is the number of nonzero rows in the RREF, which equals the number of pivot columns. It measures the dimension of the row space (and column space) of the matrix. For a system Ax = b, rank(A) must equal rank([A|b]) for a solution to exist; if both ranks equal the number of variables, the solution is unique.
Why does the order of row operations differ from what I learned?
There are many valid sequences of elementary row operations that produce the same RREF. This calculator uses partial pivoting (choosing the row with the largest absolute value as the pivot at each step) to improve numerical stability. The final RREF is unique regardless of the sequence used to get there.