Gaussian Elimination Formula and Method
Augmented matrix
Ax = b → [A | b]Place each equation’s coefficients in a row and its constant in the final column.
Forward elimination
Rᵢ ← Rᵢ − (aᵢₖ/aₖₖ)RₖClear entries below each pivot to produce row echelon form.
Back-substitution
xₖ = (bₖ − Σ aₖⱼxⱼ) / aₖₖStart at the last pivot equation and work upward to recover the variables.
10⁻⁴⁰ through 10⁴⁰ in magnitude. The selected relative tolerance controls numerical rank decisions; use exact rational or arbitrary-precision software when exact symbolic results are required.How to Solve a Linear System
- Choose the equation and variable counts. They do not need to match.
- Enter the coefficient of each variable and the right-hand-side constant, or paste the complete augmented matrix.
- Select Solve system. The solver chooses scaled partial pivots and eliminates coefficients below them.
- Read the unique values, parameterized family, or contradiction; then expand the row-operation stages to inspect the work.
Worked 3-Equation Example
System
x + 2y − z = −4
2x + 3y − z = −11
−2x − 3z = 22Solution
x = −8, y = 1, z = −2All three variable columns contain pivots, so the solution is unique.
Unique, Infinite, and Inconsistent Systems
A consistent system has a unique solution when every variable column contains a pivot. When one or more variable columns are free, the solver writes the infinitely many solutions using parameters such as t₁ and t₂.
A row [0 0 … 0 | c] with nonzero c is a contradiction, so no solution exists. Equivalently, the system is consistent exactly when rank(A) = rank([A | b]).
Linear Equations Solver FAQs
What is Gaussian elimination?
It applies reversible row swaps and row replacements to turn an augmented matrix into row echelon form. A triangular system can then be solved from the bottom upward.
Why does the solver swap equations?
Scaled partial pivoting selects a strong available coefficient and moves its row into the pivot position. This avoids zero pivots and usually improves numerical stability.
Can there be more equations than variables?
Yes. An overdetermined system may still be consistent and have one solution, or it may contain a contradiction. Redundant equations do not change the solution set.
What causes infinitely many solutions?
A consistent system has infinitely many solutions when its coefficient rank is smaller than its number of variables. Each non-pivot variable becomes a free parameter.
How is no solution detected?
Elimination exposes a contradictory row whose coefficients are all zero but whose constant is nonzero. This makes the coefficient rank smaller than the augmented-matrix rank.
Why can decimal results show small errors?
Most decimal fractions cannot be represented exactly in binary floating point. Poor scaling or nearly dependent equations can amplify that rounding, so interpret sensitive systems with care.
Are my coefficients private?
Yes. The page parses and solves the system locally, and creates copied text and downloads in your browser. The solver code does not transmit or save entered coefficients.
Calculation Notes
Last reviewed: August 5, 2026 by the Starlight Tools editorial team.
Scaled partial pivoting compares each candidate coefficient with the largest coefficient in its row. The reported residual for a unique solution is max |Ax − b| using the original inputs. Near-singular systems may change classification when the pivot tolerance changes.
