RREF Calculator – Reduced Row Echelon Form With Steps
Type in a matrix — or a whole system of equations — and this calculator reduces it to reduced row echelon form (RREF) with Gauss–Jordan elimination, showing every single row operation as it goes. When the last column holds your answers, the solution is read straight off the reduced matrix: no back-substitution, no guesswork.
Your matrix
In Solve a system mode, each row is one equation: the coefficients of x, y (and z) go in the plain boxes, and the number from the right-hand side of the equals sign goes in the shaded answers column. The example loaded is 2x + 3y = 8 and x − y = −1.
🔒 Everything is calculated in your browser — your numbers never leave your device.
Advanced options — paste a larger matrix and copy the row-operation log
Two extra tools for work the main grid does not cover. Paste a matrix of up to 5 rows and 6 columns, or build a plain-text copy of the main calculator’s own step list.
Entries separated by spaces or commas. A bar before the answers column and square brackets around rows are optional. Fractions must be typed as decimals: 1/2 is rejected, use 0.5.
This reads the step list the main calculator already shows, formats it as numbered plain text, and checks that its final matrix matches the reduced form above. It does not re-solve anything.
These extra tools do not change the main calculator: the paste panel reduces its own matrix, and the log copies the main calculator’s own steps.
The reduced form
Reading the solution
The matrix in reduced row echelon form
Why this is the whole answer
Every variable column has its own leading 1, and every leading 1 is the only entry in its column — so each variable is already solved. There is exactly one solution, and it is sitting in the answers column.
Every row operation, in order
Only the three legal moves are ever used: swap two rows, multiply a row by a number, and add a multiple of one row to another. None of them changes what the matrix says — they only make it easier to read.
Key takeaways
- Only three moves are ever used — swap two rows, scale a row, add a multiple of one row to another — and none of them changes what the matrix says.
- The finished form is unique: different working still lands on the same RREF, so final matrices can be compared cell for cell.
- The verdict reads straight off the reduced form: a leading 1 in every variable column means one solution, a row reading 0 = a number means none, and a column without a pivot means a free variable and infinitely many solutions.
Contents
- Before and after, side by side
- Keep going with matrices and equations
- How it works, in 3 steps
- How each answer is worked out
- Deep dives
- The 3×3 system, worked in full
- Three verdicts, and how to read each one
- Bigger matrices: what the paste panel adds, and where it stops
- Check your own RREF before you trust it
- Checking by substitution: the thirty-second audit that catches every slip
- RREF and invertibility: the identity test, read off the reduced form
- Frequently asked questions
Before and after, side by side
The same information in both pictures — row operations never change what a matrix says, only how plainly it says it. On the right, the staircase of leading 1s, the zeros above and below each one, and the answer column are all visible at a glance.
Keep going with matrices and equations
How it works, in 3 steps
Find a pivot, make it 1
Scan the first unfinished column for its biggest entry, swap that row up into place, and divide the row through so the entry becomes a leading 1. Using the biggest entry (partial pivoting) keeps rounding errors small.
Clear the whole column
Add a multiple of the pivot row to every other row until the pivot is the only non-zero entry in its column — above it as well as below it. That second half is what separates reduced row echelon form from plain row echelon form.
Move right, then read
Repeat on the next column until every possible pivot is placed. If the matrix was a system, each leading 1 names its variable’s value in the answers column — unless a row contradicts itself (no solution) or a column never earned a pivot (free variables, infinitely many solutions).
How each answer is worked out
Worked example — the system loaded above. Start with 2x + 3y = 8 and x − y = −1, written as the matrix [2 3 | 8] and [1 −1 | −1]. Divide row 1 by 2 so the first pivot becomes 1: [1 1.5 | 4]. Subtract row 1 from row 2 to clear underneath: [0 −2.5 | −5]. Divide row 2 by −2.5 for the second leading 1: [0 1 | 2]. Finally subtract 1.5 times row 2 from row 1 to clear above the second pivot: [1 0 | 1]. The answers column now reads the solution directly: x = 1, y = 2 — and checking in the originals, 2(1) + 3(2) = 8 and 1 − 2 = −1, both true.
Worked example — a row that contradicts itself. Change the second equation to x + y = 5 while the first stays x + y = 2. Reducing gives a row [0 0 | 3]: the equations claim 0 = 3, which no pair of numbers can make true. That row is the signature of no solution — geometrically, two parallel lines that never meet.
Worked example — a column with no pivot. Take x + 2y = 3 and 2x + 4y = 6, which are secretly the same equation twice. The reduced form is [1 2 | 3] over a row of zeros: the y column never earned a leading 1, so y is a free variable. Pick any y you like and x follows as x = 3 − 2y, giving infinitely many solutions along a line.
A note on fractions. The elimination underneath always runs in decimals, snapped to zero below a billionth. The fractions toggle only changes how a finished cell is displayed: if a value sits within a ten-thousandth of a fraction with denominator 64 or less, that fraction is shown. If a value does not land on a tidy fraction, its decimal is shown — and the decimal is always the authoritative figure.
Deep dives
Four rules define the finished shape. Every non-zero row begins with a 1 — the leading 1, or pivot. Each leading 1 sits strictly to the right of the one above it, making a staircase down the matrix. Every column that holds a leading 1 has zeros in all its other entries, above and below. And any rows of pure zeros sink to the bottom. A matrix meeting all four is in reduced row echelon form, and a beautiful theorem says the destination is unique: whatever order of legal moves you choose, any matrix reduces to exactly one RREF. Your working can differ from this page’s working; the final matrix cannot.
The counting by-product is the rank — the number of leading 1s. Rank measures how much independent information the matrix carries: a system with full rank in its variable columns pins every variable down, while each missing pivot is one degree of freedom the equations leave open.
Plain row echelon form (REF) stops halfway: pivots form the staircase and everything below them is zero, but entries above the pivots are left as they are, and the pivots need not be 1. Getting there is Gaussian elimination. To finish the job you either substitute backwards from the last equation (back-substitution) or keep going — scale every pivot to 1 and clear above it too. That second route is Gauss–Jordan elimination, and its destination is RREF, from which answers are read, not computed.
Gauss–Jordan does somewhat more arithmetic than elimination with back-substitution, which is why big numerical software usually prefers the shorter route. For learning, checking homework, and systems small enough to hold in your head, the RREF finish is worth it: the solution, the rank, the free variables and any contradiction are all visible in one picture, with nothing left to unravel.
The 3×3 system, worked in full
Switch the size control to the 3-equation preset and the calculator loads x + y + z = 6, 2x − y + z = 3 and x + 2y − z = 2. The step list runs to 11 moves, and the first two are both swaps — the clearest possible demonstration of why the pivot is chosen, not assumed. In the first column the largest available entry is 2, sitting in row 2, so rows 1 and 2 swap before anything is divided. After the first column is cleared, the largest remaining entry in the second column is 2.5, sitting in row 3, so rows 2 and 3 swap too. A solver that always took the top row as its pivot would still reach the same destination here, but it would divide by 1 and then by smaller numbers, and it would stall outright on any system whose top-left entry is zero.
| Move | What happens | Why it happens now |
|---|---|---|
| 1 | Swap rows 1 and 2 | 2 is the largest entry in column 1 |
| 2 | Row 1 ÷ 2 | Make the first pivot a leading 1 |
| 3 | Row 2 − row 1 | Clear below the first pivot |
| 4 | Row 3 − row 1 | Clear below the first pivot |
| 5 | Swap rows 2 and 3 | 2.5 is the largest remaining entry in column 2 |
| 6 | Row 2 ÷ 2.5 | Make the second pivot a leading 1 |
| 7 | Row 1 + 0.5 × row 2 | Clear above the second pivot |
| 8 | Row 3 − 1.5 × row 2 | Clear below the second pivot |
| 9 | Row 3 ÷ 1.4 | Make the third pivot a leading 1 |
| 10 | Row 1 − 0.2 × row 3 | Clear above the third pivot |
| 11 | Row 2 + 0.6 × row 3 | Clear above the third pivot |
The reduced form is [1 0 0 | 1], [0 1 0 | 2] and [0 0 1 | 3], so the solution is x = 1, y = 2 and z = 3. Checking in the original equations, not the reduced ones, is the step that catches sign slips: 1 + 2 + 3 = 6, 2 − 2 + 3 = 3, and 1 + 4 − 3 = 2 — all three true. One display detail is worth knowing: the arithmetic underneath runs in decimals, and an intermediate value can come out as 2.0000000000000004 in floating point. Cells are shown rounded to six decimal places, so that value displays as the clean 2 it mathematically is. If a result ever looks one unit out in the sixth decimal place, that rounding is the explanation, not a wrong answer.
Count the moves and a pattern emerges: each new pivot costs one scaling plus one clearing operation per other row, so larger systems grow quickly — a 3×3 system takes 11 moves, and the 5×6 matrix in the next-but-one section takes 21. That growth is exactly why the step list matters more as matrices get bigger: nobody checks 21 hand moves by eye, but a listed log can be checked one move at a time.
Three verdicts, and how to read each one
Every system reduced on this page ends in exactly one of three verdicts, and the reduced form itself announces which one. There is no fourth case hiding in the arithmetic: either every variable is pinned down, or the equations contradict each other, or at least one variable is left free. Learning to read the announcement, rather than memorising three separate procedures, is the whole skill.
| Verdict | What the RREF shows | Two-variable picture | Example on this page |
|---|---|---|---|
| One solution | A leading 1 in every variable column, and no contradictory row | Two lines meeting at a single point | The loaded system: x = 1, y = 2 |
| No solution | A row of zeros in the variable columns with a non-zero answers entry, such as [0 0 | 3] | Two parallel lines that never meet | x + y = 2 with x + y = 5 |
| Infinitely many solutions | At least one variable column without a leading 1, and no contradictory row | Two copies of the same line, lying on top of each other | x + 2y = 3 with 2x + 4y = 6, giving x = 3 − 2y |
The infinite case deserves a worked parametric form, because it is the one students most often write down incompletely. Take the three-variable system x + 2y + 3z = 4, 2x + 4y + 6z = 8 and x + z = 2. The second equation is just twice the first, so it adds nothing, and the reduced form is [1 0 1 | 2], [0 1 1 | 1] over a row of zeros. The z column never earned a leading 1, so z is free: call it t, any real number, and read the rest off the rows as x = 2 − t and y = 1 − t. The full solution set is the line of points (2 − t, 1 − t, t). Testing two values proves the pattern rather than merely asserting it: t = 0 gives (2, 1, 0), and 2 + 2 + 0 = 4, 4 + 4 + 0 = 8, 2 + 0 = 2; t = 1 gives (1, 0, 1), and 1 + 0 + 3 = 4, 2 + 0 + 6 = 8, 1 + 1 = 2. Every choice of t works, and every solution comes from some choice of t — that two-way statement is what makes the parametric form complete rather than a single lucky answer.
Two counting words organise all of this. The rank is the number of leading 1s: it counts how many rows carry independent information. The number of free variables is the number of variable columns minus the rank, for a consistent system. For a bare matrix rather than a system, the matching word is nullity: the number of columns minus the rank, which counts the free directions of the matrix. A 5×6 matrix of rank 4 therefore has nullity 2 — two columns without pivots, two degrees of freedom — which is exactly the case worked in the bigger-matrices section below. A free variable is not a gap in the answer and not a zero in disguise: setting it to zero gives one particular solution, such as (3, 0) for x + 2y = 3, but the whole answer is the line, not the point.
Bigger matrices: what the paste panel adds, and where it stops
The main grid is built around presets: systems of two or three equations, and square matrices up to 4×4. Those presets cover most homework, but a system with four or five unknowns, or a rectangular matrix such as 5×6, does not fit them. The Advanced options panel below the calculator closes that gap with a paste panel: type or paste a matrix of up to 5 rows and 6 columns, choose whether the last column holds answers (system mode) or is just another column (matrix mode), and the panel reduces it with its own step list, verdict and rank. In system mode that means up to five equations in five unknowns; in matrix mode it means any shape up to the 5×6 cap.
The format is deliberately forgiving. One row per line, entries separated by spaces or commas, with an optional bar before the answers column and optional square brackets around rows — all of the following lines mean the same row: “1 2 3”, “1, 2, 3” and “[1 2 | 3]”. Two rules are not forgiving, and both match the main calculator. First, fractions must be typed as decimals: “1/2” is rejected, because a typed fraction would otherwise be misread as a whole number, and the panel says so plainly instead of guessing. Second, every row must have the same number of entries, or the panel refuses the matrix and says which row is short. Blank lines are ignored, so a matrix copied from a document with a trailing blank line still pastes cleanly.
The panel uses the same reduction order as the main calculator — largest available entry as pivot, swap into place, scale to a leading 1, clear the whole column — so results for matrices the main grid already covers can be compared directly. Paste the loaded system, “2 3 8” over “1 −1 −1”, in system mode, and the panel reports a cross-check: its reduced form matches the main calculator for the same matrix. Paste something larger, and it says so honestly instead: there is no main-calculator display to compare against, because the size is beyond the main grid. That boundary is stated on purpose. A second, independent-looking solver that silently disagreed with the main calculator would be worse than no panel at all; the cross-check exists so a disagreement, if one ever appeared, would be visible rather than hidden.
As a concrete larger case, paste the 5×6 matrix “1 2 0 1 3 5”, “0 1 1 0 2 4”, “2 1 1 2 1 3”, “1 0 2 1 0 2” and “0 2 1 1 1 6” in matrix mode. The panel reduces it in 21 moves to [1 0 0 0 2.25 0.25], [0 1 0 0 1.75 2.75], [0 0 1 0 0.25 1.25], [0 0 0 1 −2.75 −0.75] and a final row of zeros. The rank is 4, the pivot columns are 1, 2, 3 and 4, the free columns are 5 and 6, and the nullity is 6 − 4 = 2 — the two free columns are the two directions in which the matrix sends vectors to zero. The cap itself is a readability and honesty choice, not a mathematical one: elimination works for any size, but a 20×20 paste would be unreadable on this page and the decimal arithmetic would deserve the exact rational routines of dedicated linear algebra software, which is where larger systems belong.
Check your own RREF before you trust it
A reduced matrix can be checked in under a minute, and the check does not require redoing the elimination. Run down the four defining rules, then substitute the answer back into the original equations. If both pass, the answer is right regardless of which route the working took — that is the practical payoff of the uniqueness theorem.
| Rule | What to look for | The failure it catches |
|---|---|---|
| Leading 1s | The first non-zero entry of every non-zero row is exactly 1 | A pivot left unscaled, such as a leading 2 or −2.5 |
| Staircase | Each leading 1 sits strictly to the right of the one above it | Two pivots in the same column, or pivots out of order |
| Zeros around pivots | Every other entry in a pivot column is zero, above and below | Clearing only below the pivot, which gives REF, not RREF |
| Zero rows at the bottom | Rows of pure zeros sink below every non-zero row | A zero row left sitting above a working row |
Five mistakes account for nearly every wrong RREF handed in, and each has a distinct signature. Clearing only below the pivot is the commonest: the result looks tidy, the staircase is there, but entries above the pivots survive, so the answers column cannot simply be read off. Scaling a row by zero is not a shortcut at all — it destroys a row of information and is not one of the three legal moves, which all require a non-zero multiplier. Sign slips hide in the clearing step: subtracting a multiple where the factor is negative is really adding, so “row 2 − (−2) × row 1” means row 2 + 2 × row 1, and writing the minus sign without flipping the arithmetic is how a correct setup acquires a wrong answer. Reading a free column as zero gives a point that does satisfy the equations, but it is one solution masquerading as the whole set. And in matrix mode there is no answers column at all, so reading the last column as if it held solutions invents answers the matrix never contained.
The substitution check closes the loop. Take a fresh system, 3x + 2y = 7 with x − y = 1, whose reduced form is [1 0 | 1.8] and [0 1 | 0.8]. Plug x = 1.8 and y = 0.8 into the originals: 3 × 1.8 + 2 × 0.8 = 5.4 + 1.6 = 7, and 1.8 − 0.8 = 1 — both true, so the solution is confirmed without re-running a single row operation. For an infinite family, check two values of the parameter, as in the verdicts section; for a no-solution verdict, check that the contradictory row really follows from the originals by adding or subtracting the original equations to reproduce it. If a check fails, the error is in the working, not in the theorem: re-run the step list move by move, and the first matrix that stops matching the claimed operation is where the slip sits.
Checking by substitution: the thirty-second audit that catches every slip
Put the answer back into the equations. If it fits all three, the row operations were right.
Reduced row echelon form is unique: the same matrix always reduces to the same RREF no matter which valid sequence of row operations is used. That uniqueness is what makes substitution a complete check. The worked 3×3 system on this page — x + 2y + 3z = 14, 2x + y + z = 7, 3x + 4y + z = 14 — reduces to x = 1, y = 2, z = 3, and the check is to put those values back: 1 + 4 + 9 = 14; 2 + 2 + 3 = 7; 3 + 8 + 3 = 14. All three fit, so the reduction was right. If any equation fails, the first matrix in the step list that stops matching the claimed operation is where the slip sits — re-run the steps move by move from the top, and the error shows itself.
Substitution also reads the verdicts. A row of zeros with a non-zero constant on the right is a contradiction — no solution, whatever the other rows say. A free variable (a column with no leading 1) means infinitely many solutions, each one checkable by substitution once the free variable is given a value. And a leading 1 in every column with no contradiction means the unique solution, checkable directly. The RREF does not just give the answer; it labels the kind of answer, and substitution verifies both.
Row operations, verdicts and the 3×3 system in full: RREF explained.
RREF and invertibility: the identity test, read off the reduced form
A square matrix is invertible exactly when its RREF is the identity — and the inverse can be read from the same reduction.
Augment a square matrix with the identity and reduce: if the left block becomes the identity, the right block is the inverse. The 2×2 check on this page is [[2,1],[1,1]], whose inverse is [[1,−1],[−1,2]] — verified by multiplication, since [[2,1],[1,1]] × [[1,−1],[−1,2]] returns the identity. If the reduction instead produces a zero row on the left, the matrix is singular: no inverse exists, and the system it represents either has no solution or infinitely many.
The same test answers the determinant question without computing a determinant: a square matrix has a non-zero determinant exactly when its RREF is the identity, and the row operations record the determinant’s sign and scale along the way. For the square matrices up to 5×5 this calculator accepts, the RREF is the single test that settles invertibility, consistency and uniqueness together — three questions, one reduction.
Frequently asked questions
What is reduced row echelon form?
It is the fully tidied shape of a matrix: every non-zero row starts with a leading 1, those 1s form a staircase, each leading 1 is the only non-zero entry in its column, and zero rows sit at the bottom. Any matrix can be brought to this shape using only row operations, and the result is always the same. When the matrix represents a system of equations, the reduced form displays the solution directly — which is exactly what the calculator above produces, step by step.
How do you turn a matrix into RREF?
Work column by column. Pick the largest available entry in the current column (the pivot), swap its row into place, divide the row so the pivot becomes 1, then add multiples of that row to every other row until the pivot stands alone in its column. Move one column right and repeat. For [2 3 | 8] and [1 −1 | −1] the four moves are: divide row 1 by 2, subtract row 1 from row 2, divide row 2 by −2.5, then subtract 1.5 times row 2 from row 1 — arriving at [1 0 | 1] and [0 1 | 2].
What row operations are allowed?
Exactly three: swapping two rows, multiplying every entry of a row by the same non-zero number, and adding a multiple of one row to another row. Each is reversible, and each leaves the solution set of a system untouched — swapping equations changes nothing, scaling an equation changes nothing, and replacing an equation by itself plus another keeps every solution of the pair. Because the moves never change what the matrix says, the reduced form is a faithful, easier-to-read copy of the original.
What does it mean when a row becomes 0 = 5?
It means the system has no solution. A row of zeros in the coefficient columns with a non-zero answers entry is an equation claiming 0x + 0y = 5 — impossible for any values of the variables. The original equations contradict each other: for two-variable systems they graph as parallel lines that never meet. This calculator says no solution the moment such a row appears in the reduced form and highlights why.
What if a column never gets a leading 1?
That variable is a free variable: the equations do not pin it down, so it can take any value, and the remaining variables are expressed in terms of it. A system shaped like [1 2 | 3] over a zero row says x = 3 − 2y with y free — infinitely many solutions forming a line. Free variables appear whenever there are fewer independent equations than unknowns, or when one equation is a disguised copy of another.
Is the RREF of a matrix always the same?
Yes — that is one of the neatest theorems in linear algebra. Row echelon forms can vary with the choices made along the way, but the reduced row echelon form of a matrix is unique: every legal sequence of row operations lands on exactly the same final matrix. So if your hand working took different steps from the ones listed here, that is fine and expected — compare final matrices, and they should match cell for cell (up to rounding in the last decimal place).
Can this calculator reduce a matrix bigger than 4×4?
The main grid presets go up to 4 rows. For anything larger, open Advanced options below the calculator and use the paste panel: it takes matrices up to 5 rows and 6 columns, in system mode (up to five equations in five unknowns, last column as answers) or matrix mode. The panel reduces with the same largest-entry pivot order as the main calculator, lists every move, and reports rank, pivot columns and the verdict. Larger systems, or work that needs exact rational answers rather than decimals, belong in dedicated linear algebra software.
Why does the calculator swap rows instead of always using the top row?
It picks the largest available entry in the current column as the pivot, a habit called partial pivoting. A zero in the pivot position would make division impossible even when the system is perfectly solvable: the system y = 2 with x = 3, written as [0 1 | 2] over [1 0 | 3], needs a swap before it can start. A very small pivot is almost as bad, because dividing by it magnifies rounding errors through every later move. Swapping the biggest entry up costs nothing — swapping equations changes nothing about the solution — and it keeps both failure modes away.
How do I write the answer when there are infinitely many solutions?
Name the free variable, by convention t, and express every other variable in terms of it. For the reduced form [1 2 | 3] over a zero row, y is free, so the answer is x = 3 − 2t with y = t, for any real number t. Check it at two values: t = 0 gives (3, 0), and 3 + 0 = 3; t = 1 gives (1, 1), and 1 + 2 = 3. Every value of t gives a solution, and every solution comes from some value of t, which is what makes the parametric form the complete answer rather than a single example.
Can RREF tell me whether a square matrix is invertible?
Yes, directly. A square matrix is invertible exactly when its reduced form is the identity matrix — that is, when it has full rank, with a leading 1 in every column. If the rank falls short, the matrix is singular and has no inverse. Try it in Reduce a matrix only mode with the 4×4 preset: it reduces to rank 3 with a final row of zeros, so that matrix is not invertible. The same test works in the paste panel for any square matrix up to 5×5.
How do I check an RREF answer without redoing the whole reduction?
Substitute the solution back into the original equations. For the system x + 2y + 3z = 14, 2x + y + z = 7, 3x + 4y + z = 14, the solution x = 1, y = 2, z = 3 gives 14, 7 and 14 — all three fit, so the reduction was right. If any equation fails, re-run the step list from the top: the first matrix that stops matching its claimed operation is where the slip sits.
Can RREF tell me whether a square matrix is invertible?
Yes, directly. A square matrix is invertible exactly when its RREF is the identity matrix. Augment with the identity and reduce: if the left block becomes the identity, the right block is the inverse — for [[2,1],[1,1]] the inverse is [[1,−1],[−1,2]], verified by multiplication. A zero row in the reduction means the matrix is singular and no inverse exists.
More maths calculators
Matrix Calculator
Multiply, add, transpose, invert — everyday matrix arithmetic.
⚖️Proportion Calculator
Missing values in a/b = c/d, solved with steps.
½Fraction Calculator
Fraction arithmetic with the working shown.
𝑥²Quadratic Formula
Roots of any quadratic, discriminant included.
🧮Scientific Calculator
A full keypad calculator for everything else.
🧩RREF Explained
Row operations, verdicts, the 3×3 system and invertibility.