39 Solve Systems of Equations Using Matrices

Learning Objectives

By the end of this section, you will be able to:

  • Write the augmented matrix for a system of equations
  • Use row operations on a matrix
  • Solve systems of equations using matrices

Before you get started, take this readiness quiz.

  1. Solve: 3\left(x+2\right)+4=4\left(2x-1\right)+9.

    If you missed this problem, review (Figure).

  2. Solve: 0.25p+0.25\left(x+4\right)=5.20.

    If you missed this problem, review (Figure).

  3. Evaluate when x=-2 and y=3\text{:}\phantom{\rule{0.2em}{0ex}}2{x}^{2}-xy+3{y}^{2}.

    If you missed this problem, review (Figure).

Write the Augmented Matrix for a System of Equations

Solving a system of equations can be a tedious operation where a simple mistake can wreak havoc on finding the solution. An alternative method which uses the basic procedures of elimination but with notation that is simpler is available. The method involves using a matrix. A matrix is a rectangular array of numbers arranged in rows and columns.

Matrix

A matrix is a rectangular array of numbers arranged in rows and columns.

A matrix with m rows and n columns has order m\phantom{\rule{0.2em}{0ex}}×\phantom{\rule{0.2em}{0ex}}n. The matrix on the left below has 2 rows and 3 columns and so it has order 2\phantom{\rule{0.2em}{0ex}}×\phantom{\rule{0.2em}{0ex}}3. We say it is a 2 by 3 matrix.

Figure shows two matrices. The one on the left has the numbers minus 3, minus 2 and 2 in the first row and the numbers minus 1, 4 and 5 in the second row. The rows and columns are enclosed within brackets. Thus, it has 2 rows and 3 columns. It is labeled 2 cross 3 or 2 by 3 matrix. The matrix on the right is similar but with 3 rows and 4 columns. It is labeled 3 by 4 matrix.

Each number in the matrix is called an element or entry in the matrix.

We will use a matrix to represent a system of linear equations. We write each equation in standard form and the coefficients of the variables and the constant of each equation becomes a row in the matrix. Each column then would be the coefficients of one of the variables in the system or the constants. A vertical line replaces the equal signs. We call the resulting matrix the augmented matrix for the system of equations.

The equations are 3x plus y equals minus 3 and 2x plus 3y equals 6. A 2 by 3 matrix is shown. The first row is 3, 1, minus 3. The second row is 2, 3, 6. The first column is labeled coefficients of x. The second column is labeled coefficients of y and the third is labeled constants.

Notice the first column is made up of all the coefficients of x, the second column is the all the coefficients of y, and the third column is all the constants.

Write each system of linear equations as an augmented matrix:

\left\{\begin{array}{c}5x-3y=-1\hfill \\ y=2x-2\hfill \end{array}\left\{\begin{array}{c}6x-5y+2z=3\hfill \\ 2x+y-4z=5\hfill \\ 3x-3y+z=-1\hfill \end{array}

The second equation is not in standard form. We rewrite the second equation in standard form.

\begin{array}{ccc}\hfill y& =\hfill & 2x-2\hfill \\ \hfill -2x+y& =\hfill & -2\hfill \end{array}

We replace the second equation with its standard form. In the augmented matrix, the first equation gives us the first row and the second equation gives us the second row. The vertical line replaces the equal signs.

The equations are 3x plus y equals minus 3 and 2x plus 3y equals 6. A 2 by 3 matrix is shown. The first row is 3, 1, minus 3. The second row is 2, 3, 6. The first column is labeled coefficients of x. The second column is labeled coefficients of y and the third is labeled constants.

All three equations are in standard form. In the augmented matrix the first equation gives us the first row, the second equation gives us the second row, and the third equation gives us the third row. The vertical line replaces the equal signs.

The equations are 6x minus 5y plus 2z equals 3, 2x plus y minus 4z equals 5 and 3x minus 3y plus z equals minus 1. A 4 by 3 matrix is shown whose first row is 6, minus 5, 2, 3. Its second row is 2, 1, minus 4, 5. Its third row is 3, minus 3, 1 and minus 1. Its first three columns are labeled x, y and z respectively.

Write each system of linear equations as an augmented matrix:

\left\{\begin{array}{c}3x+8y=-3\hfill \\ 2x=-5y-3\hfill \end{array}\left\{\begin{array}{c}2x-5y+3z=8\hfill \\ 3x-y+4z=7\hfill \\ x+3y+2z=-3\hfill \end{array}

\left[\begin{array}{ccccccc}3\hfill & & & 8\hfill & & & \hfill -3\\ 2\hfill & & & 5\hfill & & & \hfill -3\end{array}\right]

\left[\begin{array}{cccccccccc}2\hfill & & & \hfill -5& & & 3\hfill & & & \hfill 8\\ 3\hfill & & & \hfill -1& & & 4\hfill & & & \hfill 7\\ 1\hfill & & & \hfill 3& & & 2\hfill & & & \hfill -3\end{array}\right]

Write each system of linear equations as an augmented matrix:

\left\{\begin{array}{c}11x=-9y-5\hfill \\ 7x+5y=-1\hfill \end{array}\left\{\begin{array}{c}5x-3y+2z=-5\hfill \\ 2x-y-z=4\hfill \\ 3x-2y+2z=-7\hfill \end{array}

\left[\begin{array}{ccccccc}11\hfill & & & 9\hfill & & & \hfill -5\\ 7\hfill & & & 5\hfill & & & \hfill -1\end{array}\right]

\left[\begin{array}{cccccccccc}5\hfill & & & \hfill -3& & & \hfill 2& & & \hfill -5\\ 2\hfill & & & \hfill -1& & & \hfill -1& & & \hfill 4\\ 3\hfill & & & \hfill -2& & & \hfill 2& & & \hfill -7\end{array}\right]

It is important as we solve systems of equations using matrices to be able to go back and forth between the system and the matrix. The next example asks us to take the information in the matrix and write the system of equations.

Write the system of equations that corresponds to the augmented matrix:

\left[\begin{array}{ccccccccc}\hfill 4& & & \hfill -3& & & \hfill 3& & \\ \hfill 1& & & \hfill 2& & & \hfill -1& & \\ \hfill -2& & & \hfill -1& & & \hfill 3& & \end{array}|\begin{array}{ccc}& & \hfill -1\\ & & \hfill 2\\ & & \hfill -4\end{array}\right].

We remember that each row corresponds to an equation and that each entry is a coefficient of a variable or the constant. The vertical line replaces the equal sign. Since this matrix is a 4\phantom{\rule{0.2em}{0ex}}×\phantom{\rule{0.2em}{0ex}}3, we know it will translate into a system of three equations with three variables.

A 3 by 4 matrix is shown. Its first row is 4, minus 3, 3, minus 1. Its second row is 1, 2, minus 1, 2. Its third row is minus 2, minus 1, 3, minus 4. The three equations are 4x minus 3y plus 3z equals minus 1, x plus 2y minus z equals 2 and minus 2x minus y plus 3z equals minus 4.

Write the system of equations that corresponds to the augmented matrix: \left[\begin{array}{cccccccccc}1\hfill & & & \hfill -1& & & \hfill 2& & & \hfill 3\\ 2\hfill & & & \hfill 1& & & \hfill -2& & & \hfill 1\\ 4\hfill & & & \hfill -1& & & \hfill 2& & & \hfill 0\end{array}\right].

\left\{\begin{array}{c}\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}x-y+2z=3\hfill \\ 2x+y-2z=1\hfill \\ \phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}4x-y+2z=0\hfill \end{array}

Write the system of equations that corresponds to the augmented matrix: \left[\begin{array}{cccccccccc}1\hfill & & & 1\hfill & & & \hfill 1& & & \hfill 4\\ 2\hfill & & & 3\hfill & & & \hfill -1& & & \hfill 8\\ 1\hfill & & & 1\hfill & & & \hfill -1& & & \hfill 3\end{array}\right].

\left\{\begin{array}{c}\phantom{\rule{0.2em}{0ex}}\text{}\phantom{\rule{0.2em}{0ex}}x+y+z=4\hfill \\ 2x+3y-z=8\hfill \\ \phantom{\rule{0.8em}{0ex}}x+y-z=3\hfill \end{array}

Use Row Operations on a Matrix

Once a system of equations is in its augmented matrix form, we will perform operations on the rows that will lead us to the solution.

To solve by elimination, it doesn’t matter which order we place the equations in the system. Similarly, in the matrix we can interchange the rows.

When we solve by elimination, we often multiply one of the equations by a constant. Since each row represents an equation, and we can multiply each side of an equation by a constant, similarly we can multiply each entry in a row by any real number except 0.

In elimination, we often add a multiple of one row to another row. In the matrix we can replace a row with its sum with a multiple of another row.

These actions are called row operations and will help us use the matrix to solve a system of equations.

Row Operations

In a matrix, the following operations can be performed on any row and the resulting matrix will be equivalent to the original matrix.

  1. Interchange any two rows.
  2. Multiply a row by any real number except 0.
  3. Add a nonzero multiple of one row to another row.

Performing these operations is easy to do but all the arithmetic can result in a mistake. If we use a system to record the row operation in each step, it is much easier to go back and check our work.

We use capital letters with subscripts to represent each row. We then show the operation to the left of the new matrix. To show interchanging a row:

A 2 by 3 matrix is shown. Its first row, labeled R2 is 2, minus 1, 2. Its second row, labeled R1 is 5, minus 3, minus 1.

To multiply row 2 by -3:

A 2 by 3 matrix is shown. Its first row is 5, minus 3, minus 1. Its second row is 2, minus 1, 2. An arrow point from this matrix to another one on the right. The first row of the new matrix is the same. The second row is preceded by minus 3 R2. It is minus 6, 3, minus 6.

To multiply row 2 by -3 and add it to row 1:

A 2 by 3 matrix is shown. Its first row is 5, minus 3, minus 1. Its second row is 2, minus 1, 2. An arrow point from this matrix to another one on the right. The first row of the new matrix is preceded by minus 3 R2 plus R1. It is minus 1, 0, minus 7. The second row is 2, minus 1, 2.

Perform the indicated operations on the augmented matrix:

Interchange rows 2 and 3.

Multiply row 2 by 5.

Multiply row 3 by -2 and add to row 1.

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

We interchange rows 2 and 3.

Two 3 by 4 matrices are shown. In the one on the left, the first row is 6, minus 5, 2, 3. The second row is 2, 1, minus 4, 5. The third row is 3, minus 3, 1, minus 1. The second matrix is similar except that rows 2 and 3 are interchanged.

We multiply row 2 by 5.

Two 3 by 4 matrices are shown. In the one on the left, the first row is 6, minus 5, 2, 3. The second row is 2, 1, minus 4, 5. The third row is 3, minus 3, 1, minus 1. The second matrix is similar to the first except that row 2, preceded by 5 R2, is 10, 5, minus 20, 25.

We multiply row 3 by -2 and add to row 1.

In the 3 by 4 matrix, the first row is 6, minus 5, 2, 3. The second row is 2, 1, minus 4, 5. The third row is 3, minus 3, 1, minus 1. Performing the operation minus 2 R3 plus R1 on the first row, the first row becomes 6 plus minus 2 times 3, minus 5 plus minus 2 times minus 3, 2 plus minus 2 times 1 and 3 plus minus 2 times minus 1. This becomes 0, 1, 0, 5. The remaining 2 rows of the new matrix are the same.

Perform the indicated operations on the augmented matrix:

Interchange rows 1 and 3.

Multiply row 3 by 3.

Multiply row 3 by 2 and add to row 2.

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

\left[\begin{array}{cccccccccc}\hfill -2& & & \hfill 3& & & \hfill 0& & & \hfill -2\\ \hfill 4& & & \hfill -1& & & \hfill -4& & & \hfill 4\\ \hfill 5& & & \hfill -2& & & \hfill -2& & & \hfill -2\end{array}\right]

\left[\begin{array}{cccccccccc}\hfill -2& & & \hfill 3& & & \hfill 0& & & \hfill -2\\ \hfill 4& & & \hfill -1& & & \hfill -4& & & \hfill 4\\ 15\hfill & & & \hfill -6& & & \hfill -6& & & \hfill -6\end{array}\right]

\left[\begin{array}{ccccccccccccc}\hfill -2& & & \hfill 3& & & \hfill 0& & & \hfill -2& & & \\ \hfill 3& & & \hfill 4& & & \hfill -13& & & \hfill -16& & & \hfill -8\\ \hfill 15& & & \hfill -6& & & \hfill -6& & & \hfill -6& & & \end{array}\right]

Perform the indicated operations on the augmented matrix:

Interchange rows 1 and 2,

Multiply row 1 by 2,

Multiply row 2 by 3 and add to row 1.

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

\left[\begin{array}{cccccccccc}4\hfill & & & \hfill 1& & & \hfill -3& & & \hfill 2\\ 2\hfill & & & \hfill -3& & & \hfill -2& & & \hfill -4\\ 5\hfill & & & \hfill 0& & & \hfill 4& & & \hfill -1\end{array}\right]

\left[\begin{array}{cccccccccc}8\hfill & & & \hfill 2& & & \hfill -6& & & \hfill 4\\ 2\hfill & & & \hfill -3& & & \hfill -2& & & \hfill -4\\ 5\hfill & & & \hfill 0& & & \hfill 4& & & \hfill -1\end{array}\right]

\left[\begin{array}{cccccccccc}14\hfill & & & \hfill -7& & & \hfill -12& & & \hfill -8\\ 2\hfill & & & \hfill -3& & & \hfill -2& & & \hfill -4\\ 5\hfill & & & \hfill 0& & & \hfill 4& & & \hfill -1\end{array}\right]

Now that we have practiced the row operations, we will look at an augmented matrix and figure out what operation we will use to reach a goal. This is exactly what we did when we did elimination. We decided what number to multiply a row by in order that a variable would be eliminated when we added the rows together.

Given this system, what would you do to eliminate x?

The two equations are x minus y equals 2 and 4x minus 8y equals 0. Multiplying the first by minus 4, we get minus 4x plus 4y equals minus 8. Adding this to the second equation we get minus 4y equals minus 8.

This next example essentially does the same thing, but to the matrix.

Perform the needed row operation that will get the first entry in row 2 to be zero in the augmented matrix: \left[\begin{array}{cccccc}1\hfill & & & \hfill -1& & \\ 4\hfill & & & \hfill -8& & \end{array}|\begin{array}{ccc}& & \hfill 2\\ & & \hfill 0\end{array}\right].

To make the 4 a 0, we could multiply row 1 by -4 and then add it to row 2.

The 2 by 3 matrix is 1, minus 1, 2 and 4, minus 8, 0. Performing the operation minus 4R1 plus R2 on row 2, the second row of the new matrix becomes 0, minus 4, minus 8. The first row remains the same.

Perform the needed row operation that will get the first entry in row 2 to be zero in the augmented matrix: \left[\begin{array}{cccccc}1\hfill & & & \hfill -1& & \\ 3\hfill & & & \hfill -6& & \end{array}|\begin{array}{ccc}& & \hfill 2\\ & & \hfill 2\end{array}\right].

\left[\begin{array}{ccccccc}1\hfill & & & \hfill -1& & & \hfill 2\\ 0\hfill & & & \hfill -3& & & \hfill -4\end{array}\right]

Perform the needed row operation that will get the first entry in row 2 to be zero in the augmented matrix: \left[\begin{array}{cccccc}\hfill 1& & & \hfill -1& & \\ \hfill -2& & & \hfill -3& & \end{array}|\begin{array}{ccc}& & \hfill 3\\ & & \hfill 2\end{array}\right].

\left[\begin{array}{ccccccc}1\hfill & & & \hfill -1& & & \hfill 3\\ 0\hfill & & & \hfill -5& & & \hfill 8\end{array}\right]

Solve Systems of Equations Using Matrices

To solve a system of equations using matrices, we transform the augmented matrix into a matrix in row-echelon form using row operations. For a consistent and independent system of equations, its augmented matrix is in row-echelon form when to the left of the vertical line, each entry on the diagonal is a 1 and all entries below the diagonal are zeros.

Row-Echelon Form

For a consistent and independent system of equations, its augmented matrix is in row-echelon form when to the left of the vertical line, each entry on the diagonal is a 1 and all entries below the diagonal are zeros.

A 2 by 3 matrix is shown on the left. Its first row is 1, a, b. Its second row is 0, 1, c. An arrow points diagonally down and right, overlapping both the 1s in the matrix. A 3 by 4 matrix is shown on the right. Its first row is 1, a, b, d. Its second row is 0, 1, c, e. Its third row is 0, 0, 1, f. An arrow points diagonally down and right, overlapping all the 1s in the matrix. a, b, c, d, e, f are real numbers.

Once we get the augmented matrix into row-echelon form, we can write the equivalent system of equations and read the value of at least one variable. We then substitute this value in another equation to continue to solve for the other variables. This process is illustrated in the next example.

How to Solve a System of Equations Using a Matrix

Solve the system of equations using a matrix: \left\{\begin{array}{c}3x+4y=5\hfill \\ x+2y=1\hfill \end{array}.

The equations are 3x plus 4y equals 5 and x plus 2y equals 1. Step 1. Write the augmented matrix for the system of equations. We get a 2 by 3 matrix with first row 3, 4, 5 and second row 1, 2, 1.Step 2. Using row operations get the entry in row 1, column 1 to be 1. Interchange rows R1 and R2.Step 3. Using row operations, get zeros in column 1 below the 1. Multiply row 1 by minus 3 and add it to row 2. Row 2 becomes 0, minus 2, 2.Step 4. Using row operations, get the entry in row 2, column 2 to be 1. Multiply row 2 by minus half. Row 2 becomes 0, 1, minus 1.Step 5. Continue the process until the matrix is in row-echelon form. The matrix is now in row-echelon form.Step 6. Write the corresponding system of equations. We get x plus 2y equals 1 and y equals minus 1.Step 7. Use substitution to find the remaining variables. Substitute y equals negative 1 into x plus 2y equals 1. X plus 2 times negative 1 equals 1. X minus 2 equals 1. We get x equal to 3.Step 8. Write the solution as an ordered pair or triple. Ordered pair is (3, negative 1).Step 9. Check that the solution makes the original equations true.

Solve the system of equations using a matrix: \left\{\begin{array}{c}2x+y=7\hfill \\ x-2y=6\hfill \end{array}.

The solution is \left(4,-1\right).

Solve the system of equations using a matrix: \left\{\begin{array}{c}2x+y=-4\hfill \\ x-y=-2\hfill \end{array}.

The solution is \left(-2,0\right).

The steps are summarized here.

Solve a system of equations using matrices.
  1. Write the augmented matrix for the system of equations.
  2. Using row operations get the entry in row 1, column 1 to be 1.
  3. Using row operations, get zeros in column 1 below the 1.
  4. Using row operations, get the entry in row 2, column 2 to be 1.
  5. Continue the process until the matrix is in row-echelon form.
  6. Write the corresponding system of equations.
  7. Use substitution to find the remaining variables.
  8. Write the solution as an ordered pair or triple.
  9. Check that the solution makes the original equations true.

Here is a visual to show the order for getting the 1’s and 0’s in the proper position for row-echelon form.

The figure shows 3 steps for a 2 by 3 matrix and 6 steps for a 3 by 4 matrix. For the former, step 1 is to get a 1 in row 1 column 1. Step to is to get a 0 is row 2 column 1. Step 3 is to get a 1 in row 2 column 2. For a 3 by 4 matrix, step 1 is to get a 1 in row 1 column 1. Step 2 is to get a 0 in row 2 column 1. Step 3 is to get a 0 in row 3 column 1. Step 4 is to get a 1 in row 2 column 2. Step 5 is to get a 0 in row 3 column 2. Step 6 is to get a 1 in row 3 column 3.

We use the same procedure when the system of equations has three equations.

Solve the system of equations using a matrix: \left\{\begin{array}{c}3x+8y+2z=-5\hfill \\ 2x+5y-3z=0\hfill \\ x+2y-2z=-1\hfill \end{array}.

.
Write the augmented matrix for the equations. .
Interchange row 1 and 3 to get the entry in

row 1, column 1 to be 1.

.
Using row operations, get zeros in column 1 below the 1. .
.
The entry in row 2, column 2 is now 1.
Continue the process until the matrix

is in row-echelon form.

.
.
The matrix is now in row-echelon form. .
Write the corresponding system of equations. .
Use substitution to find the remaining variables. .
.

.

Write the solution as an ordered pair or triple. .
Check that the solution makes the original equations true. We leave the check for you.

Solve the system of equations using a matrix: \left\{\begin{array}{c}2x-5y+3z=8\hfill \\ 3x-y+4z=7\hfill \\ x+3y+2z=-3\hfill \end{array}.

\left(6,-1,-3\right)

Solve the system of equations using a matrix: \left\{\begin{array}{c}\hfill -3x+y+z=-4\\ \hfill \text{−}x+2y-2z=1\\ 2x-y-z=-1\hfill \end{array}.

\left(5,7,4\right)

So far our work with matrices has only been with systems that are consistent and independent, which means they have exactly one solution. Let’s now look at what happens when we use a matrix for a dependent or inconsistent system.

Solve the system of equations using a matrix: \left\{\begin{array}{c}x+y+3z=0\hfill \\ x+3y+5z=0\hfill \\ 2x+4z=1\hfill \end{array}.

.
Write the augmented matrix for the equations. .
The entry in row 1, column 1 is 1.
Using row operations, get zeros in column 1 below the 1. .
.
Continue the process until the matrix is in row-echelon form. .
Multiply row 2 by 2 and add it to row 3. .
At this point, we have all zeros on the left of row 3.
Write the corresponding system of equations. .
Since 0\ne 1 we have a false statement. Just as when we solved a system using other methods, this tells us we have an inconsistent system. There is no solution.

Solve the system of equations using a matrix: \left\{\begin{array}{c}x-2y+2z=1\hfill \\ \hfill -2x+y-z=2\\ x-y+z=5\hfill \end{array}.

no solution

Solve the system of equations using a matrix: \left\{\begin{array}{c}3x+4y-3z=-2\hfill \\ 2x+3y-z=-12\hfill \\ x+y-2z=6\hfill \end{array}.

no solution

The last system was inconsistent and so had no solutions. The next example is dependent and has infinitely many solutions.

Solve the system of equations using a matrix: \left\{\begin{array}{c}x-2y+3z=1\hfill \\ x+y-3z=7\hfill \\ 3x-4y+5z=7\hfill \end{array}.

.
Write the augmented matrix for the equations. .
The entry in row 1, column 1 is 1.
Using row operations, get zeros in column 1 below the 1. .
.
Continue the process until the matrix is in row-echelon form. .
Multiply row 2 by -2 and add it to row 3. .
At this point, we have all zeros in the bottom row.
Write the corresponding system of equations. .
Since 0=0 we have a true statement. Just as when we solved by substitution, this tells us we have a dependent system. There are infinitely many solutions.
Solve for y in terms of z in the second equation. .
Solve the first equation for x in terms of z. .
Substitute y=2z+2. .
Simplify. .
Simplify. .
Simplify. .
The system has infinitely many solutions \left(x,y,z\right)\text{,} wherex=z+5;y=2z+2;z is any real number.

Solve the system of equations using a matrix: \left\{\begin{array}{c}x+y-z=0\hfill \\ 2x+4y-2z=6\hfill \\ 3x+6y-3z=9\hfill \end{array}.

infinitely many solutions \left(x,y,z\right)\text{,} where x=z-3;y=3;z is any real number.

Solve the system of equations using a matrix: \left\{\begin{array}{c}x-y-z=1\hfill \\ \hfill \text{−}x+2y-3z=-4\\ 3x-2y-7z=0\hfill \end{array}.

infinitely many solutions \left(x,y,z\right)\text{,} where x=5z-2;y=4z-3;z is any real number.

Access this online resource for additional instruction and practice with Gaussian Elimination.

Key Concepts

  • Matrix: A matrix is a rectangular array of numbers arranged in rows and columns. A matrix with m rows and n columns has order m\phantom{\rule{0.2em}{0ex}}×\phantom{\rule{0.2em}{0ex}}n. The matrix on the left below has 2 rows and 3 columns and so it has order 2\phantom{\rule{0.2em}{0ex}}×\phantom{\rule{0.2em}{0ex}}3. We say it is a 2 by 3 matrix.

    Figure shows two matrices. The one on the left has the numbers minus 3, minus 2 and 2 in the first row and the numbers minus 1, 4 and 5 in the second row. The rows and columns are enclosed within brackets. Thus, it has 2 rows and 3 columns. It is labeled 2 cross 3 or 2 by 3 matrix. The matrix on the right is similar but with 3 rows and 4 columns. It is labeled 3 by 4 matrix.

    Each number in the matrix is called an element or entry in the matrix.

  • Row Operations: In a matrix, the following operations can be performed on any row and the resulting matrix will be equivalent to the original matrix.
    • Interchange any two rows
    • Multiply a row by any real number except 0
    • Add a nonzero multiple of one row to another row
  • Row-Echelon Form: For a consistent and independent system of equations, its augmented matrix is in row-echelon form when to the left of the vertical line, each entry on the diagonal is a 1 and all entries below the diagonal are zeros.

    Figure shows two matrices. The one on the left has the numbers minus 3, minus 2 and 2 in the first row and the numbers minus 1, 4 and 5 in the second row. The rows and columns are enclosed within brackets. Thus, it has 2 rows and 3 columns. It is labeled 2 cross 3 or 2 by 3 matrix. The matrix on the right is similar but with 3 rows and 4 columns. It is labeled 3 by 4 matrix.

  • How to solve a system of equations using matrices.
    1. Write the augmented matrix for the system of equations.
    2. Using row operations get the entry in row 1, column 1 to be 1.
    3. Using row operations, get zeros in column 1 below the 1.
    4. Using row operations, get the entry in row 2, column 2 to be 1.
    5. Continue the process until the matrix is in row-echelon form.
    6. Write the corresponding system of equations.
    7. Use substitution to find the remaining variables.
    8. Write the solution as an ordered pair or triple.
    9. Check that the solution makes the original equations true.

Practice Makes Perfect

Write the Augmented Matrix for a System of Equations

In the following exercises, write each system of linear equations as an augmented matrix.

\left\{\begin{array}{c}3x-y=-1\hfill \\ 2y=2x+5\hfill \end{array}

\left\{\begin{array}{c}4x+3y=-2\hfill \\ x-2y-3z=7\hfill \\ 2x-y+2z=-6\hfill \end{array}

\left\{\begin{array}{c}2x+4y=-5\hfill \\ 3x-2y=2\hfill \end{array}

\left\{\begin{array}{c}3x-2y-z=-2\hfill \\ -2x+y=5\hfill \\ 5x+4y+z=-1\hfill \end{array}

\left[\begin{array}{ccccccc}2\hfill & & & \hfill 4& & & \hfill -5\\ 3\hfill & & & \hfill -2& & & \hfill 2\end{array}\right]

\left[\begin{array}{cccccccccc}\hfill 3& & & \hfill -2& & & \hfill -1& & & \hfill -2\\ \hfill -2& & & \hfill 1& & & \hfill 0& & & \hfill 5\\ \hfill 5& & & \hfill 4& & & \hfill 1& & & \hfill -1\end{array}\right]

\left\{\begin{array}{c}3x-y=-4\hfill \\ 2x=y+2\hfill \end{array}

\left\{\begin{array}{c}x-3y-4z=-2\hfill \\ 4x+2y+2z=5\hfill \\ 2x-5y+7z=-8\hfill \end{array}

\left\{\begin{array}{c}2x-5y=-3\hfill \\ 4x=3y-1\hfill \end{array}

\left\{\begin{array}{c}4x+3y-2z=-3\hfill \\ \hfill -2x+y-3z=4\\ \hfill \text{−}x-4y+5z=-2\end{array}

\left[\begin{array}{ccccccc}2\hfill & & & \hfill -5& & & \hfill -3\\ 4\hfill & & & \hfill -3& & & \hfill -1\end{array}\right]

\left[\begin{array}{cccccccccc}4\hfill & & & \hfill 3& & & \hfill -2& & & \hfill -3\\ \hfill -2& & & \hfill 1& & & \hfill -3& & & \hfill 4\\ -1\hfill & & & \hfill -4& & & \hfill 5& & & \hfill -2\end{array}\right]

Write the system of equations that corresponds to the augmented matrix.

\left[\begin{array}{cccc}2\hfill & & & \hfill -1\\ 1\hfill & & & \hfill -3\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill 4\\ \hfill 2\end{array}\right]

\left[\begin{array}{cccc}2\hfill & & & \hfill -4\\ 3\hfill & & & \hfill -3\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill -2\\ \hfill -1\end{array}\right]

\left\{\begin{array}{c}2x-4y=-2\hfill \\ 3x-3y=-1\hfill \end{array}

\left[\begin{array}{ccccccc}1\hfill & & & \hfill 0& & & \hfill -3\\ 1\hfill & & & \hfill -2& & & \hfill 0\\ 0\hfill & & & \hfill -1& & & \hfill 2\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill -1\\ \hfill -2\\ \hfill 3\end{array}\right]

\left[\begin{array}{ccccccc}2\hfill & & & \hfill -2& & & \hfill 0\\ 0\hfill & & & \hfill 2& & & \hfill -1\\ 3\hfill & & & \hfill 0& & & \hfill -1\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill -1\\ \hfill 2\\ \hfill -2\end{array}\right]

\left\{\begin{array}{c}2x-2y=-1\hfill \\ 2y-z=2\hfill \\ 3x-z=-2\hfill \end{array}

Use Row Operations on a Matrix

In the following exercises, perform the indicated operations on the augmented matrices.

\left[\begin{array}{cccc}6\hfill & & & \hfill -4\\ 3\hfill & & & \hfill -2\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill 3\\ \hfill 1\end{array}\right]

Interchange rows 1 and 2

Multiply row 2 by 3

Multiply row 2 by -2 and add row 1 to it.

\left[\begin{array}{cccc}4\hfill & & & \hfill -6\\ 3\hfill & & & \hfill 2\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill -3\\ \hfill 1\end{array}\right]

Interchange rows 1 and 2

Multiply row 1 by 4

Multiply row 2 by 3 and add row 1 to it.

\left[\begin{array}{ccccccc}3\hfill & & & \hfill 2& & & \hfill 1\\ 4\hfill & & & \hfill -6& & & \hfill -3\end{array}\right]

\left[\begin{array}{ccccccc}12\hfill & & & \hfill 8& & & \hfill 4\\ 4\hfill & & & \hfill -6& & & \hfill -3\end{array}\right]

\left[\begin{array}{ccccccc}12\hfill & & & \hfill 8& & & \hfill 4\\ 24\hfill & & & \hfill -10& & & \hfill -5\end{array}\right]

\left[\begin{array}{ccccccc}4\hfill & & & \hfill -12& & & \hfill -8\\ 4\hfill & & & \hfill -2& & & \hfill -3\\ -6\hfill & & & \hfill 2& & & \hfill -1\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill 16\\ \hfill -1\\ \hfill -1\end{array}\right]

Interchange rows 2 and 3

Multiply row 1 by 4

Multiply row 2 by -2 and add to row 3.

\left[\begin{array}{ccccccc}6\hfill & & & \hfill -5& & & \hfill 2\\ 2\hfill & & & \hfill 1& & & \hfill -4\\ 3\hfill & & & \hfill -3& & & \hfill 1\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill 3\\ \hfill 5\\ \hfill -1\end{array}\right]

Interchange rows 2 and 3

Multiply row 2 by 5

Multiply row 3 by -2 and add to row 1.

\left[\begin{array}{cccccccccc}\hfill 2& & & \hfill 1& & & \hfill -4& & & \hfill 5\\ \hfill 6& & & \hfill -5& & & \hfill 2& & & \hfill 3\\ \hfill 3& & & \hfill -3& & & \hfill 1& & & \hfill -1\end{array}\right]

\left[\begin{array}{cccccccccc}2\hfill & & & \hfill 1& & & \hfill -4& & & \hfill 5\\ 6\hfill & & & \hfill -5& & & \hfill 2& & & \hfill 3\\ 3\hfill & & & \hfill -3& & & \hfill 1& & & \hfill -1\end{array}\right]

\left[\begin{array}{cccccccccc}\hfill 2& & & \hfill 1& & & \hfill -4& & & \hfill 5\\ \hfill 6& & & \hfill -5& & & \hfill 2& & & \hfill 3\\ \hfill -4& & & \hfill 7& & & \hfill -6& & & \hfill 7\end{array}\right]

Perform the needed row operation that will get the first entry in row 2 to be zero in the augmented matrix: \left[\begin{array}{cccc}\hfill 1& & & \hfill 2\\ \hfill -3& & & \hfill -4\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill 5\\ \hfill -1\end{array}\right].

Perform the needed row operations that will get the first entry in both row 2 and row 3 to be zero in the augmented matrix: \left[\begin{array}{ccccccc}1\hfill & & & \hfill -2& & & \hfill 3\\ 3\hfill & & & \hfill -1& & & \hfill -2\\ 2\hfill & & & \hfill -3& & & \hfill -4\end{array}\phantom{\rule{0.5em}{0ex}}|\phantom{\rule{0.5em}{0ex}}\begin{array}{c}\hfill -4\\ \hfill 5\\ \hfill -1\end{array}\right].

\left[\begin{array}{cccccccccc}1\hfill & & & \hfill -2& & & \hfill 3& & & \hfill -4\\ 0\hfill & & & \hfill 5& & & \hfill -11& & & \hfill 17\\ 0\hfill & & & \hfill 1& & & \hfill -10& & & \hfill 7\end{array}\right]

Solve Systems of Equations Using Matrices

In the following exercises, solve each system of equations using a matrix.

\left\{\begin{array}{c}2x+y=2\hfill \\ x-y=-2\hfill \end{array}

\left\{\begin{array}{c}3x+y=2\hfill \\ x-y=2\hfill \end{array}

\left(1,-1\right)

\left\{\begin{array}{c}\hfill \text{−}x+2y=-2\\ x+y=-4\hfill \end{array}

\left\{\begin{array}{c}\hfill -2x+3y=3\\ x+3y=12\hfill \end{array}

\left(3,3\right)

In the following exercises, solve each system of equations using a matrix.

\left\{\begin{array}{c}2x-3y+z=19\hfill \\ \hfill -3x+y-2z=-15\\ x+y+z=0\hfill \end{array}

\left\{\begin{array}{c}2x-y+3z=-3\hfill \\ \hfill \text{−}x+2y-z=10\\ x+y+z=5\hfill \end{array}

\left(-2,5,2\right)

\left\{\begin{array}{c}2x-6y+z=3\hfill \\ 3x+2y-3z=2\hfill \\ 2x+3y-2z=3\hfill \end{array}

\left\{\begin{array}{c}4x-3y+z=7\hfill \\ 2x-5y-4z=3\hfill \\ 3x-2y-2z=-7\hfill \end{array}

\left(-3,-5,4\right)

\left\{\begin{array}{c}x+2z=0\hfill \\ 4y+3z=-2\hfill \\ 2x-5y=3\hfill \end{array}

\left\{\begin{array}{c}2x+5y=4\hfill \\ 3y-z=3\hfill \\ 4x+3z=-3\hfill \end{array}

\left(-3,2,3\right)

\left\{\begin{array}{c}2y+3z=-1\hfill \\ 5x+3y=-6\hfill \\ 7x+z=1\hfill \end{array}

\left\{\begin{array}{c}3x-z=-3\hfill \\ 5y+2z=-6\hfill \\ 4x+3y=-8\hfill \end{array}

\left(-2,0,-3\right)

\left\{\begin{array}{c}2x+3y+z=12\hfill \\ x+y+z=9\hfill \\ 3x+4y+2z=20\hfill \end{array}

\left\{\begin{array}{c}x+2y+6z=5\hfill \\ \hfill \text{−}x+y-2z=3\\ x-4y-2z=1\hfill \end{array}

no solution

\left\{\begin{array}{c}x+2y-3z=-1\hfill \\ x-3y+z=1\hfill \\ 2x-y-2z=2\hfill \end{array}

\left\{\begin{array}{c}4x-3y+2z=0\hfill \\ \hfill -2x+3y-7z=1\\ 2x-2y+3z=6\hfill \end{array}

no solution

\left\{\begin{array}{c}x-y+2z=-4\hfill \\ 2x+y+3z=2\hfill \\ \hfill -3x+3y-6z=12\end{array}

\left\{\begin{array}{c}\hfill \text{−}x-3y+2z=14\\ \hfill \text{−}x+2y-3z=-4\\ 3x+y-2z=6\hfill \end{array}

infinitely many solutions \left(x,y,z\right) where x=\frac{1}{2}z+4;y=\frac{1}{2}z-6;z is any real number

\left\{\begin{array}{c}x+y-3z=-1\hfill \\ y-z=0\hfill \\ \hfill \text{−}x+2y=1\end{array}

\left\{\begin{array}{c}x+2y+z=4\hfill \\ x+y-2z=3\hfill \\ \hfill -2x-3y+z=-7\end{array}

infinitely many solutions \left(x,y,z\right) where x=5z+2;y=-3z+1;z is any real number

Writing Exercises

Solve the system of equations \left\{\begin{array}{c}x+y=10\hfill \\ x-y=6\hfill \end{array} by graphing and by substitution. Which method do you prefer? Why?

Solve the system of equations \left\{\begin{array}{c}3x+y=12\hfill \\ x=y-8\hfill \end{array} by substitution and explain all your steps in words.

Answers will vary.

Self Check

After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

This table has 4 columns 5 rows and a header row. The header row labels each column I can, confidently, with some help and no, I don’t get it. The first column has the following statements: Write the augmented matrix for a system of equations, Use row operations on a matrix, Solve systems of equations using matrices, Write the augmented matrix for a system of equations, Use row operations on a matrix. The remaining columns are blank.

After looking at the checklist, do you think you are well-prepared for the next section? Why or why not?

Glossary

matrix
A matrix is a rectangular array of numbers arranged in rows and columns.
row-echelon form
A matrix is in row-echelon form when to the left of the vertical line, each entry on the diagonal is a 1 and all entries below the diagonal are zeros.

License

Icon for the Creative Commons Attribution 4.0 International License

Intermediate Algebra but cloned this time not imported Copyright © 2017 by OSCRiceUniversity is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book