## Section 3.6 Augmented Matrices

¶In this section, we will see how to use matrices to solve systems of equations. In both the graphical method and the expected value method, you have had to solve a system of equations. In the graphical method you had systems consisting of two lines such as Example 3.6.1.

###### Example 3.6.1. Two Equations.

An example of a system of two lines:

In the expected value method we had systems of three equations such as Example 3.6.2.

###### Example 3.6.2. Three Equations.

An example of a system of three equations where the variables are \(E_1(A), E_1(B), P_2(C), P_2(D)\text{:}\)

In Example 3.6.2, even after setting \(E_1(A)=E_1(B)\) so that there were only 2 variables, the algebra began to get cumbersome. What if we wanted to solve a much larger game, such as a 5 X 5 game?

We've used matrices to represent our games, but now we want to use them as a mathematical tool to help us solve systems of equations. In order to use matrices to solve our systems of equations, we want to write all our equations in the same form: we will have all the variable terms on the left of the equals sign and all constants on the right.

Thus, in Example 3.6.1 we can write the system as

In fact, we can simplify the first equation by multiplying both sides by 5:

We can use the coefficients and constants to create a matrix:

In this matrix you have a column for the coefficients of each variable. So the coefficients of \(x\) are in the first column, the coefficients of \(y\) are in the second. The constant terms are always in the last column. Each row corresponds to one equation. This matrix is called an *augmented matrix*. It is really just a matrix, but we call it *augmented* if we include information from both sides of the equation (the coefficients and the constants).

The algebraic method for solving the system of equations (finding the \(x\) and \(y\) values that satisfy both equations) is called *row reduction*. It is based on the *elimination method* that you may have seen in a precalculus or college algebra course. We won't go through the algebra here, as we really don't need it. Since our goal is to be able to easily solve larger systems of equations, we will rely on technology to do the algebra.

Computer algebra systems such as *Sage*, *Mathematica*, and *Maple*, as well as graphing calculators, can easily do the row reduction for us.

On a graphing calculator, use the matrix function to enter the matrix. Then use the “rref” function (this stands for “reduced row echelon form”). The result will be the following matrix:

We can solve this even more directly using *Sage*.

Recall that the first column is for \(x\) and the second is for \(y\text{.}\) Each row represents an equation. So translating each row back to equations, we have the following system of equations:

or

By plugging these values back into the original equations, you can verify that this is in fact the solution.

Since the technology does all the algebra for us, our job is to translate the equations into an appropriate matrix and then translate the final matrix back into the solution to the system of equations. Remember, when using a matrix to solve a game, the matrix is only a tool, it is not the solution to the game.

Now, let's try the equations for the expected value method using Example 3.6.2. As presented, how many variables does the system have?

It has 4: \(E_1(A), E_1(B), P_2(C)\) and \(P_2(D)\text{.}\) But when we solved these equations, we set the expected values equal. This gives us the two equations

Now if we put these into the form with all variables on the left and constants on the right, we get

Putting these equations into an augmented matrix, gives us

where the first column corresponds to \(P_2(C)\) and the second column corresponds to \(P_2(D)\text{.}\)

Using row reduction, we get

Thus, recalling Column 1 is for \(P_2(C)\) and Column 2 is for \(P_2(D)\text{,}\) our solution is \(P_2(C)=3/4\text{,}\) and \(P_2(D)=1/4\text{.}\)

Here are some more systems of equations to practice solving using augmented matrices. If you want to use the above Sage cells just edit the values for each row in the cell.

###### Exercise 3.6.3. Solve a system of 2 equations.

Solve the system of equations.

###### Exercise 3.6.4. Solve another system of 2 equations.

Solve the system of equations.

For larger matrices, you can edit the Sage cell by adding additional terms in each row, and adding more rows. For example, you can replace \([3,-5,1],[1,1,3]\) with \([4,8,-4,4],[3,8,5,-11],[-2,1,12,-17]\text{.}\)

###### Exercise 3.6.5. Solve a system of 3 equations.

Consider the system of equations

Set up the augmented matrix for this system.

Use row reduction to find the solution.

###### Exercise 3.6.6. Solve another system of 3 equations.

Consider the system of equations

Set up the augmented matrix for this system.

Use row reduction to find the solution.

###### Exercise 3.6.7. Even more practice with 3 equations.

Consider the system of equations

Set up the augmented matrix for this system.

Use row reduction to find the solution.

###### Exercise 3.6.8. Now, a sytem with 5 equations.

Consider the system of equations

Set up the augmented matrix for this system.

Use row reduction to find the solution.

Now we are ready to apply everything we have learned about solving repeated zero-sum games to a much more challenging game in the next section!