What Is the RREF Matrix Calculator?
The RREF Matrix Calculator computes the reduced row echelon form of any matrix you enter. Reduced row echelon form (RREF) is the simplest version of a matrix obtained through Gaussian elimination. It is used worldwide in linear algebra to solve systems of equations, find matrix rank, determine whether vectors are linearly independent, and identify a basis for a vector space. This tool is a universal mathematical resource — it is not tied to any single country or curriculum.
How to Use the Calculator
- Enter the number of rows and columns for your matrix.
- Type or paste each entry, including decimals or fractions if your system allows them.
- Click calculate to instantly view the RREF result.
- Compare the output against your own hand calculations to check your work.
The calculator is ideal for students verifying homework, teachers preparing examples, and anyone who needs a fast, reliable answer without manual arithmetic errors.
What Reduced Row Echelon Form Means
A matrix is in RREF when it satisfies four conditions:
- Any rows containing only zeros are at the bottom.
- The leading entry (pivot) in each non-zero row is 1.
- Each pivot 1 is to the right of the pivot in the row above it.
- Every pivot 1 is the only non-zero entry in its column.
The calculator applies elementary row operations — swapping rows, scaling rows, and adding multiples of one row to another — until these rules are met.
$$\mathbf{A} \;\xrightarrow[\;\text{row operations}\;]{\text{Gauss-Jordan}}\; \mathbf{R} = \text{RREF}\left( \mathbf{A} \right)$$
Worked Example
Take the matrix representing the system:
$$\left[\begin{array}{cc|c} 1 & 2 & 5 \\ 3 & 4 & 6 \end{array}\right]$$
Subtract 3 times the first row from the second to get \(\left[\begin{array}{cc|c} 0 & -2 & -9 \end{array}\right]\). Divide that row by \(-2\) to make the pivot 1. Then eliminate the entry above it. The final RREF is:
$$\left[\begin{array}{cc|c} 1 & 0 & -4 \\ 0 & 1 & 4.5 \end{array}\right]$$ This shows \(x = -4\) and \(y = 4.5\).
Interpreting Your RREF Result
The reduced row echelon form (RREF) of a matrix is unique, so the output tells you the same structural facts about the matrix no matter how you got there. Here is how to read it.
- Rank = number of pivots. Each nonzero row has a leading 1 (a pivot). Count these leading 1s to get the rank of the matrix.
- Pivot columns vs. free columns. A column containing a leading 1 is a pivot column. A column with no leading 1 is a free column. For a coefficient matrix, the number of free columns equals (number of variables) − rank.
- Zero rows. A row of all zeros means one row of the original matrix was a linear combination of the others, i.e. the rows are linearly dependent.
- Identity output. If a square \(n \times n\) matrix reduces to the identity matrix \(I_n\), its rank is \(n\), its determinant is nonzero, and it is invertible. If the RREF has a zero row, the matrix is singular (not invertible).
Reading an augmented matrix \([A \mid \mathbf{b}]\)
- Unique solution: every variable column has a pivot and there is no contradictory row. Example: the RREF \(\begin{bmatrix}1&0&\mid&3\\0&1&\mid&-2\end{bmatrix}\) gives \(x=3,\ y=-2\).
- Infinitely many solutions: the system is consistent but at least one variable column has no pivot. Those free variables can take any value, and the pivot variables are expressed in terms of them (parametric form). Example: \(\begin{bmatrix}1&2&\mid&4\\0&0&\mid&0\end{bmatrix}\) means \(x + 2y = 4\); let \(y=t\), then \(x = 4 - 2t\).
- No solution: a row of the form \([0\ 0\ \cdots\ 0 \mid 1]\) appears (a pivot in the augmented column). It states \(0 = 1\), so the system is inconsistent.
Tip: always check whether the last column is a pivot column. If it is, the system has no solution; if not, count free columns among the variable columns to decide between a unique and an infinite solution set.
Step-by-Step Gauss-Jordan Procedure by Hand
Gauss-Jordan elimination uses only three elementary row operations: (1) swap two rows, (2) multiply a row by a nonzero constant, and (3) add a multiple of one row to another row. These operations do not change the solution set of a linear system. Every matrix has exactly one RREF, regardless of the order in which you apply the operations.
- Find the leftmost nonzero column among the rows not yet processed. This is the current pivot column.
- Swap rows if needed so that a nonzero entry sits in the pivot position (the top of the unprocessed rows in that column).
- Scale the pivot row by dividing by the pivot value so the pivot becomes 1: \(R_i \leftarrow \frac{1}{p} R_i\).
- Eliminate every other entry in the pivot column, both above and below, using \(R_j \leftarrow R_j - a_{j}\,R_i\), where \(a_j\) is the entry to be cleared.
- Move on to the next row and the next column to the right.
- Repeat steps 1–5 until no unprocessed rows or nonzero columns remain. Any all-zero rows end up at the bottom.
Small example
Reduce \(\begin{bmatrix}2&4&6\\1&3&4\end{bmatrix}\).
- Pivot column 1. Scale \(R_1 \leftarrow \frac12 R_1\): \(\begin{bmatrix}1&2&3\\1&3&4\end{bmatrix}\).
- Eliminate below: \(R_2 \leftarrow R_2 - R_1\): \(\begin{bmatrix}1&2&3\\0&1&1\end{bmatrix}\).
- Pivot in row 2 is already 1. Eliminate above: \(R_1 \leftarrow R_1 - 2R_2\): \(\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}\).
The RREF is \(\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}\), with rank 2 and pivots in columns 1 and 2.
Key Terms in Row Reduction
- Pivot
- The position in a row that holds the leading 1 in RREF; it marks where a variable is determined.
- Leading entry
- The leftmost nonzero entry of a nonzero row. In RREF every leading entry equals 1.
- Pivot column
- A column that contains a pivot. In RREF it has 1 in the pivot position and 0 elsewhere.
- Free variable
- A variable whose column has no pivot. It can take any value, and the pivot variables depend on it.
- Rank
- The number of pivots (nonzero rows in the RREF); the dimension of the row space and column space.
- Augmented matrix
- A coefficient matrix \(A\) with the constants column \(\mathbf{b}\) appended, written \([A \mid \mathbf{b}]\), representing a linear system.
- Elementary row operation
- One of three moves: swap two rows, scale a row by a nonzero constant, or add a multiple of one row to another.
- Gauss-Jordan elimination
- The algorithm that applies elementary row operations to reach RREF, clearing entries both above and below each pivot.
- Row equivalence
- Two matrices are row equivalent if one can be turned into the other by elementary row operations. They share the same RREF and the same solution set (for systems).
- Consistent / inconsistent system
- A system is consistent if it has at least one solution and inconsistent if it has none. An inconsistent system shows a row \([0\ \cdots\ 0 \mid 1]\) in the RREF of its augmented matrix.
Frequently Asked Questions
What is the difference between REF and RREF? Row echelon form (REF) only requires pivots arranged in a staircase pattern with zeros below them. RREF goes further, requiring leading 1s and zeros both above and below each pivot.
Can RREF tell me if a system has no solution? Yes. If a row reduces to all zeros on the left but a non-zero value on the right (such as \(0 = 1\)), the system is inconsistent and has no solution.
Is RREF unique? Yes. Every matrix has exactly one reduced row echelon form, regardless of which sequence of valid row operations you use to reach it.