Often the most difficult part of solving a system of equations problem is writing out the system from a word description. In this FAQ, we look at a complicated sounding problem and form a system of linear equations from the problem.
Let’s look at the problem below.
A knitting shop orders yarn from three suppliers in Toronto, Montreal, and Victoria. One month the shop ordered a total of 109 boxes of yarn from these suppliers. The delivery costs were 77 dollars. 45 dollars. and 63 dollars per box for the orders from Toronto, Montreal, and Victoria respectively, with total delivery costs of 6355 dollars. The shop ordered the same amount from Toronto and Victoria. How many boxes were ordered from each supplier?
When beginning a problem involving systems of equations, we need to define the variables in the problem. In this problem, we are looking for the number of boxes ordered from each location. With this in mind, we define
T: number of boxes ordered from Toronto
M: number of boxes ordered from Montreal
V: number of boxes ordered from Victoria
There are several pieces of information we can use to write out equations. The information “the shop ordered a total of 109 boxes of yarn from these suppliers” gives us
This information is distinguished by the fact that it is a total involving the variables.
Let’s look for another piece of information involving a total. The problem also gives the total delivery costs, 6355 dollars. We can use this to write out another equation if we can write out the delivery costs to each supplier. If a single box costs 77 dollars to deliver to Toronto, T boxes will cost 77T dollars to deliver to Toronto. Following this pattern, we write out
77T: cost to deliver T boxes to Toronto
45M: cost to deliver M boxes to Montreal
63V: cost to deliver V boxes to Victoria
This means to shipping costs to each city is related to the total costs by
The final equation may be written using the information, “The shop ordered the same amount from Toronto and Victoria”. This tells us that
If we put all of these equations together, we get the system of linear equations,
Move the variables to the left side of the equation to prepare the system for solving. This gives the system,
The most common mistakes in solving problems with systems of linear equations is in setting up the problem in the first place. In the example below, note how the variables are defined carefully so that the difference between amounts of money invested is distinguished from amounts of interest.
Example Katherine Chong invests 10,000 dollars received from her grandmother in three ways. With one part, she buys US savings bonds at an interest rate of 2.5% per year. She uses the second part, which amounts to twice the first, to buy mutual funds that offer a return of 6% per year. She puts the rest of the money into a money market account paying 4.5% annual interest. The first year her investments bring a return of 470 dollars. How much did she invest in each way?
Write Out The Equations
For any problem like this, we want to determine what the variables are and what they represent. Since the question asks, “How much did she invest in each way?”, let’s define
B: amount invested in bonds
F: amount invested in mutual funds
M: amount invested in money market account
How do these amounts relate to the other key totals given in the problem?
A total of 10,000 dollars invested.
The amount of invested in mutual funds is twice that invested in savings bonds.
The total return from the investments is 470 dollars.
We need to use the three facts to write out three equations in the three variables. Let’s look at each of the three facts.
A total of $10,000 invested
Since the variables represent the amounts invested, this statement simply says that the sum of the variables is 10,000 or
B + F + M = 10000
This type of fact is usually the easiest to write as an equation.
The amount of invested in mutual funds is twice that invested in savings bonds
Let’s identify the variables in this statement:
If we now translate this to a mathematical equation, we get
F = 2B
The total return from the investments is $740
To calculate the return on an investment, we need to multiply the percent return as a decimal times the amount invested at that percent. For instance, if B dollars are invested in bonds returning 2.5% per year then the amount returned from that investment in a year is .025 B. If we apply this thinking to each investment, we get that
.025B + .06F + .045M = 470
Now that we have three equations in three unknowns, let’s write out the system:
Rewrite the second equation by subtracting 2B from both sides:
Solve for Variables
We solve this system so that it looks like
where ?? are different numbers. To put in this form, we’ll utilize row operations. We’ll begin by making sure the coefficient on B in the first equation is a 1. Since it is, we do not need to use a row operation to make it so.
Now we’ll eliminate B from the second and third equations using the first equation. Use the operations
2E1 + E2 → E2
-.025E1 + E3 → E3
Let’s examine the first carefully:
Now the second operation
Writing out the operations makes them easier to check later on. Rewriting the system after these operations leaves us with
Notice that the first equation has a 1 in front of the first variable and the same variable has been eliminated from the other equations.
Now let’s make the coefficient on the second variable in the second equation equal to 1 using ⅓E2 → E2. The system is now
To eliminate F from the third equation, carry out -.035E2 + E3 → E3. Carrying out this operation gives us
Now let’s eliminate F from the first equation with -1E2 + E1 → E1 . Now the system is
Notice that these last few steps put a 1 in front of the second variable in the second equation and eliminate F in the other equations.
The last step in putting the system in echelon form is to make the coefficient on the third variable in the third equation a 1. To do this, -300E3 → E3. After multiplying the last equation, we have
Now let’s eliminate M from the first and second equation,
-⅔E3 + E2 → E2
-⅓E3 + E1 → E1
This means $2000 must be invested in bonds, $4000 in mutual funds, and $4000 in the money market account. As it should, the amounts add to $10,000 and there is twice as much in mutual funds as bonds. The total annual return is
The solution meets all of the requirements of the problem so it must be correct (unless we misinterpreted those requirements).
Note that we could solve the original system with matrices also and end up with the same solution.
What if the problem had said something like
The return on mutual funds is twice the return on savings bonds.
The amount of invested in mutual funds is twice that invested in savings bonds
Our problem above dealt with amounts invested…this new wording indicates a relationship between the returns. The rate on mutual funds is 6% so the return would be .06F. THe rate on bonds is 2.5% so the return would be .025B. Then this information is written in equation form as
.06F = 2 (.025B)
In this case, this would replace the second equation in the system.
Some of the most interesting problems to solve are problems that lead to a system of linear equations where there are more variables than equations. Typically, these systems have many possible equations. Figuring out which of those solutions make sense and which do not is challenging.
Here is one such example
A restaurant owner orders a replacement set of knives, fork, and spoons. The box arrives containing 40 utensils and weighing 141.3 ounces (ignoring the weight of the box). A knife, fork, and spoon weigh 3.9 ounces, 3.6 ounces, and 3.0 ounces, respectively.
How many knives, forks and spoons are in the box?
Since we are being asked to find the number of knives, forks, and spoons, let’s make the following designations:
K: number of knives
F: number of forks
S: number of spoons
The first thing to notice is that you are given a total number of utensils (40) and a total weight for the utensils (141.3 ounces). These are the prime candidates for writing out the equations.
Total number of utensils = 40
It is fairly obvious that
K + F + S = 40
Total weight of utensils = 141.3
We can deduce that the individual weights are
Weight of knives = 3.9 K
Weight of forks = 3.6 F
Weight of spoons = 3.0 S
3.9 K + 3.6 F + 3.0 S = 141.3
Now what? Your experience in these sections probably tells you that you need another equation in the three unknowns to be able to solve for K, F, and S. This is true if there is a unique solution to this problem. But this problem actually has many possible solutions (ie. There are many ways to have 40 utensils that weigh 141.3 ounces).
So let’s simply solve the problem as is with Gauss-Jordan elimination:
K + F + S = 40
3.9 K + 3.6 F + 3.0 S = 141.3
Start by converting this to an augmented matrix:
To put into row echelon form, let’s multiply the first row by -3.9 and add it to the second row. Put the result in row 2:
To make the first nonzero number in the second row a 1, multiply the entire row by 1/-0.3 and replace the second row with that result:
This is now in row echelon form. It is almost as if there was a third row in the matrix, but it is all zeros.
With one more row operation, we can put the system in reduced row echelon form.
Converting this back to a system of equations, we get
K – 2S = -9
F + 3S = 49
To get our solutions, the first equation for K and the second equation for F:
K = 2S – 9
F = -3S+49
This is pretty easy to do since the system was in reduced row echelon form.
The variable S can be any value that makes sense for the problem. For instance, we certainly know that S (the number of spoons) should be non-negative integers like S = 0, 1, 2, … If we make up a table, we can make some interesting observations:
We need the numbers of each type of utensil to be positive…to do that we’ll require the number of spoons to beS = 5, 6, 7, …, 16. So even though the system has an infinite number of solutions, only certain ones make sense. In other words, any ordered triple of the form (K, F, S) = (2S – 9, -3S + 49, S) as long asS is an integer from 5 to 16.
Solving this system with substation or elimination leads to 0 = 0. This is a signal that there are an infinite number of solutions. This does not mean that ANY ordered pairs will solve the system. Only certain combinations of x and y will work. You need a way of finding any of those solutions. There are two ways to do this.
Method 1: Start with one of the equations (it does not matter which one) like 2x + 3y = 3. Solve this equation for x: 2x = -3y + 3 and then
If you have a value for y, this gives you a corresponding value for x. For instance, if y = 1, the corresponding x value is x = 0. This gives us one possible solution, (0, 1). If y = -1, then x = 3 giving us (3, -1). In general, we can write all solutions out as
Picking any value for y will give you a corresponding value for x which solves the system.
Method 2: What if we were to take 2x + 3y = 3 and solve for y. In this case we would get . If we were to pick values for x, we get corresponding values for x. For instance, if x = 0 we get y = 1 or the ordered pair (0, 1). Notice that this is one of the same ordered pairs as in Method 1. Let’s try another value for x, x = 3. When we put this into we get y = -1. This gives the same ordered pair, (3, -1), as Method 1. In general, we can write out all possible solutions as
Both ways of writing the solution give the same ordered pairs. In Method 1, you pick a value for y and find the corresponding x value. In Method 2, you pick a value for x and find the corresponding y value. Since the values you pick can be anything, this gives the infinite number of ordered pairs that solve the system.
In an earlier FAQ, I mentioned that there was a second strategy for solving the Sony Math Problem. Recall the basic problem:
In December of 2014, Sony released the movie The Interview online after threats to theaters cancelled the debut in theaters. As originally reported in Wall Street Journal, the sales figures reported in January contained an interesting math problem appropriate for algebra students.
The following January, Sony reported sales of $31 million from the sales and rentals of The Interview. They sold the movies online for $15 and rented through various sites for $6. If there were 4.3 million transactions, how many of the transaction were sales of the movie and how many of the transactions were rentals?