Skip to main content
Logo image

Just Enough Algebra 2026 Edition

Section 4.2 Systems of linear equations

Earlier in this book, we’ve encountered several stories where we want to make a choice between several different options, where each option has a different linear equation attached. In this section we’ll learn how to use our solving skills to quickly compare multiple options and make good decisions.

Subsection Comparing two lock machines

A local factory produces small locks for industrial use. The old machine has seen better days and Quia Xun, the manager, is shopping around for a new machine. She’s narrowed it down to two options. The first option is replace the old machine with a new model (Machine 1) for $3,200. The second is a larger machine (Machine 2) priced at $5,400. In each case, the price includes installation and the standard service contract. The reason she is considering the more expensive machine is Machine 2 runs at a cost of only $0.80 per lock, whereas the replacement Machine 1 runs at a cost of $1.25 per lock.

Opening Activity 4.2.1.

Before we do anything fancy with any of these numbers, let’s pause for a second and just think about the situation. Without doing any calculations, write a sentence or two explaining your thinking about each of the questions below.
  1. If Quia Xun is only planning to make a few locks, which machine do you think is a better choice? Why?
  2. If Quia Xun is planning to make a whole bunch of locks, which machine do you think is a better choice? Why?
Since Machine 1 is less expensive, Quia Xun knows it is the right choice if the factory only produces a small number of locks. But since Machine 2 costs less per lock to run, she knows it will pay off if the factory makes a large number of locks. She would like to understand the total expenditure better, particularly the number of locks at which it would be worthwhile to invest in the more expensive machine.
Since Quia Xun is interested in how the total expenditure, including both the purchase price and the running cost, depend on the number of locks produced, the variables are
\begin{align*} L \amp= \text{ amount produced (locks) } \sim \text{ dep} \\ E \amp= \text{ total expenditure (\$) } \sim \text{ indep} \end{align*}
She recognizes that total expenditure is a linear function that depends on the purchase price and the running cost for each machine. In each case, the starting amount (intercept) is the purchase price: $3,200 for Machine 1 and $5,400 for Machine 2. The slope (rate of change) is the constant running cost: $0.80 per lock for Machine 1 and $1.25 per lock for Machine 2. Using the template for a linear equation
\begin{equation*} \text{dep }=\text{ start } + \text{ slope} \ast {\text{indep}} \end{equation*}
she writes the equations
\begin{align*} \textbf{Machine 1: } \qquad E\amp= 3{,}200 + 1.25 L \\ \textbf{Machine 2: } \qquad E\amp= 5{,}400 + 0.80 L \end{align*}
Since there are two linear equations and we are interested in a comparison, we have a system (of linear equations).

Activity 4.2.2.

Madison wants to buy a new car, either Car A: a hybrid priced at $26,100, or Car B: a high-efficiency gas car priced at $23,700. Annual fuel costs for Car A are currently $1,100 per year. For Car B annual fuel costs are currently $1,800 per year. The total cost of each car will depend on how many years she keeps it.
  1. Name the variables, including units.
    letter = everyday words (units) ~ dep or indep
    = \(\qquad\qquad\qquad\qquad\qquad\) \(\displaystyle\Big(\qquad\Big)\) ~
    = \(\displaystyle\Big(\qquad\Big)\) ~
  2. Write a linear equation for the total cost (including purchase price and fuel costs) of Car A as a function of how long she keeps it. Assume fuel costs are constant.
  3. Write a linear equation for the total cost (including purchase price and fuel costs) of Car B as a function of how long she keeps it. Assume fuel costs are constant.
To begin the comparison, Quia Xun starts with figuring out what the expenditure to produce 2,000 locks would be for each machine.
\begin{align*} \textbf{Machine 1: } \qquad E\amp= 3{,}200 + 1.25 \times \underline{2{,}000}=\$5{,}700 \\ \textbf{Machine 2: } \qquad E\amp=5{,}400 + 0.80 \times \underline{2{,}000}=\$7{,}000 \end{align*}
If the factory were only going to make only 2,000 locks, then Machine 2 would not be worth it. She calculates a few more examples to see what the cutoff would be.
\(L\) 2,000 4,000 6,000 8,000 10,000
Machine 1: \(E\) 5,700 8,200 10,700 13,200 15,700
Machine 2: \(E\) 7,000 8,600 10,200 11,800 13,400
Even at 4,000 locks, Machine 1 is the better deal. By 6,000 locks, Machine 2 becomes the better deal. Somewhere in between it switches.
Quia Xun makes a quick graph to see what’s going on. On the graph, whichever line is lower corresonds to the lower total expenditure and whichever line is higher corresponds to the higher total expenditure. As suspected, for a smaller number of locks the line for Machine 1 is lower on the graph, so that’s the better deal. For a larger number of locks it switches and the line for Machine 2 is lower on the graph, since that’s the better deal instead. Where they switch corresponds to the point on the graph where the two lines cross, somewhere around 5,000 locks.
Total expenditure as a function of number of locks produced
Figure 4.2.1. \(E\) = total expenditure, as a function of \(L\) = number of locks produced
A quick successive approximation narrows down the answer.
\(L\) 4,000 6,000 5,000 4,500 4,800 4,900
Machine 1: \(E\) 8,200 10,700 9,450 8,825 9,200 9,325
Machine 2: \(E\) 8,600 10,200 9,400 9,000 9,240 9,320
Less expensive option Machine 1 Machine 2 Machine 2 Machine 1 Machine 1 Machine 2
So the choice changes somewhere between 4,800 and 4,900 locks.

Activity 4.2.3.

Madison wants to buy a new car, either Car A: a hybrid priced at $26,100, or Car B: a high-efficiency gas car priced at $23,700. Annual fuel costs for Car A are currently $1,100 per year. For Car B annual fuel costs are currently $1,800 per year. The total cost of each car will depend on how many years she keeps it.
Use successive approximation to approximate the payoff time, or the number of years for which the total costs of each car are equal. Figure out your answer accurate to the nearest half-year.
(indep)                                                                                                            
(Car A)
(Car B)
A / B cheaper?

Subsection Figuring out the differences

We could certainly keep doing successive approximation and get as close as we wanted to the “breakeven point” where Machine 2 becomes cheaper than Machine 1. Quia Xun thinks this is tedious, though. She decides to think a bit harder about the differences between the two machines.
There are two important differences between the two machines: their purchase prices and their cost per lock. First, Quia Xun decides to figure out the difference between the two purchase prices:
\begin{equation*} \$5{,}400 - \$3{,}200 = \$2{,}200\text{.} \end{equation*}
This calculation tells her that Machine 2 costs $2,200 more to purchase than Machine 1.
Next, she decides to figure out the difference between the two running costs:
\begin{equation*} 1.25\, \dfrac{\text{\$}}{\text{lock}} - 0.80\, \dfrac{\text{\$}}{\text{lock}} = 0.45\, \dfrac{\text{\$}}{\text{lock}} \text{.} \end{equation*}
This calculation tells her that Machine 1 costs $0.45 more per lock to operate than Machine 2.
But Quia Xun is more interested in total expenditure ($) than running costs per lock. So, she writes:
\begin{equation*} 1.25\, \dfrac{\text{\$}}{\cancel{\text{lock}}} \ast L \cancel{\text{locks}}- 0.80\, \dfrac{\text{\$}}{\cancel{\text{lock}}} \ast L \cancel{\text{locks}} = 0.45\, \dfrac{\text{\$}}{\cancel{\text{lock}}} \ast L \cancel{\text{locks}}\text{.} \end{equation*}
See the fancy unit work here? Simplifying, she finds out that when producing \(L\) locks, Machine 1 costs \(0.45L\) more dollars to run than Machine 2.
A couple of things to notice here. See how in both calculations she decided to do the larger minus the smaller? It doesn’t really matter, but Quia Xun likes working with positive numbers a bit better than working with negative numbers, and this is a way she can easily avoid them. Also, notice that she didn’t do
\begin{equation*} \$3{,}200 - 0.80\, \dfrac{\text{\$}}{\text{lock}}\text{.} \end{equation*}
That wouldn’t make sense, because the numbers $3,200 and $0.80 / lock mean very different things in the story.

Activity 4.2.4.

Madison wants to buy a new car, either Car A: a hybrid priced at $26,100, or Car B: a high-efficiency gas car priced at $23,700. Annual fuel costs for Car A are currently $1,100 per year. For Car B annual fuel costs are currently $1,800 per year. The total cost of each car will depend on how many years she keeps it.
  1. Find the difference between the two purchase prices, including units. Write a sentence explaining what your calculation means about the two cars.
  2. Find the difference between the two fuel costs, including units. (Don’t forget “per year”!) Write a sentence explaining what your calculation means about the two cars.
  3. Multiply by the number of years (which is a variable you named earlier!) to cancel out the “per year.” Write a sentence explaining what your calculation means about the two cars.
  4. Would it make sense to compute \(26{,}100 - 1{,}800\text{?}\) Why or why not?

Subsection Solving symbolically

There is a way for Quia Xun to solve the problem symbolically; we refer to this process as solving the system. She wants to find the number of locks where
\begin{equation*} E=E\text{.} \end{equation*}
That sounds silly, so let’s be a bit more specific: she wants to find the number of locks where
\begin{equation*} E \text{ (for Machine 1)} = E \text{ (for Machine 2)}\text{.} \end{equation*}
Using her equations \(E =3{,}200 + 1.25L\) for Machine 1 and \(E =5{,}400 + 0.80L\) for Machine 2, she has
\begin{equation*} 3{,}200 + 1.25L=5{,}400 + 0.80L\text{.} \end{equation*}
Thinking back to the differences that she computed earlier, Quia Xun subtracts \(0.80L\text{,}\) the smaller of the two dollar amounts for running the machine, from each side to get

Aside

\begin{equation*} \begin{array}{lcrclcr} 3{,}200 \amp + \amp 1.25L \amp = \amp 5{,}400 \amp + \amp \cancel{0.80L} \\ \amp - \amp 0.80L \amp \amp \amp - \amp \cancel{0.80L} \end{array} \end{equation*}
which simplifies to
\begin{equation*} 3{,}200 + 0.45L = 5{,}400\text{.} \end{equation*}
Pause for a minute. What does that \(0.45L\) mean in the story? It’s the extra cost of running Machine 1, which Quia Xun computed earlier.
What next? Now that she only has the variable \(L\) occurring in one place, it’s just like solving a linear equation like we’ve done before! The evaluating steps that are happening are, first multiply by 0.45, and then add 3,200. So all Quia Xun has to do is apply the Shoes and Socks Principle. First she subtracts 3,200 from both sides:
\begin{equation*} \begin{array}{rcrcr} \cancel{3{,}200} \amp + \amp 0.45L \amp = \amp 5{,}400 \\ -\cancel{3{,}200} \amp \amp \amp \amp -3{,}200 \end{array} \end{equation*}
which simplifies to
\begin{equation*} 0.45L = 2{,}200. \end{equation*}
Pause for a minute again: What does that 2,200 mean in the story? It’s the extra cost of buying Machine 2 that she computed earlier.
Now she divides both sides by 0.45:
\begin{equation*} \frac{\cancel{0.45}L}{\cancel{0.45}}= \frac{2{,}200}{0.45} \end{equation*}
which simplifies to
\begin{equation*} L = \frac{2{,}200}{0.45}= 2{,}200 \div 0.45 = 4888.88888\ldots \approx 4{,}889 \text{ locks}\text{.} \end{equation*}
If they plan to produce 4,889 locks or more, Quia Xun should go ahead and buy the more expensive machine, Machine 2. Yeah, that’s what we guessed — just under 4,900 locks is the payoff.

Activity 4.2.5.

Back to Madison’s car shopping: Madison wants to buy a new car, either Car A: a hybrid priced at $26,100, or Car B: a high-efficiency gas car priced at $23,700. Annual fuel costs for Car A are currently $1,100 per year. For Car B annual fuel costs are currently $1,800 per year. The total cost of each car will depend on how many years she keeps it.
  1. Madison wants to find the number of years where
    \begin{equation*} \text{total cost (for Car A)} = \text{total cost (for Car B)} \end{equation*}
    Use your equations for the total cost for each car to turn this into an equation involving the number of years she keeps the car.
  2. Follow the same steps Quia Xun did to determine the payoff time, or the number of years for which the total costs of each car are equal.
By the way, Quia Xun solved an equation here, but she wanted to know when
\begin{equation*} E \text{ (Machine 1)} \geq E \text{ (Machine 2)}\text{,} \end{equation*}
so she could have solved an inequality instead:
\begin{equation*} 3{,}200 + 1.25L \geq 5{,}400 + 0.80L\text{.} \end{equation*}
Check that the same steps give
\begin{equation*} L \ge 4{,}889 \text{ locks}\text{.} \end{equation*}

Do you know …

  1. How to compare two linear functions using a table?
  2. How to graph two linear functions on the same axes?
  3. What the solution of a linear system means in terms of the story?
  4. Where to look on a graph to see the solution of a linear system?
  5. How to successively approximate the solution of a linear system?
  6. How to solve a linear system?
  7. When to use inequality instead of an equation for a linear system?
If you’re not sure, work the rest of exercises and then return to these questions. Or, ask your instructor or a classmate for help.

Exercises Exercises

Exercises 1-4 are available in a separate workbook format.

1.

Madison wants to buy a new car, either Car A: a hybrid priced at $26,100, or Car B: a high-efficiency gas car priced at $23,700. Annual fuel costs for Car A are currently $1,100 per year. For Car B annual fuel costs are currently $1,800 per year. The total cost of each car will depend on how many years she keeps it.
(b)
Write a linear equation for the total cost (including purchase price and fuel costs) of Car A as a function of how long she keeps it. Assume fuel costs are constant.
(c)
Write a linear equation for the total cost (including purchase price and fuel costs) of Car B as a function of how long she keeps it. Assume fuel costs are constant.
(d)
Make a table comparing the total costs for the two cars if Madison keeps the car she buys for 3, 5, or 10 years.
(e)
Set up and solve a system of linear equations to determine the payoff time, or the number of years for which the total costs of each car are equal.
(f)
Based on what you have learned, fill in the blank: The more expensive hybrid pays off if Madison is going to keep it for years or more.

2.

A mug of coffee costs $3.45 at Juan’s favorite cafe,
Aside
unless he buys their discount card for $10 in which case a mug costs $2.90. Or, he can buy a membership for $59.99 and then coffee is only $1/mug. If we let \(M\) represent the number of mugs of coffee he buys and \(T\) represent the total cost in dollars, then the equations are:
\begin{align*} \textit{No card: } \qquad T \amp= 3.45M\\ \textit{With card: } \qquad T \amp= 10.00 + 2.90M\\ \textit{Membership: } \qquad T \amp= 59.99 + 1.00 M \end{align*}
(a)
Compare the total costs for all three options.
Mugs 0 10 20 30
No card \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\)
With card \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\)
Member \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\)
(b)
Draw a graph showing all three options.
(c)
Which option is least expensive if Juan plans to buy
  • A small number of mugs of coffee:
  • A medium number of mugs of coffee:
  • A large number of mugs of coffee:
(d)
Set up and solve a system of linear equations to compare total cost with no card to the total cost with the card.
(e)
Set up and solve a system of linear equation to compare the total cost with the card to the total cost with the membership.
(f)
Describe in words what you have learned.

3.

Ahmed planted two shrubs in the backyard on May 1.
Aside
The viburnum was 16.9 inches tall and expected to grow 0.4 inches each week this summer. The weigela was 20.3 inches tall but only expected to grow 0.2 inches per week. If we let \(S\) represent the total height of the shrub in inches after \(T\) weeks, then the equations are:
\begin{align*} \textbf{Viburnum:} \qquad S \amp= 16.9 + 0.4T\\ \textbf{Weigela:} \qquad S \amp= 20.3 + 0.2T \end{align*}
(a)
Compare the height of the shrubs on the given dates.
date May 1 June 12 July 10 Sept 4
\(T\) 0 6 10 18
\(S\) (viburnum) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\)
\(S\) (weigela) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\) \(\fillinmath{\displaystyle\int\int\int}\)
(b)
Approximately when will the shrubs be the same height? Continue successive approximation to find the answer to the nearest week.
(c)
Set up and solve an equation to find exactly the day when the two shrubs are the same height. In what month does that happen?

4.

The supply of flour is the amount of flour produced.
Aside
It depends on the price of flour. A high price encourages producers to make more flour. If the price is low, they tend to make less of it. The dependence of the supply of flour \(S\) (in loads) on the price \(P\) (in $/pound) is given by the equation
\begin{equation*} \textbf{Supply: } S = 0.8P + 0.5 \end{equation*}
The demand of flour is the amount of flour consumers want to buy. It also depends on the price of flour. If flour sells for a high price, then consumers will buy less. If flour sells for a low price instead, then consumers will buy more. The dependence of the demand of flour \(D\) (in loads) on the price \(P\) (in $/pound) is given by the equation
\begin{equation*} \textbf{Demand: } D = 1.5 - 0.4 P \end{equation*}
The equilibrium price of flour is the price where the supply equals the demand.
(a)
What happens if flour is priced at $1.00/pound? That is, how much flour will be produced and how much will consumers demand?
(b)
What happens if flour is priced at $0.50/pound? That is, how much flour will be produced and how much will consumers demand?
(c)
Graph both the supply equation and the demand equation on the same set of axes. Approximately what is the equilibrium price, according to your graph?
(d)
Set up and solve an equation to find the equilibrium price of flour exactly.
(e)
When more of a product is produced than consumers want to buy, we have a surplus of the product. Solve an inequality to find the range of price values for which there will be a surplus of flour. Compare your answer to part (d).
(f)
When less of a product is produced than consumers want to buy, we have a shortage of the product. Solve an inequality to find the range of price values for which there will be a shortage of flour. Compare your answer to parts (d) and (e).

5.

Just when Quia Xun thought she had things figured out, another possible option emerged. She can outsource her lock production to a different plant at the cost of $1.55 per lock. While that’s more expensive per lock, it avoids having to buy a machine at all. Recall her first two options were
\begin{align*} \textbf{Machine 1: } \qquad E\amp= 3{,}200 + 1.25 L \\ \textbf{Machine 2: } \qquad E\amp= 5{,}400 + 0.80 L \end{align*}
where \(E\) is the total expenditure to produce \(L\) locks on that machine.
(a)
Write an equation showing how \(E\) depends on \(L\) if Quia Xun decides to outsource lock production.
(b)
For what number of locks does outsourcing make financial sense versus Machine 1? Set up and solve a system of equations.

6.

Don’t ask why I know this, but it takes me 80 seconds per square foot to wash a floor using a rag. If I use a mop, it’s slightly quicker at 75 seconds per square foot, but another 3 minutes at the end to wring out the mop. (The rag just pops in the washing machine.)
(a)
Name the variables and write an equation for each option: rag versus mop. Hint: time is the dependent variable.
(b)
Set up and solve the system to determine the area of a room where either option takes the same amount of total time.
(c)
What do you suggest for each room? (Note: find the area by multiplying the length times the width.) My bathroom floor is 5′\(\times\)5′. My kitchen floor is 8′\(\times\)10′. The laundry room is 10′\(\times\)14′.

7.

Maria needed to replace the light bulb in the hallway. When she went to the home improvement store she was overwhelmed with the choices of light bulbs. One option is a compact fluorescent light (CFL) bulb. A CFL bulb costs $1. This fixture will cost $0.95 per month to run with a CFL bulb. A different option Maria is considering is a light-emitting diode (LED) instead of a bulb. A LED costs $24 but reduces the cost for the fixture to $0.60 per month.
(a)
Name the variables and write an equation for each option: LED versus CFL.
(b)
Compare the total cost for each bulb for 1, 6, 18, and 36 months.
(c)
Draw a graph showing both functions on the same axes.
(d)
Set up and solve a system of linear equations to determine the payback time.
(e)
Based on what you’ve learned, fill in the blank and circle the correct word.
The more expensive LED pays off if Maria is going to use it for or more months.

8.

The community center offers exercise classes on a pay-as-you-go basis. It normally costs $20 to register and then $15 per exercise class. Alternatively, you can pay $150 to become a member, and then $10 per exercise class. If we let \(E\) represent the number of exercise classes I attend and \(T\) represent the total cost in dollars, then the equations are:
\begin{align*} \textbf{Pay as you go:} \qquad T \amp= 20 + 15E\\ \textbf{Member} \qquad T \amp= 150 + 10E \end{align*}
(a)
Create a table of reasonable values and draw a graph showing both options.
(b)
According to your graph, what is the break even point?
(c)
Use successive approximations to find the break even point.
(d)
Set up and solve a system of linear equations to determine the exact break even point.
(e)
Describe in words what you’ve learned about whether or not to buy membership.

9.

The weekly supply \(S\) and demand \(D\) for corn-on-the-cob (in hundreds) at a local market are given by the equations
\begin{align*} \textbf{Supply:} \qquad S \amp= 1.5P+6\\ \textbf{Demand:} \qquad D \amp= 11 - 0.9P \end{align*}
where \(P\) is the price per unit, in dollars per dozen.
(a)
Is there a shortage or surplus if corn is priced at $3.25/dozen? What if it’s priced at $1.75/dozen?
(b)
Set up and solve an equation to find the equilibrium price of corn.
(c)
Make a small table of values and graph. Does your answer to (b) agree with your graph? Explain.

10.

A solar heating system costs approximately $30,000 to install and $150 per year to run.
Aside
By comparison, a gas heating system costs approximately $12,000 to install and $700 per year to run. Earlier we wrote equations showing how the total cost $\(T\) depends on the time, \(Y\) years.
\begin{align*} \textbf{Solar:} \qquad T \amp= 30{,}000 + 150Y\\ \textbf{Gas:} \qquad T \amp= 12{,}000 + 700Y \end{align*}
(a)
Set up an solve a system to determine the payback time of installing the solar heating system.
(b)
How does the payback time change if the state offers a $7,000 rebate? That means, in effect, that the solar system costs $7,000 less to install. Write a new equation for the solar heating system. Then set up and solve the new system.
(c)
How high a rebate would the state have to offer to ensure a payback time of 15 years? Hint: compare the costs of gas and solar heating systems at 15 years.