Gaussian Elimination

Order: 13
Subtopic: Systems
Topic: Linear Algebra

Gaussian elimination systematically transforms a linear system into triangular form, making solutions easy to find through back-substitution. It's the fundamental algorithm for solving linear systems, finding inverses, and computing rank—the computational backbone of linear algebra.

Introduction

Solving a system of linear equations by hand means eliminating variables one at a time until the answer becomes obvious. Gaussian elimination is the systematic version: use row operations to create zeros below each pivot, resulting in an upper triangular system.

Once triangular, solve from the bottom up—each equation has only one unknown.

Row Operations

Three operations that don't change the solution set:

  1. Swap two rows: Ri↔Rj R sub i left right arrow R sub j

  2. Multiply a row by a nonzero constant: Ri→c⁢Ri R sub i right arrow c R sub i

  3. Add a multiple of one row to another: Ri→Ri+c⁢Rj R sub i right arrow R sub i plus c R sub j

These are the tools for elimination. Operation 3 3 creates zeros.

The Algorithm

Given augmented matrix [Ab] the 1 by 2 row matrix A b:

  1. Find the leftmost column with a nonzero entry (pivot column)

  2. If needed, swap rows to get nonzero pivot at top of this column

  3. Use row operations to create zeros below the pivot

  4. Move to the next row and repeat for remaining columns

  5. Result: row echelon form (REF)

For reduced row echelon form (RREF): also create zeros above pivots and scale pivots to 1 1.

Worked Example

Solve the system:

{x+2⁢y+z=92⁢x−y+3⁢z=83⁢x+y−z=3 3 cases Case 1: x plus 2 y plus z equals 9 Case 2: 2 x minus y plus 3 z equals 8 Case 3: 3 x plus y minus z equals 3

Form augmented matrix:

[12192−13831−13] the 3 by 4 matrix Row 1: Column 1, 1 Column 2, 2 Column 3, 1 Column 4, 9 Row 2: Column 1, 2 Column 2, negative 1 Column 3, 3 Column 4, 8 Row 3: Column 1, 3 Column 2, 1 Column 3, negative 1 Column 4, 3

R2→R2−2⁢R1 R sub 2 right arrow R sub 2 minus 2 R sub 1, R3→R3−3⁢R1 R sub 3 right arrow R sub 3 minus 3 R sub 1:

[12190−51−100−5−4−24] the 3 by 4 matrix Row 1: Column 1, 1 Column 2, 2 Column 3, 1 Column 4, 9 Row 2: Column 1, 0 Column 2, negative 5 Column 3, 1 Column 4, negative 10 Row 3: Column 1, 0 Column 2, negative 5 Column 3, negative 4 Column 4, negative 24

R3→R3-R2 R sub 3 right arrow R sub 3 minus R sub 2:

[12190−51−1000−5−14] the 3 by 4 matrix Row 1: Column 1, 1 Column 2, 2 Column 3, 1 Column 4, 9 Row 2: Column 1, 0 Column 2, negative 5 Column 3, 1 Column 4, negative 10 Row 3: Column 1, 0 Column 2, 0 Column 3, negative 5 Column 4, negative 14

Back-Substitution

From row 3 3: −5⁢z=−14 negative 5 z equals negative 14, so z=145 z equals fourteen fifths.

From row 2 2: −5⁢y+z=−10 negative 5 y plus z equals negative 10, so y=10+1455=6425 y equals the fraction with numerator 10 plus fourteen fifths and denominator 5 equals 64 over 25.

From row 1 1: x+2⁢y+z=9 x plus 2 y plus z equals 9, so x=9−2⁢(6425)−145=3125 x equals 9 minus 2 times open paren 64 over 25 close paren minus fourteen fifths equals 31 over 25.

Solution: x=3125,y=6425,z=145 x equals 31 over 25 comma y equals 64 over 25 comma z equals fourteen fifths.

Row Echelon Form (REF)

A matrix is in REF if:

• All zero rows are at the bottom

• Each leading entry (pivot) is to the right of the pivot above it

• All entries below a pivot are zero

Reduced Row Echelon Form (RREF)

RREF adds:

• Each pivot is 1 1

• Each pivot is the only nonzero entry in its column

RREF is unique for any matrix—it's the canonical form.

Pivots and Rank

The number of pivots equals the rank of the matrix.

Columns without pivots correspond to free variables (infinitely many solutions).

If a pivot appears in the augmented column, the system is inconsistent (no solution).

Computational Cost

For an n×n n times n system: O⁡(n3) O of open paren n cubed close paren operations.

This is efficient — doubling the size increases the work by 8× 8 times, not exponentially.

Pivoting Strategies

Partial pivoting: Before eliminating, swap to put the largest magnitude entry in the pivot position. This improves numerical stability.

Without pivoting, small pivots can amplify rounding errors catastrophically.

Applications

Beyond solving systems: computing matrix inverse, finding rank, determining linear independence, and computing determinants (product of pivots, adjusted for swaps).

Summary

Gaussian elimination uses row operations to transform a system into triangular form. Solve by back-substitution. REF has zeros below pivots; RREF also has zeros above and pivots equal to 1 1. The number of pivots is the rank. Pivoting improves numerical stability. The computational cost is O⁡(n3) O of open paren n cubed close paren.