topic badge
Middle Years

14.05 Matrices and simultaneous equations

Lesson

Now we know how to both represent information using matrices, and how to multiply using matrices we can look at how to solve simultaneous equations using matrices. 

Simultaneous equations can be solved graphically by finding a point of intersection, and algebraically using substitution or elimination methods. Now we will also look at how to solve them using matrices. 

First, we need to know how to correctly represent the information using matrices.

Take this pair of equations. They are both written consistently with the variables in alphabetical order on the left and the constants on the right of the equals symbol.

Using matrices we split up the system into $3$3 parts.

  • a coefficient matrix (containing the numbers in front of the pronumerals)
  • a variable matrix (also referred to as pronumerals)
  • an answer matrix (containing values on the other side of the equals sign)

To verify that this matrix representation is indeed equivalent, let's just quickly perform the multiplication.

And then knowing these are equal matrices, the elements $2x+3y$2x+3y must equal $16$16, and $-3x+y=-13$3x+y=13.  

Now that we have confirmed that this is the correct matrix representation for our system, let's look at how to solve it. 

Remember how for matrix equations, if $MX=C$MX=C, we can isolate matrix $X$X, by pre-multiplying both sides by the inverse of $M$M.  Hence  $X=M^{-1}C$X=M1C

This means we now need the inverse of  

Recall that 

$=$=
$=$=
$=$=
$=$=
$=$=
$=$=

So  $x=5$x=5, and $y=2$y=2.  And thus $\left(5,2\right)$(5,2) is the solution.

 

Practice questions

Question 1

Given the following linear equations:

$x+3y=23$x+3y=23

$4x+2y=32$4x+2y=32

  1. Express the system of equations in matrix form.

        $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$    
    $×$×
        $x$x    
        $y$y    
    $=$=
        $\editable{}$    
        $\editable{}$    
  2. Find the determinant of the coefficient matrix.

  3. Solve the system of equations using matrices.

        $x$x    
        $y$y    
    $=$= $\frac{1}{\editable{}}$1
        $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$    
    $\times$×
        $\editable{}$    
        $\editable{}$    
      $=$= $\frac{1}{\editable{}}$1
        $\editable{}$    
        $\editable{}$    
       
     
    $=$=  
        $\editable{}$    
        $\editable{}$    
       

Question 2

Given the following linear equations:

$4x+6y=23$4x+6y=23

$8x+12y=61$8x+12y=61

  1. Express the system of equations in matrix form.

        $\editable{}$ $6$6    
        $\editable{}$ $\editable{}$    
    $×$×
        $x$x    
        $y$y    
    $=$=
        $\editable{}$    
        $61$61    
  2. Calculate the determinant of the coefficient matrix.

  3. The determinant of the coefficient matrix is equal to zero. What can you conclude?

    The coefficient matrix does not have an inverse and there are multiple solutions for the system of equations.

    A

    The coefficient matrix has an inverse and there are multiple solutions for the system of equations.

    B

    The coefficient matrix has an inverse and there are no solutions for the system of equations.

    C

    The coefficient matrix does not have an inverse and there is no solution for the system of equations.

    D

Question 3

We have two numbers $x$x and $y$y, where $x>y$x>y.

Their sum is $42$42, while their difference is $16$16.

  1. Write two equations that describe the relationship between $x$x and $y$y in the form $ax+by=c$ax+by=c.

    Write each equation on the same line, separated by a comma.

  2. Express the system of equations in matrix form.

        $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$    
    $×$×
        $x$x    
        $y$y    
    $=$=
        $\editable{}$    
        $16$16    
  3. Calculate the determinant of the coefficient matrix.

  4. Solve the system of equations using matrices.

        $x$x    
        $y$y    
    $=$= $\frac{1}{\editable{}}$1
        $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$    
    $\times$×
        $\editable{}$    
        $\editable{}$    
      $=$= $\frac{1}{\editable{}}$1
        $\editable{}$    
        $\editable{}$    
       
     
    $=$=  
        $\editable{}$    
        $\editable{}$    
       

Applications

The rules of matrix algebra enable us to deal with some large and complicated sets of relations in a concise form of notation.

Systems of linear equations involving several variables can be written in matrix form. Manipulation of the resulting matrix equation is then an efficient way to obtain information about the solution set of the original equations.

Problems that arise in practical situations are usually expressed in words or possibly in the form of a diagram of some kind. The first step for a mathematical treatment is that of writing a set of (linear) equations that represent the given information using symbols for any unknown or variable quantities. 

Worked examples

Example 1

Last week Willard sold $9$9 washing machines, $3$3 refrigerators and $4$4 dishwashers for a total sales revenue of $\$10650$$10650. In the same period, Seeley sold $7$7 washing machines, $4$4 refrigerators and $5$5 dishwashers for a total of $\$10500$$10500

What information about the average selling price of each item can be deduced from this data?

We could say the number of items sold was $9+3+4+7+4+5=32$9+3+4+7+4+5=32 and the total revenue was $\$21150$$21150.

However, we are not given the individual prices of the items and perhaps would like to know more about these prices and not just the overall average price.

We can form two equations letting $w$w be the price of a washing machine, $r$r be the price of a refrigerator and $d$d be the price of a dishwasher.

$9w+3r+4d=10650$9w+3r+4d=10650
$7w+4r+5d=10500$7w+4r+5d=10500

In matrix form this is

In the last example, it was possible to find the inverse matrix however the matrix created here not in the format we are familiar with. When solving simultaneous equations algebraically one of the methods uses elimination to create coefficients of zero. When using matrices this is called a row-reduction algorithm.

We perform the same operations on this array as we would in attempting to solve the original equations simultaneously using algebra.

In the following tableau, we multiplied the first equation by $7$7 and the second equation by $9$9. After that, we took the first equation away from the second. These moves were followed by a sequence selected from the following list of allowable row operations:

  • two rows can exchange places
  • a row can be multiplied by a number
  • two rows can be added (subtracted)

The information in the last pair of rows is equivalent to the original equations. It says that if Willard had sold $15$15 washing machines and $1$1 dishwasher his sales revenue would have been $\$11100$$11100 and if Seeley had sold $15$15 refrigerators and $17$17 dishwashers, his revenue would have been $\$19950$$19950.

We appear to be not much closer to finding the solution. We can say, however, that the price of a washing machine is given by $w=\frac{1}{15}\left(11100-d\right)$w=115(11100d) and we can also say that the price of a refrigerator is given by $r=\frac{1}{15}\left(19950-17d\right)$r=115(1995017d). If we had a value for $d$d, the price of a dishwasher, we would be able to calculate the other two prices.

In fact given there are more unknown than equations, there are many solutions to the original pair of equations, one for each possible value of $d$d

 

Example 2

In Example $1$1 we found that there was not enough information available to find a unique solution. Suppose we are told that in addition to the sales made by Willard and Seeley, there were sales figures generated by Eleanor. She sold $3$3 washing machines, $3$3 refrigerators and $11$11 dishwashers for a total revenue of  $\$10650$$10650.

Going through the same steps as in Example $1$1, we construct an initial array and perform a series of row operations as shown below. We used a spreadsheet to partly automate the calculations. (It is easy to make errors when doing a large number of steps by hand.)

The row reduction steps that were used are shown to the right of the tableau.

The final three rows of the tableau correspond to the equations, equivalent to the original equations, 

$1w+0r+0d=700$1w+0r+0d=700
$0w+1r+0d=650$0w+1r+0d=650
$0w+0r+1d=600$0w+0r+1d=600

In other words, the average selling prices for the three items were:
washing machine    $\$700$$700
refrigerator               $\$650$$650
dishwasher               $\$600$$600

 

Matrix inverse

The matrix equation that we solved in Example $2$2 can be written

and to simplify the discussion we write this as $AX=Y$AX=Y where $A$A is the matrix of coefficients, $X$X is the column of unknown prices and $Y$Y is the column of revenues.

The matrix $A$A, in this case, has an inverse $A^{-1}$A1 with the property $A.A^{-1}=I$A.A1=I where $I$I is the $3\times3$3×3 identity matrix. If we could find $A^{-1}$A1, then we could perform the following steps in matrix algebra, leading to the solution of the problem.

$AX$AX $=$= $Y$Y
$A^{-1}AX$A1AX $=$= $A^{-1}Y$A1Y
$IX$IX $=$= $A^{-1}Y$A1Y
$X$X $=$= $A^{-1}Y$A1Y

 

In the case of a $2\times2$2×2 matrix, it is easy to write down the matrix inverse but this is much more difficult for a $3\times3$3×3 or larger matrix.

Technology can find matrix inverses if we wish but the algorithm used in the calculation of the inverse is really a version of the row-reduction algorithm shown above. So, for matrices larger than $2\times2$2×2, we may as well solve problems of this kind by row-reduction.

You should use technology where possible to check your solutions.

Using technology to find the the inverse of matrix $A$A , gives

.

 

 

Practice questions

Question 4

At a school canteen, students can order the Healthy snack which contains $4$4 pieces of fruit and $2$2 savoury snacks, or they can order the Yummy snack which contains $1$1 piece of fruit and $3$3 savoury snacks.

On a given day the canteen used $260$260 pieces of fruit and $140$140 savoury snacks.

  1. Let $h$h represent the number of Healthy snacks and $y$y represent the number of Yummy snacks. Construct an equation for the total amount of fruit used.

  2. Construct an equation for the total savoury snacks used.

  3. Represent your two equations using the matrices below.

        $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$    
    $\times$×
        $h$h    
        $y$y    
    $=$=
        $260$260    
        $\editable{}$    
  4. Use your graphing calculator and matrix inverse methods to determine the number of Healthy snacks and Yummy snacks made that day.

        $h$h    
        $y$y    
    =
        $\editable{}$    
        $\editable{}$    

Question 5

A company determines that they spend a total of $63$63 hours per week on various forms of advertising media. The amount of time spent on print media is $3$3 hours more than social and video media combined. $2$2 hours more is spent on video media than social media.

  1. Let $s$s, $v$v and $p$p represent the hours spent on social, video and print media respectively.

    Construct a set of linear equations to represent this information.

  2. Represent your equations using the matrices below.

        $\editable{}$ $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$ $\editable{}$    
    $\times$×
        $s$s    
        $v$v    
        $p$p    
    $=$=
        $63$63    
        $3$3    
        $2$2    
  3. Use your graphing calculator and matrix inverse methods to determine the number of hours each week spent on the three forms of advertising.

        $s$s    
        $v$v    
        $p$p    
    $=$=
        $\editable{}$    
        $\editable{}$    
        $\editable{}$    

What is Mathspace

About Mathspace