This is a paragraph.

Word problems involving linear systems

If you are asked to solve the linear system

(1)   \begin{equation*} x+y=7 \end{equation*}

(2)   \begin{equation*} 2x-y=2, \end{equation*}

you will very easily accomplish this using any of the methods we considered before. What if the question was presented differently, in words, for example? It could be something like “Find two numbers whose sum is 7 and when the second number is subtracted from twice the first number gives 2”. Technically, the question hasn’t changed; it’s just the presentation or formulation — and the solver’s subsequent perception and interpretation — that may change.

As x and y begin to have physical “meanings”, the class of problems that a single pair of equations can model can be many.

Solution strategy

  1. ensure that you understand the question;
  2. identify the unknowns in the question (there will usually be two unknowns, since we’re dealing with linear systems in two variables);
  3. use letters to represent the two unknowns;
  4. formulate two linear equations based on the information provided in the question (this is a crucial step, and is one of the reasons you should endeavour to understand the question);
  5. solve the linear equations formulated in the previous step and interpret the solution.

In the examples below, our focus will be on step 4 (since we’ve already covered the three standard methods of solving linear systems: elimination, substitution, and graphing).

Word problems involving integers

Example 1

Mr. Monday is thinking of two numbers. If he adds them together he obtains 16. If he multiplies the smaller number by 3 and then subtracts the bigger number, he gets 12. What are the two numbers?

Let the two numbers be m and n. Assume that n is the smaller number. Since their sum is 16, we have that m+n=16. If we multiply n by 3, we’ll have 3n; then if we subtract m we’ll have 3n-m. According to the question, 3n-m=12, and so we have the linear system

(3)   \begin{equation*} n+m=16 \end{equation*}

(4)   \begin{equation*} 3n-m=12 \end{equation*}

whose solution is n=7,~m=9. Check that 7+9=16 and that 3\times 7-9=21-9=12. So, Mr. Monday was thinking of 7 and 9.

Example 2

The sum of the digits of a 3-digit number is 9. If the first and third digits are reversed, the number increases by 198. Find the 3-digit number, given that it’s middle digit is 3.

Let x and z be the other two digits. We’re already provided with the middle digit, so the number can take the form x3z, where x is the hundreds digit and z is the ones digit. We have that x+3+z=9, or x+z=6. So we have our first equation.
To get the second equation, first note that any 3-digit number abc is actually 100a+10b+c. With this in mind, our original number is 100x+10\times 3 + z=100x+30+z. When the first and third digits are reversed, the number becomes z3x, which is effectively 100z+10\times 3+x=100z+30+x. Since reversing the first and third digits increases the number by 198, we have that


that is, 99z-99x=198, or just z-x=2. Thus we have the linear system

(5)   \begin{equation*} z+x=6 \end{equation*}

(6)   \begin{equation*} z-x=2 \end{equation*}

whose solution is z=4,~x=2. The 3-digit number is 234. Check that 2+3+4=9, and 432-234=198.

Word problems involving costs

A certain store sells 2 pencils and 5 pens for 3 dollars, while 6 pencils and 1 pen are sold for 2 dollars. Find the cost of a pencil and the cost of a pen.

Let the cost of a pencil be c dollars and let the cost of a pen be n dollars. According to the question, the cost of 2 pencils and 5 pens is three dollars, so we have our first equation: 2c+5n=3. The cost of 6 pencils and 1 pen is two dollars, so we have our second equation: 6c+n=2. The resulting linear system is:

(7)   \begin{equation*} 2c+5n=3 \end{equation*}

(8)   \begin{equation*} 6c+n=2 \end{equation*}

whose solution is c=0.25,n=0.5. So the store sells a pencil for 25 cents and a pen for 50 cents.

Example 4

On a weekly basis, a STEM tutor normally spends seven hours tutoring both math and science, and makes 200 dollars overall. If the hourly charges for math and science are 30 and 25 dollars, respectively, determine the number of hours spent on each subject.

Let’s suppose that the STEM tutor spends m hours tutoring math and spends s hours tutoring science each week. Since the tutor spends 7 hours overall, we have that m+s=7. Since the hourly rate for math is 30 dollars, the total amount from math is 30m dollars each week; similarly, since the hourly rate for science is 25, the tutor makes 25s dollars from science tutoring. These amounts should add up to 200 dollars, so we have 30m+25s=200, and then the linear system:

(9)   \begin{equation*} m+s=7 \end{equation*}

(10)   \begin{equation*} 30m+25s=200 \end{equation*}

Notice that the second equation can be reduced to 6m+5s=40. Solving the above linear system we find that m=5 and s=2. So the tutor spends 5 hours tutoring math, and spends 2 hours tutoring science, each week.

Word problems involving coins

Example 5

If you have 30 coins made up of quarters and nickels, and the total value of your money is 5.5 dollars, how many quarters and how many nickels do you have?

Let the number of quarters be q, and let the number of nickels be n. Since you have 30 coins, it follows that n+q=30. Moreover, since a quarter is worth 25 cents and a nickel is worth 5 cents, the total value of your money, in cents, is 5n+25q. Therefore, 5n+25q=550 (we’ve converted 5.5 dollars to cents by multiplying it by 100). So we have the following linear system

(11)   \begin{equation*} n+q=30 \end{equation*}

(12)   \begin{equation*} 5n+25q=550,\quad\implies n+5q=110 \end{equation*}

Solving, we find that n=10 and q=20. So you have 10 nickels and 20 quarters.

Example 6

You have dimes and nickels that amount to 2 dollars. If the number of nickels is double the number of dimes, how many of each denomination do you have?

Let’s suppose that the numbers of dimes and nickels are d and n, respectively. A dime is worth 10 cents while a quarter is worth 25 cents; thus, in terms of d and n, your money’s worth 10d+5n, and this must equal 200 (again we’ve converted 2 dollars to cents), so 10d+5n=200. Also, the number of nickels is double the number of dimes, meaning that n=2d. We now have the linear system:

(13)   \begin{equation*} 10d+5n=200,\quad\textrm{or}~2d+n=40 \end{equation*}

(14)   \begin{equation*} 2d=n \end{equation*}

Solving, d=10 and n=20. So you have 20 nickels and 10 dimes.

Word problems involving distance, speed, and time

The relationship between speed, distance, and time is:


The above relationship, together with its re-arrangements, will be useful in solving problems relating to distance, speed, and time.

Example 7

A runner has 2 hours to complete the 15 km straight line distance from point A to point B, with a point M in between. From A to M, the runner averaged 12 km/h; from M to B, the runner averaged 6 km/h. Determine the distance from A to M, and the distance from M to B.

Let the distance from A to M be x, and let the distance from M to B be y. We first have x+y=15, since the distance from A to B is 15 km. Next, we have to take the total time into consideration. From A to M, the time taken is \frac{x}{12}, whereas \frac{y}{6} is the time taken from M to B. Since the journey took 2 hours to complete, we have that \frac{x}{12}+\frac{y}{6}=2. Then follows the linear system:

(15)   \begin{equation*} x+y=15 \end{equation*}

(16)   \begin{equation*} \frac{x}{12}+\frac{y}{6}=2 \end{equation*}

whose solution is x=6 and y=9. So the distance from A to M is 6 km, and the distance from M to B is 9 km.

Example 8

A boat traveled 240 miles downstream in 12 hours. The return journey took 48 hours. Find the speed of the boat in still water and the speed of the current.

Ignoring units, let the boat’s speed in still water be s, and let the speed of the current be c. While travelling downstream, the boat is supported by the current, so the “resultant” speed is actually s+c, which must equal \frac{240}{12}. Our first equation is therefore s+c=20. On the return journey, the boat is going against the current, so its “resultant” speed will be s-c, which must equal \frac{240}{48}; that is, s-c=5. We now have the linear system:

(17)   \begin{equation*} s+c=20 \end{equation*}

(18)   \begin{equation*} s-c=5 \end{equation*}

whose solution is s=12.5 and c=7.5. Thus, the boat’s speed is 12.5 miles per hour, while the current flows at 7.5 miles per hour.

Word problems involving mixtures (weighted averages)

In a sense, many of the previous examples also fall into this “mixture” category.

Example 9

A certain high school mandates that for each subject, students final mark should comprise t\% of their term average and e\% of the final exam mark. In a math course, a student who had a term average of 90 and an exam mark of 80 obtained a final mark of 87. Determine the values of t and e.

As you’ll recall, this is an example of how “weighted averages” are used to calculate your grades. According to the question, the final mark is obtained by taking t\% of the term average and taking e\% of the exam mark, then adding them together. In our case:

    \[\Big(\frac{t}{100}\times 90\Big) + \Big(\frac{e}{100}\times 80\Big)=87;\quad\textrm{or,}~9t+8e=870.\]

So far we only have one equation. The second information needed to obtain a second equation is somewhat implicit in the question: it is the fact percentages add up to 100, so t+e=100. Combining these two equations we obtain the linear system:

(19)   \begin{equation*} 9t+8e=870 \end{equation*}

(20)   \begin{equation*} t+e=100 \end{equation*}

whose solution is t=70 and e=30.

Example 10

You need to make 10 litres of a 20\% acid solution by mixing x litres of a 10\% acid solution with y litres of a 30\% acid solution. Determine the values of x and y.

Since you need 10 litres overall, it follows that x+y=10. Furthermore, 10\% of x plus 30\% of y should give 20\% of 10; that is, 0.1x+0.3y=2. The resulting linear system is:

(21)   \begin{equation*} x+y=10 \end{equation*}

(22)   \begin{equation*} 0.1x+0.3y=2 \end{equation*}

whose solution is x=5 and y=5. So you need 5 litres of the 10\% solution and 5 litres of the 30\% solution. We’re sure you won’t confuse the double use of “solution” in this example — as a chemistry term, and as a mathematical term.

Exercises for the reader

  1. Prove that if the digits of a two-digit number are reversed, then the number either increases or decreases by a multiple of 9.
  2. Prove that if the first and third digits of a three-digit number are reversed, then the number either increases or decreases by a multiple of 99.

Linear systems using substitution

Another systematic method for solving linear systems is the substitution method. In a sense, it is very similar to the elimination method that we considered earlier, just that it implements its own elimination differently.

Given a general linear system of the form

(1)   \begin{equation*} ax+by=c \end{equation*}

(2)   \begin{equation*} dx+ey=f \end{equation*}

the substitution method proceeds as follows:

  1. isolate either x or y from equation (1) or equation (2) — choose an equation where it is easier to isolate the variable, usually an equation where the coefficient of the variable is \pm 1 or some other number that is convenient to handle;
  2. substitute the isolated variable into the other equation to obtain a single linear equation in one variable. Don’t make the mistake of substituting into the same equation from where you isolated the variable (why?);
  3. solve the resulting one-variable linear equation from step 2 above;
  4. use your answer from step 3 to obtain the value of the other variable, preferably using the isolated equation from step 1.

Example 1

Solve the linear system

(3)   \begin{equation*} x+2y=5 \end{equation*}

(4)   \begin{equation*} 7x-5y=-3 \end{equation*}

using substitution method.

We first decide on which variable to isolate. Clearly, this will be x, because it has a coefficient of 1 in equation (3). (Obviously, nothing stops us from isolating y instead, just that in this case, we’ll have to play around with the fraction it brings.)

So, from equation (3), we have

(5)   \begin{equation*} x=5-2y \end{equation*}

Next, we substitute the right side of this equation (5) (namely 5-2y) for x in equation (4):


the expression in the box being the replacement/substitute for x. We now have a linear equation in one variable, which can be easily solved:

It now remains to find x. Since we already isolated x as seen in equation (5), that’s the most convenient equation to use. So, putting y=2 there gives

    \[x=5-2\boxed{2}=5-2\times 2=5-4=1.\]

Finally, we check that our solution satisfies the original equations (3) and (4):



Example 2

Use substitution method to solve the linear system

(6)   \begin{equation*} 2x+3y=-7 \end{equation*}

(7)   \begin{equation*} 5x-y=-26 \end{equation*}

Since it’s easier to isolate y from equation (7), that’s what we’ll do. So, using equation (7), we have:

(8)   \begin{equation*} -y=-26-5x,\quad\implies y=26+5x \end{equation*}

Next, substitute 26+5x for y in equation (6):


We’re using box to emphasize the substitution. Continuing the simplification:
2x+78+15x &=-7\\
17x &=-7-78\\
17x &=-85\\

To find y, we use equation (8):


Therefore, the solution is x=-5,~y=1.

Example 3

Solve the linear system

(9)   \begin{equation*} 3x+7y=-17 \end{equation*}

(10)   \begin{equation*} 7x-13y=19 \end{equation*}

using substitution method.

Which variable should we first isolate in this case? The answer is either x or y. Whichever one is chosen, we’ll still have to deal with the fractions that come with it. Actually, we should expect to come across fractions in our linear-systems-by-substitution-journey (or more generally, in our arithmetical journey).

Say we decide to isolate x from equation (9):

(11)   \begin{equation*} x=\frac{-17-7y}{3} \end{equation*}

Then we substitute the right side of equation (11) for x in equation (10), obtaining
\boxed{\frac{-17\times 7-7y\times 7}{3}}-13y &=19\\
\boxed{\frac{-119-49y}{3}}-13y &=19\\
3\Big(\frac{-119-49y}{3}\Big)-3(13y) &=3(19)\\
-119-49y-39y &=57\\
-49y-39y &=57+119\\
-88y &=176\\
y &=\frac{176}{-88}=-2

To get x we use equation (11):


Thus, the solution to our linear system is x=-1, y=-2.

Example 4

Find the point of intersection of the lines

(12)   \begin{equation*} x-2y=3 \end{equation*}

(13)   \begin{equation*} 3x-6y=4 \end{equation*}

using substitution method.

From equation (12) we isolate x:

(14)   \begin{equation*} x=3+2y \end{equation*}

and then substitute the right side of equation (14) for x in equation (13):
3\boxed{3+2y}-6y &=4\\
9+6y-6y &=4\\
Since 9\neq 4, the last line above is a contradiction. Since we arrived at a contradiction, the system is inconsistent and so the two lines do not intersect.

Example 5

Use substitution to solve the linear system

(15)   \begin{equation*} 3x-2y=23 \end{equation*}

(16)   \begin{equation*} 21x-14y=161 \end{equation*}

We begin by isolating x from equation (15):

(17)   \begin{equation*} x=\frac{2y+23}{3} \end{equation*}

Then we substitute the right side of equation (17) for x in equation (16):
which is always true. Since we obtained an identity, the linear system has infinite number of solutions. The two lines coincide.

Example 6

Divide 32 into two parts such that one part is 25\% of the other.

Let’s apply substitution technique to solve the above problem, although it can be solved easily by a different means. So, let the two parts be x and y. We have the following linear system

(18)   \begin{equation*} x+y=32 \end{equation*}

(19)   \begin{equation*} x=25\% y, \quad\implies x=\frac{1}{4}y,\quad\implies y=4x \end{equation*}

Substituting y=4x in equation (18) gives x+4x=32, and so x=\frac{32}{5}=6.4. Then y=4\times \frac{32}{5}=\frac{128}{5}=25.6. Therefore, the two parts are 6.4 and 25.6. (Check that 6.4+25.6=32 and that 6.4=\frac{1}{4}\times 25.6.)

Example 7

Fifty six coins, comprising entirely of nickels and quarters, add up to six dollars. Determine the number of nickels and the number of quarters.

Sometimes it is useful to choose variables that are somewhat related to what we want. So, let the number of nickels be n and let the number of quarters be q. Since there are fifty six coins, we have n+q=56. Since a nickel is 5 cents and a quarter is 25 cents, we have that 5n+25q=600. Notice how we changed six dollars to six hundred cents, for convenience.

(20)   \begin{equation*} n+q=56 \end{equation*}

(21)   \begin{equation*} 5n+25q=600,\quad\implies n+5q=120 \end{equation*}

Isolate n from equation (20):

(22)   \begin{equation*} n=56-q \end{equation*}

Substitute the right side of equation (22) for n in equation (21):
Since we obtained n=40 and q=16, it follows that there are 40 nickels and 16 quarters. Check that 40+16=56 and that 40\times 0.05 + 16\times 0.25=2+4=6.

Digression: Using substitution to balance chemical equations

You may have come across balancing chemical equations if you’ve taken a course on chemistry before. The procedure is usually by trial-and-error, but it is also possible to use linear systems especially for more complex chemical equations where the trial-and-error method is inconvenient.

Example 8

Balance the chemical equation

(23)   \begin{equation*} \ce{KClO3 -> KCl + O2} \end{equation*}

Obviously, we can easily balance the above equation by trial-and-error. We’ve chosen such a simple example for the purpose of illustration.

Begin by assigning arbitrary coefficients to the reactants and products:

    \[\ce{xKClO3 -> yKCl + zO2}\]

and then compare coefficients of like atoms.
\textrm{Potassium, K}: x&=y\\
\textrm{Chlorine, Cl}: x&=y\\
\textrm{Oxygen, O}:3x&=2z
From the last equation, we have z=\frac{3}{2}x. Since z should be an integer, x has to be a multiple of 2. In particular, x=2, because we have to choose the minimum possible value. In turn, z=\frac{3}{2}2=3. And then, y=2 because x=y. Putting these values into equation (23) we obtain the balanced equation

    \[\ce{2KClO3 -> 2KCl + 3O2}\]

Example 9

Balance the chemical equation

(24)   \begin{equation*} \ce{Na + H2O -> NaOH + H2} \end{equation*}

As before, we assign arbitrary coefficients to the reactants and products:

    \[\ce{xNa + yH2O -> zNaOH + wH2}\]

and then equate the coefficients of like atoms:
\textrm{Sodium, Na}: x&=z\\
\textrm{Hydrogen, H}: 2y&=z + 2w\\
\textrm{Oxygen, O}: y&=z\\
2y&=y+2w ~(\textrm{putting} ~y=z~\textrm{in}~2y=z+2w)\\
z&=2w ~(\textrm{because} ~y=z)\\
x&=2w ~(\textrm{because} ~x=z)
So we have y=2w,~x=2w,~z=2w. Whatever positive integer value is assigned to w, the values of x,y,z will all be integers. We choose the minimum possible value of w, namely 1.
x&=2w=2\times 1=2\\
y&=2w=2\times 1=2\\
z&=2w=2\times 1=2
Substituting these values in equation (24), we obtain

    \[\ce{2Na + 2H2O -> 2NaOH + H2,}\]

which is now balanced.

Example 10

Balance the chemical equation

(25)   \begin{equation*} \ce{NaHCO3 -> Na2CO3 + H2O + CO2} \end{equation*}

Begin by assigning arbitrary coefficients to the reactants and products:

    \[\ce{xNaHCO3 -> yNa2CO3 + zH2O + wCO2}\]

and then compare coefficients of like atoms:
\textrm{Sodium, Na}: x&=2y\\
\textrm{Hydrogen, H}: x&=2z\quad\textrm{so}~2y=2z~\textrm{or}~y=z\\
\textrm{Carbon, C}: x&=y+w\quad\textrm{so}~2y=y+w~\textrm{or}~2y-y=w\\
\textrm{Oxygen, O}: 3x&=3y+z+2w\\
x&=2y,\quad y=z,\quad y=w
We choose y=1 and obtain
x&=2y=2\times 1=2\\
Returning to equation (25), the balanced equation is

    \[\ce{2NaHCO3 -> Na2CO3 + H2O + CO2}.\]

Don’t worry about the last three examples, especially if you’re still in grade 10 and won’t take chemistry in future.