Echelon Calculator
In linear algebra, few procedures are as fundamental — or as tedious by hand — as reducing a matrix to row echelon form. It is the workhorse step behind solving systems of linear equations, computing rank, testing for invertibility, and finding determinants. Doing it for a 3×3 matrix means a long chain of row operations where a single arithmetic slip corrupts everything downstream.
Row echelon form (REF) is a standardized shape for a matrix: each nonzero row starts with a leading entry (a pivot) that sits strictly to the right of the pivot in the row above, and any all-zero rows sink to the bottom. Once a matrix is in this staircase shape, its secrets — how many independent rows it has, whether it is invertible, what its determinant is — become readable at a glance.
The Echelon Calculator on this page performs Gaussian elimination on any 3×3 matrix you enter and reports the row echelon form, the rank, the pivot columns, the determinant, whether the matrix is invertible, and how many row swaps were used. This article explains what echelon form is, how the elimination works, and how to read each result.
What Is Row Echelon Form?
A matrix is in row echelon form when it satisfies three conditions. First, every nonzero row begins with a leading nonzero entry called a pivot. Second, each pivot lies in a column strictly to the right of the pivot in the row above it, creating the characteristic staircase pattern. Third, any rows consisting entirely of zeros sit at the bottom of the matrix.
Consider the matrix [[2, 1, -1], [0, 3, 4], [0, 0, 5]]. Its pivots are 2 (column 1), 3 (column 2), and 5 (column 3) — each one step to the right of the previous. This matrix is in row echelon form. Contrast it with [[0, 3, 4], [2, 1, -1], [0, 0, 5]], which is not in echelon form because the first row’s pivot (column 2) is to the right of the second row’s pivot (column 1) — the staircase descends instead of ascending.
There is also a stricter variant called reduced row echelon form (RREF), where each pivot equals 1 and is the only nonzero entry in its column. The calculator on this page produces ordinary row echelon form (REF), not reduced — REF is enough to determine rank, pivots, and invertibility, and it is the form most textbooks teach first through Gaussian elimination.
Why Echelon Form Matters
Echelon form matters because it is the universal decoder ring for matrices. The rank of a matrix — the number of linearly independent rows or columns — is simply the number of pivots in its echelon form. Rank tells you whether a system of equations has a unique solution, infinitely many, or none, and whether a set of vectors is truly independent or secretly redundant.
Invertibility is decided by echelon form too. A square matrix is invertible exactly when its echelon form has a pivot in every column — full rank. And the determinant, that single number summarizing how a matrix scales space, equals the product of the diagonal entries of the echelon form (adjusted for row swaps). Instead of memorizing separate tests for each property, you perform one elimination and read off all the answers.
Beyond theory, Gaussian elimination is the algorithm inside virtually every numerical solver, from spreadsheet matrix functions to the linear algebra libraries powering machine learning. Understanding echelon form by hand, even for small matrices, builds the intuition that makes those black-box tools trustworthy rather than mysterious.
How to Use the Echelon Calculator
Enter your 3×3 matrix and the calculator performs Gaussian elimination with partial pivoting:
Step 1: Enter Row 1. Type the three numbers of the first row into the a11, a12, and a13 fields. For example, 2, 1, -1.
Step 2: Enter Row 2. Type the second row into a21, a22, a23 — for example, -3, -1, 2.
Step 3: Enter Row 3. Type the third row into a31, a32, a33 — for example, -2, 1, 2. All nine entries must be filled with numbers (decimals allowed).
Step 4: Click Calculate. The calculator eliminates entries below each pivot, swaps rows when a pivot position is zero, and displays the results.
Step 5: Read your results. You will see the Row Echelon Form as three bracketed rows, the Rank, the Pivot Columns, the Determinant, whether the matrix is Invertible (Yes/No), and the Row Swaps Used during elimination.
Step 6: Click Reset to try another matrix. The Reset button clears all nine fields.
Worked Example 1: A Full-Rank Matrix
Let us reduce the matrix with rows [2, 1, -1], [-3, -1, 2], [-2, 1, 2].
Step 1 — First pivot. The pivot in column 1 is 2 (row 1). Eliminate below it. Row 2 gets Row 2 + 1.5 × Row 1: -3 + 3 = 0, -1 + 1.5 = 0.5, 2 + (-1.5) = 0.5. Row 3 gets Row 3 + 1 × Row 1: -2 + 2 = 0, 1 + 1 = 2, 2 + (-1) = 1. The matrix is now [[2, 1, -1], [0, 0.5, 0.5], [0, 2, 1]].
Step 2 — Second pivot. The pivot in column 2 is 0.5 (row 2). Eliminate below: Row 3 gets Row 3 − 4 × Row 2: 0 − 0 = 0, 2 − 2 = 0, 1 − 2 = -1. The matrix is now [[2, 1, -1], [0, 0.5, 0.5], [0, 0, -1]].
Step 3 — Read the results. This is row echelon form with pivots in columns 1, 2, 3. Rank = 3. Determinant = 2 × 0.5 × (-1) = -1 (no row swaps, so no sign change). Invertible: Yes.
Final result: REF = [2, 1, -1] | [0, 0.5, 0.5] | [0, 0, -1], rank 3, determinant -1. You can verify the determinant by the standard 3×3 formula: it also gives -1.
Worked Example 2: A Rank-Deficient Matrix
Now consider rows [1, 2, 3], [4, 5, 6], [7, 8, 9] — the classic singular example.
Step 1 — First pivot. Pivot is 1 (row 1). Row 2 becomes Row 2 − 4 × Row 1: [0, -3, -6]. Row 3 becomes Row 3 − 7 × Row 1: [0, -6, -12]. Matrix: [[1, 2, 3], [0, -3, -6], [0, -6, -12]].
Step 2 — Second pivot. Pivot is -3 (row 2, column 2). Row 3 becomes Row 3 − 2 × Row 2: [0, 0, 0]. Matrix: [[1, 2, 3], [0, -3, -6], [0, 0, 0]].
Step 3 — Read the results. The third row vanished — a zero row at the bottom, exactly as echelon form requires. Pivots are in columns 1 and 2 only. Rank = 2. Because the rank is less than 3, the determinant is 0 and the matrix is not invertible.
Final result: REF = [1, 2, 3] | [0, -3, -6] | [0, 0, 0], rank 2, determinant 0, not invertible. The zero row reveals that the third row was a linear combination of the first two all along.
How Gaussian Elimination Works
Gaussian elimination is the systematic procedure the calculator follows, and it uses only three legal elementary row operations: swapping two rows, multiplying a row by a nonzero number, and adding a multiple of one row to another. These operations preserve the essential properties of the matrix (like the solution set of its equations) while driving it toward the staircase shape.
The algorithm works column by column, left to right. In each column, it looks at or below the current row for a nonzero entry to serve as the pivot. If the pivot is not already in the current row, it swaps rows — the calculator counts these swaps because each one flips the sign of the determinant. Then it subtracts appropriate multiples of the pivot row from every row below, creating zeros beneath the pivot. When no nonzero entry exists in a column, the algorithm simply moves to the next column, leaving that column pivot-free.
The reason this works for the determinant is elegant: adding a multiple of one row to another does not change the determinant at all, and scaling is avoided entirely in this implementation. So the determinant of the original matrix equals the determinant of the echelon form up to the sign from row swaps — and the determinant of an upper-staircase matrix is just the product of its diagonal entries, or zero if any diagonal entry is zero.
Reading Rank, Pivots, and Invertibility
The rank is the count of pivots — the number of nonzero rows in the echelon form. It measures the true dimensionality of the matrix: a rank-3 matrix out of 3×3 uses all its rows independently, while a rank-2 matrix has one redundant row. Rank can never exceed the smaller of the row and column counts.
Pivot columns tell you which variables (or columns) carry the independent information. In Example 2, the pivots sat in columns 1 and 2, meaning the third column was dependent on the first two. For solving equations, pivot columns correspond to basic variables (determined uniquely) while non-pivot columns correspond to free variables (which can vary, producing infinite solutions).
Invertibility for a square matrix is equivalent to full rank — a pivot in every row and column. The calculator reports this directly. An invertible matrix has a nonzero determinant and represents a reversible transformation; a singular matrix (determinant zero) squashes space flat in at least one direction, like projecting 3D onto a plane.
Tips for Working With Echelon Form
- Always scan for zero rows first. If a row is all zeros before you start, the rank is already less than 3 and the determinant is zero.
- Swap rows instead of dividing. When a pivot position is zero, swap with a lower row rather than doing anything exotic — it keeps fractions away.
- Track your row swaps. Each swap flips the determinant’s sign. Forgetting them is the most common determinant error.
- Clear fractions by scaling thoughtfully. Multiplying a row by a constant is legal for solving equations but changes the determinant — only do it when solving, not when finding determinants.
- Verify with the determinant formula. For 3×3 matrices, the rule-of-Sarrus or cofactor expansion gives an independent check of the calculator’s determinant.
- Watch for near-zero pivots. Tiny pivots (like 0.0001) signal an ill-conditioned matrix where rounding error explodes — a warning sign in real numerical work.
- Use REF for rank, RREF for solutions. Row echelon form answers “how many solutions”; only the reduced form hands you the actual solution values directly.
- Remember echelon form is not unique. Different elimination choices give different (but equally valid) echelon forms — the rank and pivot positions are what stay constant.
- Check invertibility before inverting. Computing an inverse of a singular matrix is impossible; the calculator’s Yes/No saves you from a doomed calculation.
- Practice one 3×3 by hand. Doing a single elimination manually, then checking against the calculator, cements the algorithm far better than reading about it.
Frequently Asked Questions
1. What is row echelon form?
Row echelon form is a standardized matrix shape where each nonzero row starts with a leading pivot strictly to the right of the pivot above it, and all-zero rows sit at the bottom. It is the result of Gaussian elimination and makes rank, pivots, and invertibility easy to read.
2. How do you convert a matrix to echelon form?
Use Gaussian elimination: working left to right, pick a nonzero pivot in each column (swapping rows if needed), then subtract multiples of the pivot row to create zeros below it. Repeat for each column until the staircase pattern appears.
3. What is the difference between REF and RREF?
Row echelon form (REF) requires the staircase of pivots with zeros below. Reduced row echelon form (RREF) additionally requires each pivot to be 1 and the only nonzero entry in its column. RREF is unique; REF is not.
4. How do you find the rank of a matrix?
Reduce the matrix to echelon form and count the nonzero rows (the pivots). That count is the rank. A 3×3 matrix has rank 3, 2, 1, or 0.
5. What does it mean if a row becomes all zeros?
A zero row means that row was a linear combination of the rows above it — it added no new information. Each zero row reduces the rank by one and forces the determinant to zero.
6. How is the determinant found from echelon form?
Multiply the diagonal entries of the echelon form, then flip the sign once for each row swap performed (an odd number of swaps negates it). If any diagonal entry is zero, the determinant is zero.
7. When is a matrix invertible?
A square matrix is invertible exactly when its echelon form has full rank — a pivot in every column. Equivalently, its determinant is nonzero. The calculator reports this as Yes or No.
8. Why did my matrix need row swaps?
A swap is needed when the current pivot position contains zero but a nonzero entry exists lower in the same column. Swapping brings a usable pivot into place; it is a normal part of elimination, not an error.
9. Can a non-square matrix be put in echelon form?
Yes. Gaussian elimination works on any size matrix. The staircase simply stops when it runs out of rows or columns, and the rank is the number of pivots found.
10. What are pivot columns used for?
Pivot columns identify the independent columns of the matrix. When solving linear systems, they correspond to basic variables with determined values, while non-pivot columns correspond to free variables.
11. Does the calculator show reduced row echelon form?
No. This calculator produces ordinary row echelon form via Gaussian elimination without normalizing pivots to 1 or clearing entries above pivots. REF is sufficient for rank, determinant, and invertibility questions.
12. What does rank 2 mean for a 3×3 matrix?
It means only two of the three rows (or columns) are linearly independent — the third is a combination of the other two. The matrix is singular, its determinant is zero, and it cannot be inverted.
13. How accurate are the decimal results?
The calculator rounds displayed entries to four decimal places. Internally it uses full floating-point precision, so rank and pivot detection use a tiny tolerance (1e-10) to distinguish true zeros from rounding dust.
14. What is partial pivoting?
Partial pivoting is the strategy of choosing, in each column, a nonzero entry at or below the current row as the pivot (swapping rows to bring it up). It avoids division by zero and is what this calculator implements.
15. Where is echelon form used in real life?
It underlies computer graphics transformations, circuit analysis, economic modeling, structural engineering calculations, and the training of machine learning models — anywhere systems of linear equations or matrix properties need computing.
CONCLUSION
Row echelon form turns an intimidating grid of numbers into a readable staircase where rank, pivots, determinant, and invertibility are all visible at a glance. Gaussian elimination — the column-by-column process of choosing pivots and clearing entries below them — is the single algorithm that unlocks all of these properties at once.
The single most important takeaway is that elimination is a decoder, not just a chore. Every time you reduce a matrix, you are asking it how many independent directions it really has, and the pivots give you the honest answer. Use the calculator to check your hand calculations, and let the staircase shape build your intuition for what matrices are really saying.