method focus
Gaussian Elimination Calculator
Solve linear systems with full row reduction step by step. See every row operation on the augmented matrix, from forward elimination with partial pivoting to back-substitution.
Click to show tips
Try an Example
Pick a scenario to see how the calculator works, then adjust the values
Simple 2x2 System
Solve 2x + 3y = 7 and x - y = 1 using Gaussian elimination
Key values: 2×2 system · Unique solution · x=2, y=1
3x3 Engineering System
Solve a 3-variable system commonly found in circuit analysis
Key values: 3×3 system · Cramer's Rule · 3 unknowns
Parallel Lines (No Solution)
Explore what happens when two equations have no intersection
Key values: 2×2 system · Inconsistent · No solution
The Gaussian Elimination Algorithm
Gaussian elimination transforms a system of equations into row echelon form through a sequence of elementary row operations, then solves by back substitution. It is the workhorse algorithm for linear systems in both hand computation and numerical software.
The three allowed row operations are:
- Swap two rows
- Multiply a row by a nonzero scalar
- Add a multiple of one row to another
These operations change the form of the system but not its solution set.
Row Echelon Form
The goal is to produce an upper triangular shape in the augmented matrix :
The boxed entries are pivots. Each pivot must be nonzero, and every entry below a pivot must be zero. Once in this form, the solution follows by back substitution starting from the last equation.
Worked Example
Solve using Gaussian elimination:
Step 1: Eliminate below pivot in column 1:
and :
Step 2: Eliminate below pivot in column 2:
:
Step 3: Back substitution:
From row 3: . Row 2: . Row 1: .
Solution:
Partial Pivoting
In practice, always use partial pivoting: before eliminating in a column, swap the current row with the row below it that has the largest absolute value in that column. This prevents division by small numbers, which amplifies rounding errors.
Why it matters: Without pivoting, dividing by a near-zero pivot can multiply rounding errors by factors of or more. Partial pivoting is standard in all professional implementations (MATLAB, NumPy, etc.).
Computational Complexity
Gaussian elimination on an system requires:
This complexity makes it practical for systems up to thousands of equations. For very large sparse systems (millions of equations), iterative methods like conjugate gradient are preferred.
Frequently Asked Questions
What is Gaussian elimination?
Gaussian elimination is an algorithm that transforms a system of linear equations into row echelon form (upper triangular) through elementary row operations, then solves by back substitution. It is the standard method for solving linear systems in both hand computation and numerical software.
What are the three elementary row operations?
The three allowed operations are: (1) swap two rows, (2) multiply a row by a nonzero scalar, and (3) add a multiple of one row to another. These change the form of the augmented matrix but preserve the solution set.
What is partial pivoting and why is it important?
Partial pivoting means swapping the current row with the row below it that has the largest absolute value in the current column before eliminating. Without pivoting, dividing by a near-zero pivot amplifies rounding errors enormously. All professional implementations use partial pivoting.
What is the computational complexity of Gaussian elimination?
Gaussian elimination on an system requires approximately floating-point operations, which is . This makes it practical for systems up to thousands of equations. For very large sparse systems, iterative methods are preferred.
What is the difference between row echelon form and reduced row echelon form?
Row echelon form has zeros below each pivot (upper triangular shape) and requires back substitution. Reduced row echelon form (Gauss-Jordan) additionally has zeros above each pivot and each pivot equals 1, so solutions can be read directly without back substitution.
Related method-focus Variants
Explore more method-focus options
More Math Calculators
Explore the category