Skip to main content
Mathematics LibreTexts

3.6: Augmented Matrices

  • Page ID
    82772
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    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:

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

    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{:}\)

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

    \[\begin{array} s\dfrac{3}{5}x-y &=\dfrac{1}{5}\\ x+y &= 3. \end{array} \nonumber \]

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

    \[\begin{array} s3x - 5y &= 1 \\ x+y &= 3. \end{array} \nonumber \]

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

    \[\begin{bmatrix} 3 & -5 & 1\\ 1 & 1 & 3 \end{bmatrix}. \nonumber \]

    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:

    \[\begin{bmatrix} 1& 0 & 2\\ 0 & 1 & 1 \end{bmatrix}. \nonumber \]

    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:

    \[\begin{array} sx + 0y &= 2 \\ 0x+y &= 1. \end{array} \nonumber \]

    or

    \[\begin{array} sx &= 2 \\ y &= 1. \end{array} \nonumber \]

    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?

    \[\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} \nonumber \]

    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

    \[\begin{array} sP_2(C)-P_2(D) &= 2P_2(D)\\ 1 &= P_2(C)+P_2(D). \end{array} \nonumber \]

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

    \[\begin{array} sP_2(C)-3P_2(D) &= 0\\ P_2(C)+P_2(D) &= 1. \end{array} \nonumber \]

    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.

    Exercise 3.6.1 : Solve a System of \(2\) Equations

    Solve the system of equations.

    \(\begin{array} s2x-2y &=6 \\ x+3y &=7 \end{array}.\)

    Exercise 3.6.2 : Solve Another System of \(2\) Equations.

    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{.}\)

    Exercise 3.6.3 : Solve a System of \(3\) Equations

    Consider the system of equations

    \(\begin{array} s4x+8y-4z&=4\\3x+8y+5z&=-11\\-2x+y+12z&=-17. \end{array}\)

    1. Set up the augmented matrix for this system.
    2. Use row reduction to find the solution.
    Exercise 3.6.4 : Solve Another System of \(3\) Equations

    Consider the system of equations

    \(\begin{array}s2x+y-4z&=10\\3x+5z&=-5\\y+2z&=7. \end{array}\)

    1. Set up the augmented matrix for this system.
    2. Use row reduction to find the solution.
    Exercise 3.6.5 : Even More Practice with \(3\) Equations

    Consider the system of equations

    \(\begin{array}sa+b-5c&=0\\-4a-b+6c&=0\\a+b+c&=1. \end{array}\)

    1. Set up the augmented matrix for this system.
    2. Use row reduction to find the solution.
    Exercise 3.6.6 : Now, a System with \(5\) Equations

    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}\)

    1. Set up the augmented matrix for this system.
    2. 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!


    This page titled 3.6: Augmented Matrices is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Jennifer A. Firkins Nordstrom via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.