Precalculus by Richard Wright

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

Summary: In this section, you will:

- Identify the order of a matrix.
- Write an augmented matrix for a system of equations.
- Write a matrix in row-echelon form.
- Solve a system of linear equations using an augmented matrix.

SDA NAD Content Standards (2018): PC.6.4

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.

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.

What is the order of this matrix?

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

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] $$

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 for the system of equations.

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

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. $$

\(\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.

A matrix is in row-echelon form when

- All rows consisting entirely of zeros is at the bottom.
- For other rows the first nonzero entry is 1.
- For successive rows, the leading 1 in the higher row is further to the left.

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.

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

- Interchange 2 rows
- Multiply a row by a nonzero constant
- Add a multiple of a row to another row and replace the latter row

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

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

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] $$

\( \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 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.

A typical process for Gaussian Elimination is

- Rearrange the rows so that any rows with leading zeros are at the bottom.
- 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.
- Add multiples of the 1st row to the other rows to make leading zeros in all but the 1st row.
- Add a multiple of the 1st row to the 2nd row to produce a leading 0 in the 2nd row.
- Add a multiple of the 1st row to the 3rd row to produce a leading 0 in the 3rd row.
- Repeat for the rest of the rows. Skip any row that already has a leading 0.
- Add multiples of the 2nd row to the rows below it to make zeros in the 2nd column.
- Add a multiple of the 2nd row to the 3rd row to produce a 0 in the 2nd column of the 3rd row.
- Add a multiple of the 2nd row to the 4th row to produce a 0 in the 2nd column of the 4th row.
- Repeat for the rest of the rows below the 2nd row. Skip any row that already has a 0 in the 2nd column.
- Repeat for the rest of the rows to produce the row-echelon form.
- Add multiples of the 3rd row to the rows below to get zeros in the 3rd column.
- Add multiples of the 4th row to the rows below to get zeros in the 4th column.
- Continue until you reach the bottom row.
- Multiply each row by a constant to make the leading nonzero entry a 1.

To solve a system on linear equations

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

Solve using Gaussian Elimination.

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

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*.

$$ y - z = -17 $$

$$ y - 5 = -17 $$

$$ y = -12 $$

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

$$ x + 2y - z = -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. $$

(2, −3, 5)

A matrix is in row-echelon form when

- All rows consisting entirely of zeros is at the bottom.
- For other rows the first nonzero entry is 1.
- For successive rows, the leading 1 in the higher row is further to the left.

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] $$

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

- Interchange 2 rows
- Multiply a row by a nonzero constant
- Add a multiple of a row to another row and replace the latter row

A typical process for Gaussian Elimination is

- Rearrange the rows so that any rows with leading zeros are at the bottom.
- 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.
- Add multiples of the 1st row to the other rows to make leading zeros in all but the 1st row.
- Add a multiple of the 1st row to the 2nd row to produce a leading 0 in the 2nd row.
- Add a multiple of the 1st row to the 3rd row to produce a leading 0 in the 3rd row.
- Repeat for the rest of the rows. Skip any row that already has a leading 0.
- Add multiples of the 2nd row to the rows below it to make zeros in the 2nd column.
- Add a multiple of the 2nd row to the 3rd row to produce a 0 in the 2nd column of the 3rd row.
- Add a multiple of the 2nd row to the 4th row to produce a 0 in the 2nd column of the 4th row.
- Repeat for the rest of the rows below the 2nd row. Skip any row that already has a 0 in the 2nd column.
- Repeat for the rest of the rows to produce the row-echelon form.
- Add multiples of the 3rd row to the rows below to get zeros in the 3rd column.
- Add multiples of the 4th row to the rows below to get zeros in the 4th column.
- Continue until you reach the bottom row.
- Multiply each row by a constant to make the leading nonzero entry a 1.

To solve a system on linear equations

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

Helpful videos about this lesson.

- \(\left[\begin{matrix} 1 & 2 \end{matrix}\right]\)
- \(\left[\begin{matrix} 1 & 3 & 0 & 7 \\ 0 & 1 & 2 & 5 \end{matrix}\right]\)
- \(\left\{\begin{align} x + 2y &= 7 \\ -x - y &= -7\end{align}\right.\)
- \(\left\{\begin{align} 2x + y \qquad &= 4 \\ y + z &= 6 \\ 2x \quad + z &= 10 \end{align}\right.\)
- Swap row 1 and 2: \(\left[\begin{matrix} 2 & 1 & 2 \\ 1 & 4 & -3 \end{matrix}\right]\)
- Add −2 times 1st row to the 2nd row: \(\left[\begin{matrix} 1 & 3 & -7 \\ 2 & 6 & 1 \\ 0 & 1 & 1 \end{matrix}\right]\)
- Multiply the 2nd row by \(\frac{1}{7}\): \(\left[\begin{matrix} 1 & 3 & 5 \\ 0 & 7 & 21 \end{matrix}\right]\)
- \(\left[\begin{matrix} 1 & 3 & 4 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{matrix}\right]\)
- \(\left[\begin{matrix} 1 & 0 & 1 & -1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 0 & 1 \end{matrix}\right]\)
- \(\left\{\begin{align} x - y + 3z &= 5 \\ 2x + y \quad &= 4 \\ y + z &= 1 \end{align}\right.\)
- \(\left\{\begin{align} 2x + y - z &= 22 \\ y + 2z &= -1 \\ x \qquad + z &= 4 \end{align}\right.\)
- \(\left\{\begin{align} x - y + 2z &= -4 \\ x + 2y - z &= 5 \\ x + y + 3z &= 5 \end{align}\right.\)
- \(\left\{\begin{align} 3x + 2y \qquad &= 6 \\ 2x + y - 3z &= 4 \\ x + y + z &= 2 \end{align}\right.\)
- \(\left\{\begin{align} 2x - 3y + 2z &= -1 \\ -12x + 6y - 42z &= 17 \\ 9x + 6y + 3z &= 5 \end{align}\right.\)
- 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?
- (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.\)
- (8-04) Find the partial fractions of \(\frac{7x - 11}{x^2 - 4x - 5}\)
- (6-05) Find the dot product: \(\langle 2, 5 \rangle \cdot \langle -1, 3 \rangle\)
- (5-03) Verify the identity: \(\frac{\sin^3 x}{1 + \cos x} = \sin x(1 - \cos x)\)
- (2-07) Find the asymptotes of \(\frac{2x^2 + 1}{x^2 - 1}\)

What is the order of the given matrix?

Write the augmented matrix for the system of equations.

Perform the indicated row operations and state what the operation accomplished.

Is the matrix in row-echelon form?

Use Gaussian Elimination to solve the system of equations.

Problem Solving

Mixed Review

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