Reduced Row Echelon Form (RREF) Calculator
Convert a matrix into reduced row echelon form (RREF) using Gauss-Jordan elimination. In RREF, each non-zero row has a leading 1, and every other entry in a pivot column is zero.
A
Learn About Gauss-Jordan Elimination (RREF)
Definition of Reduced Row Echelon Form (RREF)
A matrix is in Reduced Row Echelon Form (RREF) if and only if it satisfies all four of the following canonical conditions:
- Leading 1s (Pivots): In every non-zero row, the leading (first non-zero) entry is strictly equal to $1$.
- Staircase Structure: Each leading $1$ appears in a column strictly to the right of the leading $1$s in the rows above it.
- Zeroed Pivot Columns: Every leading $1$ is the only non-zero entry in its entire column (entries both below and above the pivot are cleared to zero).
- Bottom Zero Rows: Any row consisting entirely of zeros is positioned at the very bottom of the matrix.
Gauss-Jordan Elimination Algorithm
Gauss-Jordan elimination systematically transforms any rectangular $m \times n$ matrix into RREF using three Elementary Row Operations (EROs):
- Row Swapping: $R_i \leftrightarrow R_j$ (exchanging row $i$ with row $j$ to bring non-zero pivots upward)
- Row Scaling: $R_i \leftarrow c R_i$ ($c \ne 0$, dividing a row by its pivot to create a leading $1$)
- Row Addition: $R_i \leftarrow R_i + c R_j$ (adding a scalar multiple of row $j$ to row $i$ to eliminate non-zero entries in the pivot column)
While classical Gaussian elimination terminates at Row Echelon Form (REF) with an upper triangular structure, Gauss-Jordan elimination continues with a backward elimination phase, sweeping upward from each pivot to eliminate all entries above it.
The Uniqueness Theorem
While a matrix can have infinitely many valid Row Echelon Forms (REF) depending on the choice of pivot scaling and row operations, every matrix possesses a strictly unique Reduced Row Echelon Form (RREF). Regardless of the sequence of elementary row operations used, the final RREF matrix is mathematically unique.
Core Mathematical Applications of RREF
- Solving Linear Systems: Transforming the augmented matrix $[\mathbf{A} \mid \mathbf{b}]$ directly isolates basic variable solutions without requiring back-substitution.
- Matrix Inversion: Reducing $[\mathbf{A} \mid \mathbf{I}_n] \xrightarrow{\text{RREF}} [\mathbf{I}_n \mid \mathbf{A}^{-1}]$ computes matrix inverses.
- Rank and Nullity Determination: The number of pivot columns in $\operatorname{RREF}(\mathbf{A})$ equals the rank of the matrix; the number of non-pivot (free variable) columns equals the nullity.
- Subspace Bases: The pivot columns of the original matrix form a basis for the column space $\operatorname{Col}(\mathbf{A})$; the non-zero rows of $\operatorname{RREF}(\mathbf{A})$ form a basis for the row space $\operatorname{Row}(\mathbf{A})$.
Worked Numerical Example
Reduce the $2 \times 3$ matrix $\mathbf{A} = \begin{bmatrix} 2 & 4 & -2 \\ 3 & 1 & 7 \end{bmatrix}$ to RREF:
- Normalize Row 1 (Scale $R_1 \leftarrow \frac{1}{2} R_1$):
- Eliminate Below Pivot 1 (Add $R_2 \leftarrow R_2 - 3 R_1$):
- Normalize Row 2 (Scale $R_2 \leftarrow -\frac{1}{5} R_2$):
- Eliminate Above Pivot 2 (Add $R_1 \leftarrow R_1 - 2 R_2$):
The matrix has $2$ pivots, rank $2$, and $1$ free variable (column 3).
1. What is the difference between REF and RREF?
In standard Row Echelon Form (REF), pivots need not be $1$ and entries above the pivots are not eliminated (leaving an upper-triangular structure). In Reduced Row Echelon Form (RREF), every pivot must be scaled to exactly $1$, and entries both above and below each pivot must be zeroed out. Additionally, REF is non-unique, whereas RREF is strictly unique.
2. Can RREF be applied to rectangular matrices?
Yes. Gauss-Jordan elimination applies to any rectangular $m \times n$ matrix. In systems of linear equations $\mathbf{A}\mathbf{x} = \mathbf{b}$, augmented matrices with $m$ rows and $n+1$ columns are standardly reduced to determine consistency and find parametric solution sets.
3. How do I identify free variables and basic variables from RREF?
Columns that contain a leading $1$ (pivot) correspond to basic variables. Columns that do not contain a leading $1$ correspond to free variables (parameters). The number of free variables equals the nullity ($n - \operatorname{rank}(\mathbf{A})$), indicating the dimension of the solution space to $\mathbf{A}\mathbf{x} = \mathbf{0}$.
1. Wilhelm Jordan and Geodesic Surveying
Although named after Carl Friedrich Gauss and Wilhelm Jordan, the algorithm was not invented as an abstract algebraic exercise. Wilhelm Jordan, a German geodesist, introduced the upward elimination phase in his 1888 surveying textbook Handbuch der Vermessungskunde to automate least-squares adjustments when mapping territorial topography without error-prone back-substitution.
2. The Rank-Nullity Theorem is Instantly Visible in RREF
Because RREF partitions the $n$ columns of a matrix into exactly two disjoint sets—pivot columns and non-pivot columns—it provides an immediate visual proof of the Rank-Nullity Theorem:
Every column either contains a leading $1$ (contributing to rank) or lacks one (contributing to nullity).