This tool row reduces a matrix to reduced row echelon form and writes each elementary row operation. You choose the size, from 2 rows to 5 rows and from 2 columns to 6 columns. Each entry can be an integer, a decimal, or a simple fraction such as 3/4. The arithmetic stays exact: every result is a reduced fraction, so a decimal such as 0.5 is kept as 1/2.
Mark the last column as augmented when it holds the constants of a linear system. The page then says whether the system has a unique solution, infinitely many solutions, or no solution, and it writes the solution or the contradictory row.
This page does not compute a determinant or an inverse. For a 2 by 2 product, use the 2 by 2 matrix calculator. For a 3 by 3 determinant and inverse, use the 3 by 3 matrix calculator.
What reduced row echelon form means
Reduced row echelon form, often shortened to RREF, is the simplest matrix you can reach with three moves: swap two rows, multiply a row by a nonzero number, or add a multiple of one row to another row. In that form each pivot is 1, each pivot is the only nonzero entry in its column, and each pivot sits strictly to the right of the pivot above it.
Gaussian elimination stops earlier, at row echelon form, with zeros only below the pivots. This page also clears above the pivots. That extra clearing is Gauss Jordan elimination, and the matrix it produces is the reduced row echelon form. The steps are numbered, and the matrix after each swap, scale, or added multiple is written out.
How to read the result
A pivot column contains a leading 1. The rank is the number of pivots. If you marked the last column as the constants and a pivot appears there, some row says that 0 equals a nonzero number, and the system has no solution. The page quotes that inconsistent row.
If every variable column has a pivot, the solution is unique and the constants column lists it. If a variable column has no pivot, that variable is free. The page names it with a letter such as t and writes each basic variable in terms of the free ones. Leave the constants box unchecked when you only want the reduced matrix, the rank, and the pivot columns.
A fully worked example
The matrix already filled in is the system with equations x₂ + x₃ = 5, x₁ + x₂ + x₃ = 6, and x₁ + 2x₂ − x₃ = 2. Column 1 begins with a zero, so the first step swaps two rows. The reduced form is an identity beside the constants 1, 2, and 3, so the only solution is x₁ = 1, x₂ = 2, and x₃ = 3. The steps below are written on the page, so you can read them with scripts turned off.
Starting matrix
Row 1: 0, 1, 1 | 5
Row 2: 1, 1, 1 | 6
Row 3: 1, 2, −1 | 2
1. Swap row 1 and row 2, because row 1 has a zero in column 1 and row 2 does not.
Row 1: 1, 1, 1 | 6
Row 2: 0, 1, 1 | 5
Row 3: 1, 2, −1 | 2
2. Add −1 times row 1 to row 3 to clear the entry in column 1.
Row 1: 1, 1, 1 | 6
Row 2: 0, 1, 1 | 5
Row 3: 0, 1, −2 | −4
3. Add −1 times row 2 to row 1 to clear the entry in column 2.
Row 1: 1, 0, 0 | 1
Row 2: 0, 1, 1 | 5
Row 3: 0, 1, −2 | −4
4. Add −1 times row 2 to row 3 to clear the entry in column 2.
Row 1: 1, 0, 0 | 1
Row 2: 0, 1, 1 | 5
Row 3: 0, 0, −3 | −9
5. Multiply row 3 by −1/3 so the pivot in column 3 is 1.
Row 1: 1, 0, 0 | 1
Row 2: 0, 1, 1 | 5
Row 3: 0, 0, 1 | 3
6. Add −1 times row 3 to row 2 to clear the entry in column 3.
Row 1: 1, 0, 0 | 1
Row 2: 0, 1, 0 | 2
Row 3: 0, 0, 1 | 3
Reduced row echelon form
Row 1: 1, 0, 0 | 1
Row 2: 0, 1, 0 | 2
Row 3: 0, 0, 1 | 3
Rank is 3.
Pivot columns: 1, 2, and 3.
The system has a unique solution.
x₁ = 1
x₂ = 2
x₃ = 3
Related reading
Row reduction is the tool behind the solution story on the linear algebra pillar. A study order is the linear algebra first course pathway. Glossary entries for matrix, linear map, and determinant name the ideas this arithmetic serves.
The shorter arithmetic is the 2 by 2 matrix calculator, and a 3 by 3 determinant with each minor written out is the 3 by 3 matrix calculator. Stretch factors of a 2 by 2 map are on the eigenvalue calculator and in eigenvalues in plain language.