Gaussian Elimination

Systematic row reduction to solve linear systems, compute rank, and find inverses — the foundational algorithm of linear algebra.

Gaussian elimination — 2x+y-z=8, -3x-y+2z=-11, -2x+y+2z=-3
pivot row target row
21-18-3-12-11-212-3
Initial augmented matrix [A|b]
Step 0 of 4
Definition

Gaussian elimination is the standard algorithm for solving systems of linear equations Ax=bA\mathbf{x} = \mathbf{b}.

It transforms the augmented matrix [AâˆĢb][A|\mathbf{b}] into row echelon form using three elementary row operations:

  1. Swap two rows
  2. Multiply a row by a nonzero scalar
  3. Add a multiple of one row to another

Then back substitution solves the triangular system from bottom to top.

Key properties
  • Each elementary row operation preserves the solution set of the system
  • Row echelon form has all leading entries (pivots) strictly to the right as you move down rows
  • The number of pivots equals the rank of the matrix
  • A row of all zeros equal to a nonzero constant signals an inconsistent (unsolvable) system
Common mistakes
  • Forgetting to apply a row operation to the entire row (including the augmented column b\mathbf{b}) — a common source of silent arithmetic errors
  • Dividing by a zero or near-zero pivot: this either breaks the algorithm outright or (if the pivot is merely tiny) introduces large numerical error — partial pivoting exists specifically to avoid this
Solving a 3×3 system

(21−1−3−12−212)(xyz)=(8−11−3)\begin{pmatrix}2&1&-1\\-3&-1&2\\-2&1&2\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}8\\-11\\-3\end{pmatrix}

After elimination: upper triangular system → z=1,y=−2,x=2z=1, y=-2, x=2.

Try it

Solve the system: x+2y=5x + 2y = 5, 3x+4y=113x + 4y = 11 using Gaussian elimination.

Solution

Augmented matrix: (1253411)\begin{pmatrix}1&2&5\\3&4&11\end{pmatrix}

R2←R2−3R1R_2 \leftarrow R_2 - 3R_1: (1250−2−4)\begin{pmatrix}1&2&5\\0&-2&-4\end{pmatrix}

Back substitute: −2y=−4⇒y=2-2y = -4 \Rightarrow y=2. Then x+4=5⇒x=1x + 4 = 5 \Rightarrow x=1.

Related concepts