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\).
An example of a system of two lines:
\(\begin{array} sy &= \dfrac{3}{5}x-\dfrac{1}{5}\\ y &= -x+3. \end{array}\)
In the expected value method we had systems of three equations such as Example \(3.6.2\).
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{:}\)
\( \begin{array}sE_1(A) &= P_2(C)-P_2(D)\\ E_1(B) &= 2P_2(D)\\ 1 &= P_2(C)+P_2(D). \end{array}\)
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 \times 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
\[\begin{bmatrix} 1 & -3 & 0\\ 1 & 1 & 1 \end{bmatrix}. \nonumber \]
where the first column corresponds to \(P_2(C)\) and the second column corresponds to \(P_2(D)\text{.}\)
Using row reduction, we get
\[\begin{bmatrix} 1 & 0 & \dfrac{3}{4}\\ 0 & 1 & \dfrac{1}{4} \end{bmatrix}. \nonumber \]
Thus, recalling Column 1 is for \(P_2(C)\) and Column 2 is for \(P_2(D)\text{,}\) our solution is \(P_2(C)= \dfrac{3}{4} \text{,}\) and \(P_2(D)= \dfrac{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.
Solve the system of equations.
\(\begin{array} s2x-2y &=6 \\ x+3y &=7 \end{array}.\)
Solve the system of equations.
\(\begin{array} s4p_1-2p_2&=0 \\ p_1+p_2&=1 \end{array}.\)
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{.}\)
Consider the system of equations
\(\begin{array} s4x+8y-4z&=4\\3x+8y+5z&=-11\\-2x+y+12z&=-17. \end{array}\)
- Set up the augmented matrix for this system.
- Use row reduction to find the solution.
Consider the system of equations
\(\begin{array}s2x+y-4z&=10\\3x+5z&=-5\\y+2z&=7. \end{array}\)
- Set up the augmented matrix for this system.
- Use row reduction to find the solution.
Consider the system of equations
\(\begin{array}sa+b-5c&=0\\-4a-b+6c&=0\\a+b+c&=1. \end{array}\)
- Set up the augmented matrix for this system.
- Use row reduction to find the solution.
Consider the system of equations
\(\begin{array}s3x+2y-w-v&=0\\2x-y+3z+w+5v&=0\\x+2y+6z-w&=0\\ -y+z-3w+v&=0\\x+y+z+w+v&=1. \end{array}\)
- 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!