PAGE 1

3.2 Matrices and Gaussian Elimination

matrix: array of numbers

\[ \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{matrix} \text{rows: 2} \\ \text{columns: 2} \\ \text{2 by 2 matrix} \end{matrix} \]
\[ \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \quad 2 \times 3 \text{ matrix} \]

From last time:

\[ \begin{aligned} x_1 + 3x_2 &= 9 \quad - \text{①} \\ 2x_1 + x_2 &= 8 \quad - \text{②} \end{aligned} \]

solve by elimination:

\[ \begin{aligned} -2\text{①} + \text{②} & \\ -5x_2 &= -10 \implies x_2 = 2 \\ \text{from ① } x_1 &= 9 - 3x_2 \\ &= 3 \end{aligned} \]

Represent the same system by this coefficient matrix

\[ \begin{matrix} x_1 & x_2 & \text{right side} \\ \begin{bmatrix} 1 & 3 \\ 2 & 1 \end{bmatrix} & \begin{matrix} 9 \\ 8 \end{matrix} & \begin{matrix} \text{eq. 1} \\ \text{eq. 2} \end{matrix} \end{matrix} \]
PAGE 2

Elimination in matrix representation is made up of elementary row operations

  • Swap any two rows
  • Multiply one row by a non-zero constant
  • Multiply one row by a non-zero constant and add to another row
\[ \begin{aligned} \text{① } x_1 + 3x_2 &= 9 \\ \text{② } 2x_1 + x_2 &= 8 \end{aligned} \]

multiply ① by -2

add to ②

\[ \to \begin{bmatrix} 1 & 3 & 9 \\ 2 & 1 & 8 \end{bmatrix} \]
\[ \xrightarrow{(-2)R_1 + R_2} \begin{bmatrix} 1 & 3 & 9 \\ 0 & -5 & -10 \end{bmatrix} \]
\[ \xrightarrow{(-\frac{1}{5})R_2} \begin{matrix} x_1 & x_2 & \text{right side} \\ \begin{bmatrix} 1 & 3 & 9 \\ 0 & 1 & 2 \end{bmatrix} \end{matrix} \]
PAGE 3

Solving Systems from Row Echelon Form

Solution: read bottom up

row 2: \( 0 \cdot x_1 + 1 \cdot x_2 = 2 \) so, \( x_2 = 2 \)

row 1: \( 1 \cdot x_1 + 3 \cdot x_2 = 9 \)

\( x_1 = 9 - 3x_2 = 9 - 3(2) = 3 \) \( x_1 = 3 \)

left most non-zero

\[ \begin{bmatrix} 1 & 3 & 9 \\ 0 & -5 & -10 \end{bmatrix} \]

back to this matrix is in row echelon form

"stairs"

the left most non-zero number (called "pivot") of a row is below and to the right of the pivot of the row above

PAGE 4

Examples of Row Echelon Form

pivot row 1

\[ \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \]

is NOT in row echelon form

pivot row 2 is NOT to the right and below the pivot of the row above it

\[ \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \end{bmatrix} \]

is in row echelon form

pivot of row 1

\[ \begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 5 \\ 0 & 0 & 0 \end{bmatrix} \]

pivot of row 2 it is below and to the right of pivot of row 1

row 3 does NOT have a pivot

so, this is in row echelon form

→ in row echelon form, a row of all zeros is at the bottom

also, notice all numbers below a pivot are zeros

PAGE 5

Solving a System

Solving a system → put coefficient matrix into row echelon form.

The process of making a matrix in row echelon form is called row reduction or Gaussian elimination.

Example

\[\begin{aligned} x_2 + 4x_3 &= -3 \\ x_1 + 3x_2 + 6x_3 &= 4 \\ 2x_1 + 5x_2 + 8x_3 &= 5 \end{aligned}\]
\[\begin{matrix} x_1 & x_2 & x_3 & \text{right} \\ \begin{bmatrix} 0 & 1 & 4 & -3 \\ 1 & 3 & 6 & 4 \\ 2 & 5 & 8 & 5 \end{bmatrix} \end{matrix}\]

Sometimes called the augmented matrix because right side numbers are included.

Put into Row Echelon Form

Swap rows 1 and 2 (or 1 and 3) so we have a pivot on the upper left.

PAGE 6
\[\xrightarrow{\text{swap}(R_1, R_2)}\]
\[\begin{bmatrix} \boxed{1} & 3 & 6 & 4 \\ 0 & 1 & 4 & -3 \\ 2 & 5 & 8 & 5 \end{bmatrix}\]

Every # below pivot should be zeros.

↑ pivot

↖ make it 0

\[\xrightarrow{(-2)R_1 + R_3}\]
\[\begin{bmatrix} \boxed{1} & 3 & 6 & 4 \\ 0 & \boxed{1} & 4 & -3 \\ 0 & -1 & -4 & -3 \end{bmatrix}\]

zeros

pivot ↓     ↓ pivot

↖ make 0

\[\xrightarrow{R_2 + R_3}\]
\[\begin{matrix} x_1 & x_2 & x_3 & \text{right} \\ \begin{bmatrix} \boxed{1} & 3 & 6 & 4 \\ 0 & \boxed{1} & 4 & -3 \\ 0 & 0 & 0 & \boxed{-6} \end{bmatrix} \end{matrix}\]
row echelon form
PAGE 7

Solving Systems of Linear Equations

Solve: row 3 \(\rightarrow 0 \cdot x_1 + 0 \cdot x_2 + 0 \cdot x_3 = -6\)

\(0 = -6\) false!

So, there is no solution

Example

\[\begin{aligned} x_1 - x_2 + x_3 &= 7 \\ 3x_1 + 2x_2 - 12x_3 &= 11 \\ 4x_1 + x_2 - 11x_3 &= 18 \end{aligned}\]

Representing the system as an augmented matrix:

\[\begin{bmatrix} 1 & -1 & 1 & 7 \\ 3 & 2 & -12 & 11 \\ 4 & 1 & -11 & 18 \end{bmatrix}\]

Applying row operations to reach row echelon form:

\((-3)R_1 + R_2 \rightarrow R_2\)
\((-4)R_1 + R_3 \rightarrow R_3\)
\[\begin{bmatrix} 1 & -1 & 1 & 7 \\ 0 & 5 & -15 & -10 \\ 0 & 5 & -15 & -10 \end{bmatrix}\]
Note: The second column's 5 in the third row needs to be made 0.
PAGE 8
\((-1)R_2 + R_3 \rightarrow R_3\)
\[\begin{matrix} x_1 & x_2 & x_3 & \\ \begin{bmatrix} 1 & -1 & 1 & 7 \\ 0 & 5 & -15 & -10 \\ 0 & 0 & 0 & 0 \end{bmatrix} & & & \end{matrix}\]
row echelon form

Analysis of the Result

Solve: row 3 \(\rightarrow 0 = 0 \rightarrow\) infinite solutions

One of the variables is arbitrary (free variable).

The variable without a pivot in its column is chosen to be free.

Here, \(x_3\) is free.

Back Substitution

Let \(x_3 = t\)

row 2 \(\rightarrow 5x_2 - 15x_3 = -10\)

\(x_2 = 3x_3 - 2 = 3t - 2\)

row 1 \(\rightarrow \dots \rightarrow x_1 = 5 + 2t\)