Math & Statistics

RREF Calculator

Enter a matrix or an augmented system to get its reduced row echelon form in exact fractions. The RREF calculator lists every single row operation with the matrix after it, then reports the rank, the pivot columns and whether the system has one solution, infinitely many or none.

Free, runs in your browserUpdated October 2026
Matrix entries
Whole numbers, decimals and fractions such as 3/4 are accepted. Blank cells count as 0.
Show results as
Examples
Reduced row echelon form
–
Rank–
Pivot columns–
Solution–
Row operations–

Every Row Operation, Step by Step

    RREF Calculator diagram: a 3 by 4 augmented matrix row reduced to the solution x = 2, y = 3, z = −1
    How the RREF Calculator works: Row reduces any matrix to RREF in exact fractions, one operation at a time

    How to Use the RREF Calculator

    How to use the RREF Calculator: size menus, augmented option, matrix grid, format switch and the reduced matrix
    Numbered steps on the RREF Calculator. Follow them in order.
    1. Choose how many rows and columns your matrix has, up to 6 rows and 7 columns.
    2. Keep this ticked when the last column holds the constants of a system of equations.
    3. Type the entries. Whole numbers, decimals and fractions like 3/4 all work.
    4. Show the results as exact fractions or as decimals.
    5. Read the RREF, rank and solution, then follow every row operation below.

    Choose the number of rows and columns, up to 6 rows and 7 columns, and type the entries. Whole numbers, decimals and fractions such as 3/4 all work, and every calculation is done with exact fractions, so 1/3 never turns into 0.333333. Leave the Augmented matrix box ticked when the last column holds the constants of a system of equations. Untick it to row reduce a plain matrix.

    The result panel shows the reduced row echelon form, the rank, the pivot columns and the number of row operations used. For an augmented matrix it also tells you whether the system has one solution, infinitely many solutions written in parametric form, or no solution. For a plain matrix it gives the nullity and a basis for the null space. Below the tool, every swap, scaling and elimination is listed with the matrix after it.

    What Is Reduced Row Echelon Form?

    A matrix is in row echelon form (REF) when all zero rows are at the bottom and the first nonzero entry of each row, the pivot, sits to the right of the pivot above it. It is in reduced row echelon form (RREF) when, in addition, every pivot equals 1 and is the only nonzero entry in its column. Every matrix has exactly one RREF, no matter which sequence of row operations you use to reach it, which makes it a reliable way to compare answers.

    Gauss-Jordan Elimination: The Method

    Only three elementary row operations are allowed, and each one keeps the solution set of the system unchanged:

    Swap: Ri ↔ Rj
    Scale: Ri → kRi, k ≠ 0
    Replace: Ri → Ri + kRj

    The calculator follows the textbook order. Working column by column, it picks a pivot (preferring an entry that is already 1, which keeps the fractions small), scales the pivot row so the pivot is 1, and clears every entry below it. That produces the row echelon form. It then works back up from the last pivot and clears the entries above each pivot, which gives the RREF.

    Worked Example

    Solve 2x + y − z = 8, −3x − y + 2z = −11 and −2x + y + 2z = −3. The augmented matrix has rows (2, 1, −1 | 8), (−3, −1, 2 | −11) and (−2, 1, 2 | −3).

    1. Scale R1 by 1/2: (1, 1/2, −1/2 | 4).
    2. R2 → R2 + 3R1 gives (0, 1/2, 1/2 | 1), and R3 → R3 + 2R1 gives (0, 2, 1 | 5).
    3. Scale R2 by 2: (0, 1, 1 | 2). Then R3 → R3 − 2R2 gives (0, 0, −1 | 1).
    4. Scale R3 by −1: (0, 0, 1 | −1). The matrix is now in row echelon form.
    5. Clear above the pivots: R2 → R2 − R3, R1 → R1 + (1/2)R3, then R1 → R1 − (1/2)R2.

    The RREF has rows (1, 0, 0 | 2), (0, 1, 0 | 3) and (0, 0, 1 | −1), so x = 2, y = 3 and z = −1. Substituting back: 2(2) + 3 − (−1) = 8, which checks.

    Reading the Solution From the RREF

    What the RREF showsMeaning
    A pivot in every variable columnExactly one solution
    A column without a pivot, and no impossible rowInfinitely many solutions, one free variable per non-pivot column
    A row (0 0 … 0 | c) with c ≠ 0No solution, the system is inconsistent
    Rank equals the number of rows and columnsA square matrix that is invertible

    For example, the system with rows (1, 2, −1 | 3), (2, 4, 1 | 9) and (3, 6, 0 | 12) reduces to x + 2y = 4 and z = 1. Column 2 has no pivot, so y is free and x = 4 − 2y.

    Rank, Pivots and the Null Space

    The rank is the number of pivots. It equals the number of linearly independent rows, and also of independent columns. The pivot columns of the original matrix form a basis for its column space. The nullity is the number of columns minus the rank, and the rank-nullity theorem says the two always add up to the number of columns. Each free column gives one basis vector of the null space, the set of solutions of Ax = 0.

    Tips and Limits

    • The calculator uses exact rational arithmetic, so decimals you type are read exactly: 0.1 means 1/10.
    • Switch to Decimals to see the same results rounded to six places. The underlying calculation stays exact.
    • Different but valid sequences of row operations reach the same RREF. Your intermediate matrices may differ from the ones shown and still be correct.
    • Matrices up to 6 × 7 are supported, which covers systems of up to six equations in six unknowns.

    Frequently asked questions

    What is the difference between REF and RREF?

    Row echelon form only needs zeros below each pivot. Reduced row echelon form also needs every pivot to equal 1 and zeros above each pivot. A matrix can have many row echelon forms but only one RREF.

    How do I know if a system has infinitely many solutions?

    Row reduce the augmented matrix. If there is no row of the form 0 = c with c not zero, and at least one variable column has no pivot, those columns are free variables and there are infinitely many solutions.

    What does a row of zeros mean in RREF?

    A zero row means one equation was a combination of the others, so it adds no new information. It lowers the rank. In an augmented matrix, a zero row with a nonzero constant means the system has no solution.

    How is rank found from the RREF?

    Count the pivots, the leading 1s. That number is the rank of the matrix. It equals the number of nonzero rows in any row echelon form and the number of linearly independent columns.

    Is the RREF of a matrix unique?

    Yes. Any sequence of valid row operations ends at the same reduced row echelon form. That is why it is a good way to check homework, even when your intermediate steps differ.

    Can I use fractions and decimals in the matrix?

    Yes. Type entries like 3/4, -2.5 or 7. The calculator converts them to exact fractions and keeps every step exact, then lets you view the result as decimals if you prefer.