Systems of EquationsTopic #14 of 30

Gaussian Elimination

Elementary row operations, forward elimination, and back substitution.

Overview

Gaussian elimination is a systematic method for solving systems of linear equations by reducing the augmented matrix to row echelon form through elementary row operations.

Elementary Row Operations

OperationNotationDescription
SwapRiRjR_i \leftrightarrow R_jInterchange rows ii and jj
ScalecRiRicR_i \to R_iMultiply row ii by non-zero scalar cc
ReplaceRi+cRjRiR_i + cR_j \to R_iAdd cc times row jj to row ii

Algorithm

Forward Elimination

  1. Find the leftmost non-zero column (pivot column)
  2. If necessary, swap rows to get a non-zero entry at the top
  3. Use row replacement to create zeros below the pivot
  4. Repeat for the remaining submatrix

Back Substitution

After reaching echelon form:

  1. Solve for the last variable
  2. Substitute back to find remaining variables

Example

Solve:

x+2y+3z=6x + 2y + 3z = 6 2x+5y+3z=82x + 5y + 3z = 8 x+8z=9x + 8z = 9

Step 1: Augmented Matrix

[123625381089]\left[\begin{array}{ccc|c} 1 & 2 & 3 & 6 \\ 2 & 5 & 3 & 8 \\ 1 & 0 & 8 & 9 \end{array}\right]

Step 2: Eliminate Below First Pivot

R22R1R2R_2 - 2R_1 \to R_2:

[123601341089]\left[\begin{array}{ccc|c} 1 & 2 & 3 & 6 \\ 0 & 1 & -3 & -4 \\ 1 & 0 & 8 & 9 \end{array}\right]

R3R1R3R_3 - R_1 \to R_3:

[123601340253]\left[\begin{array}{ccc|c} 1 & 2 & 3 & 6 \\ 0 & 1 & -3 & -4 \\ 0 & -2 & 5 & 3 \end{array}\right]

Step 3: Eliminate Below Second Pivot

R3+2R2R3R_3 + 2R_2 \to R_3:

[123601340015]\left[\begin{array}{ccc|c} 1 & 2 & 3 & 6 \\ 0 & 1 & -3 & -4 \\ 0 & 0 & -1 & -5 \end{array}\right]

Step 4: Back Substitution

From row 3: z=5z=5-z = -5 \Rightarrow z = 5

From row 2: y3(5)=4y=11y - 3(5) = -4 \Rightarrow y = 11

From row 1: x+2(11)+3(5)=6x=31x + 2(11) + 3(5) = 6 \Rightarrow x = -31

Solution: x=31x = -31, y=11y = 11, z=5z = 5

Pivot Positions

A pivot is the leading non-zero entry in a row of echelon form.

Pivot Column

Column containing a pivot.

Pivot Strategy

For numerical stability, choose the largest absolute value in the column as pivot (partial pivoting).

Detecting Solution Types

After forward elimination:

Row PatternMeaning
[0  0    0b][0 \; 0 \; \cdots \; 0 \mid b] with b0b \neq 0No solution
More variables than pivotsInfinitely many solutions
# pivots = # variablesUnique solution

Gaussian Elimination vs Gauss-Jordan

MethodTarget FormWhen to Stop
GaussianRow echelon formForward elimination only
Gauss-JordanReduced row echelon formContinue to get leading 1s and zeros above pivots

Computational Considerations

Operation Count

For an n×nn \times n system, Gaussian elimination requires:

  • Approximately n3/3n^3/3 multiplications
  • Approximately n3/3n^3/3 additions

Numerical Stability

  • Use partial pivoting to avoid small pivots
  • Scaled partial pivoting for better accuracy
  • Full pivoting for maximum stability (rarely needed)

Special Cases

No Solution

[123248][123002]\left[\begin{array}{cc|c} 1 & 2 & 3 \\ 2 & 4 & 8 \end{array}\right] \to \left[\begin{array}{cc|c} 1 & 2 & 3 \\ 0 & 0 & 2 \end{array}\right]

0=20 = 2 is a contradiction → no solution

Infinitely Many Solutions

[123246][123000]\left[\begin{array}{cc|c} 1 & 2 & 3 \\ 2 & 4 & 6 \end{array}\right] \to \left[\begin{array}{cc|c} 1 & 2 & 3 \\ 0 & 0 & 0 \end{array}\right]

x=32tx = 3 - 2t, y=ty = t (free variable)