Gauss Jordan Elimination Calculator
Our free linear algebra calculator solves gauss jordan elimination problems. Get worked examples, visual aids, and downloadable results.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Gauss Jordan Elimination Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: [A | b] -> RREF via elementary row operations
Worked example โ x = 2, y = 3, z = -1 (unique solution, rank = 3)
Formula
[A | b] -> RREF via elementary row operations
Transform the augmented matrix [A | b] into reduced row echelon form by applying elementary row operations: row swaps, row scaling, and row addition. The RREF reveals the solution directly: unique (rank = n), infinite (rank < n, consistent), or none (inconsistent).
Worked Examples
Example 1: Solving a 3x3 System Step by Step
Problem:Solve: 2x + y - z = 8, -3x - y + 2z = -11, -2x + y + 2z = -3
Solution:Augmented: [[2, 1, -1, 8], [-3, -1, 2, -11], [-2, 1, 2, -3]] R1 = R1/2: [[1, 0.5, -0.5, 4], [-3, -1, 2, -11], [-2, 1, 2, -3]] R2 = R2 + 3R1: [[1, 0.5, -0.5, 4], [0, 0.5, 0.5, 1], [-2, 1, 2, -3]] R3 = R3 + 2R1: [[1, 0.5, -0.5, 4], [0, 0.5, 0.5, 1], [0, 2, 1, 5]] R2 = R2/0.5: [[1, 0.5, -0.5, 4], [0, 1, 1, 2], [0, 2, 1, 5]] R3 = R3 - 2R2: [[1, 0.5, -0.5, 4], [0, 1, 1, 2], [0, 0, -1, 1]] R3 = R3/(-1): [[1, 0.5, -0.5, 4], [0, 1, 1, 2], [0, 0, 1, -1]] Back-eliminate to get RREF: x = 2, y = 3, z = -1
Result:x = 2, y = 3, z = -1 (unique solution, rank = 3)
Example 2: Inconsistent System Detection
Problem:Solve: x + y + z = 1, x + y + z = 2, x + 2y + 3z = 3
Solution:Augmented: [[1, 1, 1, 1], [1, 1, 1, 2], [1, 2, 3, 3]] R2 = R2 - R1: [[1, 1, 1, 1], [0, 0, 0, 1], [1, 2, 3, 3]] R3 = R3 - R1: [[1, 1, 1, 1], [0, 0, 0, 1], [0, 1, 2, 2]] Row 2 gives 0 = 1, which is impossible. The system is inconsistent.
Result:No solution (inconsistent system)
Frequently Asked Questions
What is Gauss-Jordan elimination?
Gauss-Jordan elimination is an algorithm for solving systems of linear equations by transforming the augmented matrix into reduced row echelon form (RREF). It extends Gaussian elimination by also eliminating entries above each pivot, not just below. The result is a matrix where each pivot is 1 and is the only nonzero entry in its column. From the RREF, you can directly read off the solution without back-substitution. The algorithm systematically applies three elementary row operations: swapping rows, multiplying a row by a nonzero scalar, and adding a multiple of one row to another. It was named after Carl Friedrich Gauss and Wilhelm Jordan.
What is the difference between Gaussian elimination and Gauss-Jordan elimination?
Gaussian elimination transforms a matrix into row echelon form (REF), where entries below each pivot are zero, but entries above pivots may be nonzero. Finding the solution then requires back-substitution. Gauss-Jordan elimination goes further, transforming to reduced row echelon form (RREF), where entries both above and below each pivot are zero, and each pivot equals 1. RREF allows you to read solutions directly without back-substitution. Gaussian elimination requires about n^3/3 operations for an n x n system, while Gauss-Jordan needs about n^3/2. Despite being more expensive, Gauss-Jordan is conceptually simpler and is often preferred for matrix inversion.
What are the three elementary row operations?
The three elementary row operations are the fundamental tools used in Gauss-Jordan elimination. First, row swapping: exchanging two rows (R_i swapped with R_j). Second, row scaling: multiplying all entries of a row by a nonzero constant (R_i = c * R_i). Third, row addition: adding a scalar multiple of one row to another (R_i = R_i + c * R_j). These operations do not change the solution set of the system. Any sequence of elementary row operations can be undone by inverse operations, making the process reversible. The key insight is that these simple operations, applied systematically, can solve any linear system.
What is reduced row echelon form (RREF)?
A matrix is in reduced row echelon form when it satisfies four conditions. First, all zero rows are at the bottom. Second, the first nonzero entry in each nonzero row (the pivot) is 1. Third, each pivot is to the right of the pivot in the row above it. Fourth, each pivot is the only nonzero entry in its column. The RREF of a matrix is unique, regardless of the sequence of row operations used to obtain it. This uniqueness means that the RREF is an invariant of the row space of the matrix. The pivots indicate the rank, and the non-pivot columns correspond to free variables.
How does Gauss-Jordan elimination handle systems with no solution?
When Gauss-Jordan elimination encounters an inconsistent system, it produces a row of the form [0, 0, ..., 0 | c] where c is nonzero in the augmented matrix. This represents the equation 0 = c, which is impossible. The system has no solution when the rank of the coefficient matrix is less than the rank of the augmented matrix. Geometrically, this means the constraint planes do not all intersect at a common point (or line or plane). For example, two parallel planes in 3D have no common point. The calculator detects this condition and reports the system as inconsistent.
How does Gauss-Jordan elimination handle systems with infinitely many solutions?
Systems with infinitely many solutions have more unknowns than pivot positions (the rank is less than the number of variables, and the system is consistent). In the RREF, columns without pivots correspond to free variables that can take any value. The solution is expressed parametrically in terms of these free variables. For a 3x3 system of rank 2, one variable is free, and the solution is a line in 3D. For rank 1, two variables are free, and the solution is a plane. The RREF directly shows the relationship between pivot variables and free variables, making it easy to write the general solution.
Why is partial pivoting important in Gauss-Jordan elimination?
Partial pivoting (selecting the row with the largest absolute value in the pivot column) is crucial for numerical stability. Without pivoting, dividing by a very small pivot amplifies rounding errors dramatically. For example, if the pivot is 0.0001, dividing by it multiplies any rounding error by 10000. Partial pivoting ensures the pivot is as large as possible, minimizing error amplification. Complete pivoting (also considering column swaps) provides even better stability but is rarely needed in practice. In exact arithmetic, pivoting is unnecessary, but in floating-point computation, it can mean the difference between an accurate solution and numerical garbage.
Can Gauss-Jordan elimination be used to find the inverse of a matrix?
Yes, Gauss-Jordan elimination is the standard method for computing matrix inverses. Augment the matrix A with the identity matrix to form [A | I]. Apply Gauss-Jordan elimination to transform the left side into the identity matrix. If successful, the right side becomes the inverse A^(-1), giving [I | A^(-1)]. If the left side cannot be reduced to the identity (because the matrix is singular), the inverse does not exist. This method works for any size matrix and is equivalent to solving n separate systems of equations simultaneously. It requires approximately 2n^3/3 operations, the same order as LU decomposition-based inversion.
What is the computational complexity of Gauss-Jordan elimination?
For an n x n system, Gauss-Jordan elimination requires approximately n^3/2 multiplications and additions, compared to n^3/3 for Gaussian elimination with back-substitution. Both methods have O(n^3) complexity. For the augmented matrix of size n x (n+1), the total number of operations is about n^3. For large systems (n > 1000), the cubic scaling becomes significant, and iterative methods like conjugate gradient or GMRES may be faster, especially for sparse matrices. For dense systems, modern implementations use block algorithms and BLAS (Basic Linear Algebra Subprograms) to exploit CPU cache hierarchies and achieve near-peak performance.
How do you verify the solution from Gauss-Jordan elimination?
To verify the solution, substitute the computed values back into each original equation and check that the left side equals the right side within acceptable tolerance. For the system Ax = b, compute the residual r = b - Ax. If the residual is small (each component near zero), the solution is correct. The relative residual ||r|| / ||b|| gives a scale-independent measure of accuracy. For ill-conditioned systems, a small residual does not necessarily mean high accuracy in x, so also check the condition number. Another verification method is to solve using a different algorithm (like Cramers Rule or LU decomposition) and compare results.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎElimination Method Calculator
Calculate elimination method with inputs, formulas, and instant results.
๐งฎJordan Normal Form Calculator
Calculate jordan normal form with inputs, formulas, and instant results.
๐งฎGaussian Elimination Calculator
gaussian elimination calculator. Get instant, accurate results.
๐งฎSimultaneous Equations Solver
Solve systems of 2 or 3 simultaneous equations using elimination and substitution.
๐งฎAnnulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
๐งฎArea Calculator
Calculate area with inputs, formulas, and instant results.
๐งฎArea of a Rectangle Calculator
Calculate the area, perimeter, and diagonal of a rectangle. Find missing sides from known area. Convert between metric and imperial area units.
๐งฎArea of Crescent Calculator
Calculate area of crescent with inputs, formulas, and instant results.