Exact fractions

Reduced row echelon form calculator

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.

Matrix

Integers, decimals, and fractions such as 3/4 or −2/5. A decimal is read as an exact fraction of a power of ten, so 0.5 is 1/2.

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.

Disclaimer. Educational estimate only. This page is not a computer algebra system and not a proof. See the site disclaimer and the FAQ on calculators versus understanding.

Common questions

What is reduced row echelon form?

Reduced row echelon form is a matrix reached by elementary row operations in which every 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. Textbooks abbreviate it RREF. The final matrix does not depend on the order of the legal steps.

How is Gaussian elimination different from the result on this page?

Gaussian elimination clears entries below each pivot and stops at row echelon form. You can then back substitute to solve a system. Gauss Jordan elimination continues and clears above each pivot as well. This page does that extra clearing and reports the reduced row echelon form, together with the solution when you mark the last column as the constants.

How can you tell that a linear system has no solution?

Mark the last column as the constants and row reduce. If a row is entirely zero in the coefficient columns and the constant in that row is not zero, the row says 0 equals a nonzero number. That is an inconsistent row, and the system has no solution. If every all zero coefficient row also has a zero constant, the system is consistent.

What is a free variable?

A free variable is a variable whose column has no pivot in the reduced form. You may give it any real number. The other variables, called basic variables, are then determined. If there is at least one free variable and no inconsistent row, the system has infinitely many solutions. This page names the free variables and writes each basic variable in terms of them.

Why does the calculator keep fractions instead of decimals?

Decimal arithmetic can turn a true zero into a tiny leftover, and a later pivot can be wrong. A fraction such as 1/3 stays 1/3. A decimal you type is read as an exact fraction of a power of ten, so 0.5 becomes 1/2, while 0.333 is 333/1000 and is not the same as 1/3. Type 1/3 when you mean one third.

Does swapping two rows change the solution?

No. Swapping two rows reorders the equations. Multiplying a row by a nonzero number, or adding a multiple of one row to another row, replaces the system with an equivalent one. The solution set stays the same. The steps can look different if you choose a different row for the pivot, but the reduced row echelon form itself is unique.

Want a tool that matches a new explainer, or a check that a page and a calculator disagree? Write a short note.

Suggest a topic or tool