Canadian flagMath101 · Independent Ontario learning libraryCreated and edited by Kamran
Linear AlgebraUniversity3 min read

Gaussian Elimination

A rigorous elimination algorithm for solving linear systems, detecting consistency, and controlling pivots.

Cheat sheet

Precise definition

Gaussian elimination applies elementary row operations to an augmented matrix until it reaches row echelon form, then uses back substitution. Row replacement, row swap, and multiplication of a row by a nonzero scalar preserve the represented solution set.

Notation and mathematical language

A pivot is the leading nonzero entry used to eliminate entries below it. A row $[0\ \cdots\ 0\mid c]$ with $c\ne0$ signals inconsistency. Free variables occur in nonpivot columns and parameterize infinitely many solutions when the system is consistent.

Conceptual picture

Elimination combines equations to remove variables while retaining equivalence. In exact arithmetic, different legal pivot choices lead to the same solution classification. In floating-point arithmetic, partial pivoting reduces error by avoiding division by very small pivots.

Conditions and key results

Never scale by zero. A square system can be singular yet consistent with infinitely many solutions; elimination, unlike a determinant ratio, shows which. Rounding intermediate values may create false zeros, so retain exact fractions when feasible.

A reliable strategy

  1. Write the augmented matrix with variables in a fixed column order.
  2. Choose a nonzero pivot, swap if needed, and eliminate all entries below it.
  3. Continue to echelon form, classify contradictory and free-variable rows, then back-substitute.
  4. Express the complete solution set and substitute it into the original equations.

Fully worked example

Interpretation and application

Elimination underlies matrix factorization and scientific solvers. For numerical data, a small residual $A\hat x-b$ checks equation fit but does not alone guarantee a small solution error when $A$ is ill-conditioned.

Common mistakes

Verification and reasonableness

  • Substitute the parametric solution for an arbitrary parameter.
  • Count pivots and compare ranks of coefficient and augmented matrices.
  • Re-run with a different pivot order or RREF for an independent exact check.

Practice

  1. What row signals no solution?
  2. What creates a free variable?
  3. Why swap rows numerically?
Answers and brief solutions
  1. $[0\ \cdots\ 0\mid c]$ with $c\ne0$.
  2. A variable column without a pivot.
  3. To avoid zero or very small pivots and reduce error growth.

Further deduction

Elimination can be organized as $PA=LU$, where $P$ records row swaps, $L$ the elimination multipliers, and $U$ an upper-triangular matrix. Once factored, many systems with the same $A$ and different right-hand sides can be solved efficiently by forward and back substitution. This is computationally preferable to recomputing an inverse.

Operation count matters: dense elimination for an $n\times n$ system uses on the order of $n^3$ arithmetic operations, while each triangular solve after an $LU$ factorization costs order $n^2$. This distinction explains why reusing a factorization for many right-hand sides is much cheaper than starting over or forming an inverse.

Check your understanding

Try it yourself

Hints are part of learning. Open one whenever it makes the next step feel possible.

1 practice question
Question 1Read a free variable · Standard

A system has 4 variables and 3 pivots and is consistent. How many free variables?

End of lesson

Nice work making it this far.

Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.

Lesson complete

That one is yours now.

Gaussian Elimination is saved to My Learning. Take the win—you earned it.

1Your Math101 collectionlesson completed
Search 464 published lessons, 123 answer guides, courses, and learning tools.
Your experience

Settings

Ontario math tutoringWork with KamranBook ↗