What Is Gauss-Jordan Elimination?
Gauss-Jordan elimination is a systematic algorithm for solving linear systems, finding matrix inverses, and computing rank by transforming a matrix to its reduced row echelon form (RREF) using elementary row operations. It extends classical Gaussian elimination (which stops at row echelon form) by also eliminating entries above each pivot, not just below.
Named after Carl Friedrich Gauss and Wilhelm Jordan, the method applies three elementary row operations:
- Swap two rows: R_i ↔ R_j
- Scale a row by a non-zero constant: R_i → c·R_i
- Row replacement: add a multiple of one row to another: R_i → R_i + c·R_j
These operations preserve the solution set of the linear system (they produce row-equivalent matrices). The goal is a matrix in RREF, where every leading entry (pivot) is 1, all other entries in pivot columns are 0, and pivots step strictly right and down. The RREF calculator on this site uses this algorithm — enter any matrix to see every row operation applied in sequence.
Gauss-Jordan vs. Gaussian Elimination: The Difference
Gaussian elimination (forward elimination only) transforms the matrix to row echelon form (REF): an upper triangular matrix with leading entries ≥ 1. Solving the system then requires back substitution — working up from the last equation to find each variable.
Gauss-Jordan elimination continues with back substitution built into the forward pass. After a pivot is made equal to 1, it is used to zero out entries both below and above it. The result (RREF) allows reading off the solution directly, with no separate back-substitution step.
For hand calculations, Gaussian elimination + back substitution is often faster. For computer implementation and pedagogical clarity, Gauss-Jordan to RREF is more systematic. For finding matrix inverses, Gauss-Jordan on [A|I] is the standard approach. For a full side-by-side comparison of both methods, see our Gauss-Jordan vs Gaussian elimination guide.
The 5-Step Gauss-Jordan Algorithm
- Find the pivot column. Start at the leftmost column with a non-zero entry in the current row range.
- Pivot selection (row swap). If the top entry of the pivot column is zero, swap the current row with a row below that has a non-zero entry in that column.
- Scale to get a leading 1. Multiply the current row by 1/(pivot value) to make the pivot equal to 1.
- Eliminate the entire column. For every other row (above and below), subtract the appropriate multiple of the current row to produce zeros throughout the pivot column.
- Move to the next submatrix. Move one row down and one column right. Repeat from step 1 until all rows are processed.
After this process, the matrix is in RREF. The number of pivots equals the rank of the matrix. Columns without pivots correspond to free variables in the solution.
Worked Example: Solving a 3×3 System
Solve: 2x + y − z = 8, −3x − y + 2z = −11, −2x + y + 2z = −3.
Write as augmented matrix and apply Gauss-Jordan:
[ 2 1 −1 | 8 ]
[ −3 −1 2 | −11 ]
[ −2 1 2 | −3 ]
After Gauss-Jordan elimination (use the calculator above for full steps):
[ 1 0 0 | 2 ]
[ 0 1 0 | 3 ]
[ 0 0 1 | −1 ]
Solution: x = 2, y = 3, z = −1. The pivot in every column means a unique solution. For more worked examples with detailed row operation explanations, see the RREF step-by-step tutorial.
When Does Gauss-Jordan Reveal Special Structure?
Unique solution. Every variable column has a pivot. The RREF of [A|b] is [I|x]. One solution.
Infinitely many solutions. Some variable columns have no pivot (free variables). The solution is a parametric family — each free variable becomes a parameter. The null space (kernel) of A is non-trivial.
No solution (inconsistent). A row with all zeros in the coefficient part but a non-zero right-hand side: [0 0 0 | c] with c ≠ 0. This represents "0 = c", which is false for all x.
These three cases correspond exactly to rank(A) = n (unique), rank(A) < n with rank(A) = rank([A|b]) (infinite), and rank(A) < rank([A|b]) (inconsistent), per the Rouché–Capelli theorem.
Applications of Gauss-Jordan Elimination
Solving linear systems. The primary application — transform [A|b] to [RREF(A)|c] and read off solutions directly. See the solving linear systems guide for unique, infinite, and no-solution cases with worked examples.
Matrix inverse. Apply Gauss-Jordan to [A|I]. If A is invertible, [A|I] reduces to [I|A⁻¹]. Use the matrix inverse calculator to perform this process with full step-by-step display.
Finding rank and null space. The number of pivots in RREF(A) equals rank(A). The null space basis comes from the free variable columns.
Determining linear independence. Place vectors as rows (or columns) of A. RREF immediately reveals whether they are linearly independent (no zero rows = independent) or dependent (zero rows = dependent).
Balancing chemical equations. Stoichiometry problems reduce to linear systems solvable by Gauss-Jordan.
Frequently Asked Questions
Is Gauss-Jordan the same as RREF?
Gauss-Jordan is the algorithm; RREF is the result. Performing Gauss-Jordan elimination on a matrix produces its reduced row echelon form.
Is RREF unique?
Yes — every matrix has exactly one RREF, regardless of the row operations used to get there. This is the uniqueness theorem for RREF (proved by Theorem 1 in Gilbert Strang's "Introduction to Linear Algebra").
Does Gauss-Jordan work for non-square matrices?
Yes. Gauss-Jordan elimination works for any m×n matrix. The resulting RREF has at most min(m,n) pivots.
How does this differ from LU decomposition?
LU decomposition factors A = LU (lower × upper triangular). Gauss-Jordan elimination without storing multipliers is equivalent, but LU decomposition is more efficient for repeatedly solving Ax = b for different b vectors.
What are elementary row operations?
Three types: (1) swap two rows, (2) multiply a row by a non-zero constant, (3) add a multiple of one row to another. Each corresponds to left-multiplying by an elementary matrix.
Can I use this calculator for fractions in the input?
Yes. Enter fractions as "3/4" or "-2/5". The calculator parses these exactly and carries them through all operations without rounding.
How accurate is the computation?
Perfectly accurate for rational inputs. BigInt arithmetic means no rounding ever occurs — results are exact fractions.
Is this calculator free?
Yes, completely free with no account required.