Precalculus by Richard Wright

Previous Lesson Table of Contents Next Lesson

Are you not my student and
has this helped you?

This book is available
to download as an epub.


God is our refuge and strength, an ever-present help in trouble. Therefore we will not fear, though the earth give way and the mountains fall into the heart of the sea. Psalms 46:1-2 NIV

9-01 Matrices and Systems of Equations

Mr. Wright teaches the lesson.

Summary: In this section, you will:

SDA NAD Content Standards (2018): PC.6.4

Isaac Newton
Isaac Newton by Kneller. (Wikipedia)

The method of solving systems of linear equations using the method in this lesson was first documented in China at about 150 BC. In Europe, Isaac Newton, who probably had not read the Chinese book, wrote up the method about 1670 and was then published by Cambridge University in 1707. The method quickly became a standard in European math books. Then in 1810, Carl Friedrich Gauss designed a notation for the method. In the 1950's math books started calling this method Gaussian Elimination due to a misunderstanding of the origins of the method.

Matrices

Before getting into Gaussian Elimination, the matrix needs to be defined. A matrix is a rectangular array of numbers such as below. Rows are horizontal (red in the example below). Columns are vertical (blue). An element is an individual entry in the matrix. The subscripts represent the row, m, and column, n of the element.

$$ \left[\begin{matrix} a_{11} & \color{blue}{a_{12}} & a_{13} & \cdots & a_{1n} \\ \color{red}{a_{21}} & \color{purple}{a_{22}} & \color{red}{a_{23}} & \color{red}{\cdots} & \color{red}{a_{2n}} \\ \vdots & \color{blue}{\vdots} & \vdots & \ddots & \vdots \\ a_{m1} & \color{blue}{a_{m2}} & a_{m3} & \cdots & a_{mn} \end{matrix}\right] $$

The order, or dimension, of a matrix is the number of rows by the number of columns.

Order of a Matrix

What is the order of this matrix?

$$ \left[\begin{matrix} 1 & 2 & 3 \\ 8 & -3 & -8 \end{matrix}\right] $$

Solution

This matrix has 2 horizontal rows and 3 vertical columns. The order of the matrix is 2 × 3.

What is the order of the matrix?

$$ \left[\begin{matrix} 2 \\ 4 \\ -1 \end{matrix}\right] $$

Answer

3 × 1

To solve a system of linear equations, create an augmented matrix. An augmented matrix is two matrices combined by placing them side-by-side to create 1 new matrix. For the system of equations, one matrix will be the coefficients of the equations and the other is the constants of the equations.

Write an Augmented Matrix

Write an augmented matrix for the system of equations.

$$ \left\{\begin{align} 2x + 3y &= 1 \\ x - 2y &= -4 \end{align}\right. $$

Solution

First, make sure the equations are arranged in standard form with the constants on the right side of the equals signs. Then make a matrix out of the coefficients and one out of the constants.

$$ \left[\begin{matrix} 2 & 3 \\ 1 & -2 \end{matrix}\right] \qquad \left[\begin{matrix} 1 \\ -4 \end{matrix}\right] $$

Now, combine the two matrices. Put colons (:) between the two matrices.

$$ \left[\begin{matrix} 2 & 3 & : & 1 \\ 1 & -2 & : & -4 \end{matrix}\right] $$

Write the system of equations as an augmented matrix.

$$ \left\{\begin{align} 2x + y - z &= 4 \\ y - 2z &= -3 \end{align}\right. $$

Answer

\(\left[\begin{matrix} 2 & 1 & -1 & : & 4 \\ 0 & 1 & -2 & : & -3 \end{matrix}\right]\)

After the augmented matrix is created, manipulate the matrix into row-echelon form.

Row-echelon form

A matrix is in row-echelon form when

The following matrices are in row-echelon form.

$$ \left[\begin{matrix} 1 & 0 & 2 \\ 0 & 1 & 3 \\ 0 & 0 & 0 \end{matrix}\right] \qquad \left[\begin{matrix} 1 & 2 & 3 & 4 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 1 \end{matrix}\right] $$

To put a matrix into row-echelon form, use the elementary row operations.

Elementary Row Operations

These are not steps. These are choices of what can be used.

Perform an Elementary Row Operation

Add −4 times the 1st row to the 2nd row.

$$ \left[\begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{matrix}\right] $$

Solution

Multiply and add the rows in one step. Replace the 2nd row. Do not change the 1st row.

$$ \begin{matrix} ×-4 \\ +\hookrightarrow \end{matrix} \left[\begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{matrix}\right] $$

$$ \left[\begin{matrix} 1 & 2 & 3 \\ \color{blue}{0} & \color{blue}{-3} & \color{blue}{-6} \end{matrix}\right] $$

Notice this process produced a 0 at the beginning of the 2nd row.

Multiply the second row by \(-\frac{1}{3}\).

$$ \left[\begin{matrix} 1 & 2 & 3 \\ 0 & -3 & -6 \end{matrix}\right] $$

Answer

\( \left[\begin{matrix} 1 & 2 & 3 \\ 0 & 1 & 2 \end{matrix}\right]\). Notice this makes the leading nonzero entry in the 2nd row a 1.

Gaussian Elimination

Gaussian elimination uses elementary row operations to put a matrix into row-echelon form. A typical process is to first move any rows that start with zeros to the bottom of the matrix. Then, add multiples of the 1st row to the other rows to make leading zeros in all but the 1st row. Next, add multiples of the 2nd row to produce zeros in the second column of all rows below the 2nd row. Repeat for the rest of the rows until you reach the bottom row. Finally, multiply each row by constants to make the leading nonzero entry 1.

Gaussian Elimination

A typical process for Gaussian Elimination is

  1. Rearrange the rows so that any rows with leading zeros are at the bottom.
  2. If a row has a leading coefficient of 1, then switch it with the 1st row to make the first row have a leading 1.
  3. Add multiples of the 1st row to the other rows to make leading zeros in all but the 1st row.
    1. Add a multiple of the 1st row to the 2nd row to produce a leading 0 in the 2nd row.
    2. Add a multiple of the 1st row to the 3rd row to produce a leading 0 in the 3rd row.
    3. Repeat for the rest of the rows. Skip any row that already has a leading 0.
  4. Add multiples of the 2nd row to the rows below it to make zeros in the 2nd column.
    1. Add a multiple of the 2nd row to the 3rd row to produce a 0 in the 2nd column of the 3rd row.
    2. Add a multiple of the 2nd row to the 4th row to produce a 0 in the 2nd column of the 4th row.
    3. Repeat for the rest of the rows below the 2nd row. Skip any row that already has a 0 in the 2nd column.
  5. Repeat for the rest of the rows to produce the row-echelon form.
    1. Add multiples of the 3rd row to the rows below to get zeros in the 3rd column.
    2. Add multiples of the 4th row to the rows below to get zeros in the 4th column.
    3. Continue until you reach the bottom row.
  6. Multiply each row by a constant to make the leading nonzero entry a 1.
Solve a System with Gaussian Elimination

To solve a system on linear equations

  1. Write the system of equations as an augmented matrix.
  2. Use Gaussian Elimination to put the matrix in row-echelon form.
  3. Each row of the matrix represents an equation. The last row gives the value of the last variable.
  4. Write the next to last row as an equation and back substitute the value from the last row to solve for the other variable.
  5. Continue using back substitution to solve for the rest of the variables.

Solve a System with Gaussian Elimination

Solve using Gaussian Elimination.

$$ \left\{\begin{align} x + 2y - z &= -19 \\ 2x + y + z &= 13 \\ -3x - 3y + 2z &= 16 \end{align}\right. $$

Solution

Write the system as an augmented matrix.

$$ \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ 2 & 1 & 1 & : & 13 \\ -3 & -3 & 2 & : & 16 \end{matrix}\right] $$

There are no leading zeros and the leading coefficient is a 1, so there is nothing to arrange.

Add −2 times the 1st row to the 2nd row to produce a zero in the 1st column.

$$ \begin{matrix} ×-2 \\ +\hookrightarrow \\ \quad \end{matrix} \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ 2 & 1 & 1 & : & 13 \\ -3 & -3 & 2 & : & 16 \end{matrix}\right] $$

$$ \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ \color{blue}{0} & \color{blue}{-3} & \color{blue}{3} & : & \color{blue}{51} \\ -3 & -3 & 2 & : & 16 \end{matrix}\right] $$

Add 3 times the 1st row to the 3rd row to produce a zero in the 1st column.

$$ \begin{matrix} ×3 \\ \quad \\ +\hookrightarrow \end{matrix} \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ 0 & -3 & 3 & : & 51 \\ -3 & -3 & 2 & : & 16 \end{matrix}\right] $$

$$ \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ 0 & -3 & 3 & : & 51 \\ \color{red}{0} & \color{red}{3} & \color{red}{-1} & : & \color{red}{-41} \end{matrix}\right] $$

The 1st column is done, so move the next. Add the 2nd row to the 3rd row to produce a 0 in the 2nd column of the 3rd row.

$$ \begin{matrix} \quad \\ \swarrow \\ +\hookrightarrow \end{matrix} \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ 0 & -3 & 3 & : & 51 \\ 0 & 3 & -1 & : & -41 \end{matrix}\right] $$

$$ \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ 0 & -3 & 3 & : & 51 \\ \color{purple}{0} & \color{purple}{0} & \color{purple}{2} & : & \color{purple}{10} \end{matrix}\right] $$

The matrix is now in row-echelon form except for the leading ones. Multiply the 2nd row by \(-\frac{1}{3}\) and the 3rd row by \(\frac{1}{2}\).

$$ \begin{matrix} \quad \\ \color{red}{-\frac{1}{3}} \\ \color{purple}{\frac{1}{2}} \end{matrix} \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ 0 & -3 & 3 & : & 51 \\ 0 & 0 & 2 & : & 10 \end{matrix}\right] $$

$$ \left[\begin{matrix} 1 & 2 & -1 & : & -19 \\ \color{red}{0} & \color{red}{1} & \color{red}{-1} & : & \color{red}{-17} \\ \color{purple}{0} & \color{purple}{0} & \color{purple}{1} & : & \color{purple}{5} \end{matrix}\right] $$

The matrix is now in row-echelon form. Each row is an equation. The 3rd row says

z = 5

Write the equation for the 2nd row and substitute z and solve for y.

yz = −17

y − 5 = −17

y = −12

Write the equation for the 3rd row and substitute y and z and solve for x.

x + 2yz = −19

x + 2(−12) − 5 = −19

x = 10

The solution is (10, −19, 5).

Solve using Gaussian Elimination

$$ \left\{\begin{align} 2x + y - 3z &= -14 \\ x - y + z &= 10 \\ y + z &= 2 \end{align}\right. $$

Answer

(2, −3, 5)

Lesson Summary

Row-echelon form

A matrix is in row-echelon form when

The following matrices are in row-echelon form.

$$ \left[\begin{matrix} 1 & 0 & 2 \\ 0 & 1 & 3 \\ 0 & 0 & 0 \end{matrix}\right] \qquad \left[\begin{matrix} 1 & 2 & 3 & 4 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 1 \end{matrix}\right] $$


Elementary Row Operations

These are not steps. These are choices of what can be used.


Gaussian Elimination

A typical process for Gaussian Elimination is

  1. Rearrange the rows so that any rows with leading zeros are at the bottom.
  2. If a row has a leading coefficient of 1, then switch it with the 1st row to make the first row have a leading 1.
  3. Add multiples of the 1st row to the other rows to make leading zeros in all but the 1st row.
    1. Add a multiple of the 1st row to the 2nd row to produce a leading 0 in the 2nd row.
    2. Add a multiple of the 1st row to the 3rd row to produce a leading 0 in the 3rd row.
    3. Repeat for the rest of the rows. Skip any row that already has a leading 0.
  4. Add multiples of the 2nd row to the rows below it to make zeros in the 2nd column.
    1. Add a multiple of the 2nd row to the 3rd row to produce a 0 in the 2nd column of the 3rd row.
    2. Add a multiple of the 2nd row to the 4th row to produce a 0 in the 2nd column of the 4th row.
    3. Repeat for the rest of the rows below the 2nd row. Skip any row that already has a 0 in the 2nd column.
  5. Repeat for the rest of the rows to produce the row-echelon form.
    1. Add multiples of the 3rd row to the rows below to get zeros in the 3rd column.
    2. Add multiples of the 4th row to the rows below to get zeros in the 4th column.
    3. Continue until you reach the bottom row.
  6. Multiply each row by a constant to make the leading nonzero entry a 1.

Solve a System with Gaussian Elimination

To solve a system on linear equations

  1. Write the system of equations as an augmented matrix.
  2. Use Gaussian Elimination to put the matrix in row-echelon form.
  3. Each row of the matrix represents an equation. The last row gives the value of the last variable.
  4. Write the next to last row as an equation and back substitute the value from the last row to solve for the other variable.
  5. Continue using back substitution to solve for the rest of the variables.

Helpful videos about this lesson.

Practice Exercises

  1. What is the order of the given matrix?
  2. \(\left[\begin{matrix} 1 & 2 \end{matrix}\right]\)
  3. \(\left[\begin{matrix} 1 & 3 & 0 & 7 \\ 0 & 1 & 2 & 5 \end{matrix}\right]\)
  4. Write the augmented matrix for the system of equations.
  5. \(\left\{\begin{align} x + 2y &= 7 \\ -x - y &= -7\end{align}\right.\)
  6. \(\left\{\begin{align} 2x + y \qquad &= 4 \\ y + z &= 6 \\ 2x \quad + z &= 10 \end{align}\right.\)
  7. Perform the indicated row operations and state what the operation accomplished.
  8. Swap row 1 and 2: \(\left[\begin{matrix} 2 & 1 & 2 \\ 1 & 4 & -3 \end{matrix}\right]\)
  9. Add −2 times 1st row to the 2nd row: \(\left[\begin{matrix} 1 & 3 & -7 \\ 2 & 6 & 1 \\ 0 & 1 & 1 \end{matrix}\right]\)
  10. Multiply the 2nd row by \(\frac{1}{7}\): \(\left[\begin{matrix} 1 & 3 & 5 \\ 0 & 7 & 21 \end{matrix}\right]\)
  11. Is the matrix in row-echelon form?
  12. \(\left[\begin{matrix} 1 & 3 & 4 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{matrix}\right]\)
  13. \(\left[\begin{matrix} 1 & 0 & 1 & -1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 0 & 1 \end{matrix}\right]\)
  14. Use Gaussian Elimination to solve the system of equations.
  15. \(\left\{\begin{align} x - y + 3z &= 5 \\ 2x + y \quad &= 4 \\ y + z &= 1 \end{align}\right.\)
  16. \(\left\{\begin{align} 2x + y - z &= 22 \\ y + 2z &= -1 \\ x \qquad + z &= 4 \end{align}\right.\)
  17. \(\left\{\begin{align} x - y + 2z &= -4 \\ x + 2y - z &= 5 \\ x + y + 3z &= 5 \end{align}\right.\)
  18. \(\left\{\begin{align} 3x + 2y \qquad &= 6 \\ 2x + y - 3z &= 4 \\ x + y + z &= 2 \end{align}\right.\)
  19. \(\left\{\begin{align} 2x - 3y + 2z &= -1 \\ -12x + 6y - 42z &= 17 \\ 9x + 6y + 3z &= 5 \end{align}\right.\)
  20. Problem Solving
  21. An arcade uses colored tokens for its game machines. For $20 you can purchase any of the three combinations of tokens: 14 gold, 20 silver, and 24 bronze; 20 gold, 15 silver, or 19 bronze; and 30 gold, 5 silver, and 13 bronze. What is the value of each color of token?
  22. Mixed Review
  23. (8-06) Use linear programming to find the maximum of \(z = 2x + 3y\) given the constraints \(\left\{\begin{align} 1 &≤ x ≤ 5 \\ 2 &≤ y ≤ 4 \end{align}\right.\)
  24. (8-04) Find the partial fractions of \(\frac{7x - 11}{x^2 - 4x - 5}\)
  25. (6-05) Find the dot product: ⟨2, 5⟩ · ⟨−1, 3⟩
  26. (5-03) Verify the identity: \(\frac{\sin^3 x}{1 + \cos x} = \sin x(1 - \cos x)\)
  27. (2-07) Find the asymptotes of \(\frac{2x^2 + 1}{x^2 - 1}\)

Answers

  1. 1×2
  2. 2×4
  3. \(\left[\begin{matrix} 1 & 2 & : & 7 \\ -1 & -1 & : & -7 \end{matrix}\right]\)
  4. \(\left[\begin{matrix} 2 & 1 & 0 & : & 4 \\ 0 & 1 & 1 & : & 6 \\ 2 & 0 & 1 & : & 10 \end{matrix}\right]\)
  5. \(\left[\begin{matrix} 1 & 4 & -3 \\ 2 & 1 & 2 \end{matrix}\right]\); Puts a 1 as leading coefficient in 1st row.
  6. \(\left[\begin{matrix} 1 & 3 & -7 \\ 0 & 0 & 15 \\ 0 & 1 & 1 \end{matrix}\right]\); Puts a zero in 1st column of 2nd row.
  7. \(\left[\begin{matrix} 1 & 3 & 5 \\ 0 & 1 & 3 \end{matrix}\right]\); Makes a leading 1 in 2nd row.
  8. No
  9. Yes
  10. (2, 0, 1)
  11. (7, 5, −3)
  12. (−2, 4, 1)
  13. (2, 0, 0)
  14. \(\left(\frac{1}{2}, \frac{1}{3}, -\frac{1}{2}\right)\)
  15. Gold: $0.50, Silver: $0.35, Bronze: $0.25
  16. Max: 22 at (5, 4)
  17. \(\frac{3}{x + 1} + \frac{4}{x - 5}\)
  18. 13
  19. You have to figure it out.
  20. VA: x = ±1; HA: y = 2