The row echelon form calculator above performs Gaussian and Gauss-Jordan elimination on a matrix of up to eight rows and eight columns, using exact fraction arithmetic so no step is polluted by rounding. It prints the row echelon form, the reduced row echelon form, and the complete list of elementary row operations that produced them, in order. It also reports the rank, which columns are pivots, which are free, and — if you tell it the last column holds constants — whether the corresponding linear system has one solution, infinitely many, or none.
Arb Digital publishes this page because elimination is the operation the rest of linear algebra is built on, and because showing the steps is the entire value. A tool that prints only the final RREF is useless for checking a hand calculation, since the one thing a student needs to know is where their answer diverged from the correct one. Every operation here is written in the standard notation, so you can line your working up against it row by row.
What This Row Echelon Form Calculator Does
It reduces a matrix using only the three elementary row operations: swapping two rows, multiplying a row by a non-zero constant, and adding a multiple of one row to another. None of these changes the row space, the rank, or the solution set of an associated system, which is why the reduced matrix can be read as if it were the original.
Its job is deliberately narrower than the neighbouring tools. Our matrix inverse calculator returns an inverse and the determinant calculator returns a single scalar; both use elimination internally but hide it. The matrix rank calculator returns just the rank, the null space calculator returns a basis for the kernel, and the linear independence calculator answers a yes-or-no question about a set of vectors. All five are downstream of the elimination this page performs and displays. If you only want the solution to a small system without seeing the matrix at all, the system of equations calculator is the shorter route.
How to Use It
- Type one row per line. Entries can be separated by spaces or commas. Every row must have the same count.
- Say what the last column is. For a system of equations it is the constants, and the tool will classify the solution set. For a plain matrix it is just another column.
- Read the operation list in order. Each line is written the way you would write it by hand, such as R2 → R2 − 2R1.
- Compare against your own working. Different operation orders give different REFs, so match on the RREF if your intermediate rows differ.
- Check the pivot and free counts. Pivots plus free columns always equals the number of columns, and pivots equals the rank.
The Algorithm and How It's Calculated
Forward elimination works down the matrix one pivot at a time. Find the leftmost column with a non-zero entry at or below the current row, swap that row up if needed, divide it through so the pivot becomes 1, then subtract multiples of it from every row beneath to clear the rest of that column. Move down one row and one column and repeat. What comes out is row echelon form: all zero rows at the bottom, and each leading 1 strictly to the right of the one above it.
Take the default matrix, the system x + y + z = 6, 2x − y + z = 3, x + 3y − 2z = 1. The first pivot is already 1. Subtracting 2R1 from R2 gives [0, −3, −1, −9] and subtracting R1 from R3 gives [0, 2, −3, −5]. Scaling R2 by −1/3 gives [0, 1, 1/3, 3]. Subtracting 2R2 from R3 gives [0, 0, −11/3, −11], and scaling by −3/11 gives [0, 0, 1, 3]. That is the REF, and it already tells you z = 3.
Gauss-Jordan continues upward. Subtracting one third of R3 from R2 gives [0, 1, 0, 2]; subtracting R3 from R1 gives [1, 1, 0, 3]; subtracting R2 from R1 gives [1, 0, 0, 1]. The RREF is the identity matrix beside the column (1, 2, 3), so x = 1, y = 2 and z = 3, which can be checked directly in all three original equations. MathWorld's entry on echelon form states the defining conditions for both forms precisely.
REF Is Not Unique. RREF Is.
This distinction causes more confusion than any other point in the topic. A matrix has many valid row echelon forms. Choose a different pivot row when there is a tie, scale differently, or eliminate in a different order, and you get a different REF — all correct, all satisfying the definition. Two students can hand in different REFs for the same matrix and both be right.
Reduced row echelon form is unique. Requiring every pivot to be 1, and requiring the pivot to be the only non-zero entry in its column, pins the matrix down completely. There is exactly one RREF for any given matrix, no matter what route you take to reach it. That uniqueness is what makes RREF theoretically useful: it is a canonical form, so two matrices have the same RREF if and only if they have the same row space.
The practical consequence is about checking work. If your REF differs from the one printed here, you have not necessarily made a mistake — carry on to RREF and compare there. If your RREF differs, one of you is wrong, and the operation list will show where the paths separated. This is also why every theorem about pivot positions, rank and free variables is stated in terms of RREF.
Rank, Pivots and Free Columns
The rank is the number of pivots, which is also the number of non-zero rows in the echelon form. It is the dimension of the row space and of the column space, and it does not depend on how you eliminated. Columns without a pivot are free columns, and the count of pivots plus the count of free columns always equals the total number of columns — the rank-nullity theorem, in its most concrete form.
For a system of equations, free columns correspond to free variables: parameters you can set to anything, with the pivot variables then determined by them. A system with two free variables has a solution set that is a two-parameter family, geometrically a plane's worth of solutions inside whatever space the variables live in. A system with no free variables among the coefficient columns has at most one solution.
Rank also detects singularity without computing a determinant. A square matrix of order n is invertible exactly when its rank is n, which happens exactly when its RREF is the identity. If elimination produces a zero row, the rank is short of full, the determinant is zero, and no inverse exists. That is often faster and more informative than evaluating the determinant, because it also tells you which combination of rows was dependent.
Reading the Solution Set Straight From the RREF
With the last column set as constants, three cases are possible and each has an unmistakable signature. If a row reads all zeros in the coefficient columns but has a non-zero constant, it asserts that 0 equals something non-zero, and the system is inconsistent — no solutions at all. This is the first thing to look for, and it overrides everything else.
If the system is consistent and every coefficient column holds a pivot, there is exactly one solution and the RREF displays it directly in the constants column. If it is consistent but some coefficient column has no pivot, there are infinitely many solutions, one for each choice of the free variables, and the general solution is written by expressing each pivot variable in terms of them. The Cramer's rule calculator handles the unique-solution case for small square systems by a completely different route, and comparing the two is a good way to check both.
Exact Fractions, and Why Real Software Does Something Else
This calculator uses exact rational arithmetic. Fractions stay as fractions, so a pivot of 3/7 is exactly 3/7 and never 0.42857142857. That matches how the work is done by hand and means a zero really is zero, which matters because the entire algorithm depends on correctly deciding whether an entry is zero before choosing a pivot.
Numerical linear algebra software does the opposite, working in floating point, and it therefore adds a step this page does not need: partial pivoting. Rather than taking the first non-zero entry as the pivot, it takes the largest available one in the column, because dividing by a very small pivot amplifies rounding error through every subsequent operation. On exact fractions that concern disappears entirely, at the cost of coefficients that can grow large. MIT OpenCourseWare's 18.06 Linear Algebra covers elimination, pivoting and the factorisations built on them, including the LU decomposition that records exactly these steps — our LU decomposition calculator produces that form.
Arb Digital builds tools and content that demonstrate rather than assert, which is what earns links from people who check things.
Browse All Free Tools Talk To Our TeamCommon Mistakes to Avoid
- Multiplying a row by zero — that is not an elementary row operation. It destroys information and can turn an inconsistent system into a consistent-looking one.
- Operating on columns — column operations change the solution set. Only row operations are permitted when solving a system.
- Writing R2 → 2R1 − R2 without care — this is legal but it also scales R2, so it changes the determinant. Prefer R2 → R2 − 2R1, which leaves the determinant untouched.
- Assuming a different REF means an error — REF is not unique. Compare RREFs before concluding anything went wrong.
- Missing the inconsistent row — a row of zeros with a non-zero constant means no solutions, however tidy the rest of the matrix looks.
Related Free Tools From Arb Digital
Multiply and transpose with the matrix calculator, get the rank on its own from the matrix rank calculator, find the kernel with the null space calculator, or compute eigenvalues once the matrix is understood using the eigenvalue calculator. The full free online tools hub lists every linear algebra calculator we publish.
Frequently Asked Questions
Row echelon form requires zeros below each leading entry. Reduced row echelon form additionally requires every leading entry to be 1 and to be the only non-zero entry in its column. REF is not unique; RREF is.
Swapping two rows, multiplying a row by a non-zero constant, and adding a multiple of one row to another. None of them changes the row space or the solution set of an associated system.
Count the pivots, which is the same as counting the non-zero rows once the matrix is in echelon form. That number is the rank and it does not depend on which valid sequence of operations you used.
Look for a row whose coefficient entries are all zero but whose constant is not. That row states that zero equals a non-zero number, so the system is inconsistent.
A variable whose column contains no pivot. It can take any value, and the pivot variables are then determined in terms of it, which is why free variables produce infinitely many solutions.
Because the algorithm depends on deciding exactly whether an entry is zero. Rational arithmetic keeps that decision correct, whereas floating point can leave a tiny non-zero residue where an exact zero belongs.
Yes. Track the operations: swapping two rows flips the sign, scaling a row by k multiplies the determinant by k, and adding a multiple of one row to another leaves it unchanged.
This page explains a linear algebra procedure for educational purposes only, and results should be checked against your own working before being used in assessed coursework.