MATH 150 · Mathematics for Economics I

Systems of Equations and Market Equilibrium

Solve two equations at once by substitution or elimination, then use the method to find market prices and measure the effect of a tax.

Key takeaways

  • A system of equations is a set of equations that must all be true at the same time for the same values.
  • Substitution replaces one variable with an expression, while elimination adds or subtracts equations to cancel a variable.
  • Market equilibrium is the price at which quantity demanded equals quantity supplied, found by solving the two equations together.
  • Two straight lines can cross once, never, or lie on top of each other, which means one, zero or endlessly many solutions.
  • Once a market model is solved, you can change a parameter, solve again and compare the two outcomes.

Every Saturday, a farmers market has a strawberry problem. When growers hope for $8 a basket, they haul in mountains of berries and shoppers walk past. When the price is $2, shoppers swarm and the berries are gone by nine, with a line of disappointed people holding empty bags.

Somewhere between, the number of baskets people want to buy matches the number growers want to sell. You could find that price by trial and error over many Saturdays. Or you could write one equation for buyers, one for sellers, and ask which price satisfies both at once.

"Both at once" is the whole idea of a system of equations. It is also the mathematical heart of supply and demand.

One equation is not enough

Suppose all you know is that x + y = 10. What are x and y? Maybe 3 and 7. Maybe 5 and 5. Maybe 12 and −2. There are endless pairs. On a graph they form a line.

Add a second fact: x − y = 4. That is another line. Only one pair sits on both: x = 7 and y = 3. Check: 7 + 3 = 10 and 7 − 3 = 4.

A system of equations is a group of equations sharing the same unknowns. A solution to the system is a set of values that makes every equation true. A handy rule of thumb for linear systems is that you need as many independent equations as unknowns. Independent means that no equation is just another one in disguise. "x + y = 10" and "2x + 2y = 20" say the same thing twice.

What the solution means

It helps to keep two pictures in mind. In the algebra picture, you are hunting for numbers that make two sentences true. In the graph picture, you are hunting for a point that lies on two lines. They are the same hunt.

That second picture gives you a quick sense check before you calculate anything. Sketch the lines roughly. If they look as if they should cross where both values are positive, and your algebra reports a negative number, go back and look for a slip. The sketch does not need to be pretty. A napkin version will do.

It also explains why a single equation cannot settle things. Demand alone tells you what buyers would do at each possible price, but not which price will happen. Supply alone does the same for sellers. Only the pair narrows the many possibilities down to one.

Method one: substitution

In substitution, you solve one equation for one variable, then put that expression into the other equation. Now you have one equation with one unknown, which you already know how to handle from solving linear equations.

Take this system:

y = 2x + 1
3x + y = 16

The first equation already tells you what y is. Drop it into the second.

3x + (2x + 1) = 16
5x = 15
x = 3
y = 2 × 3 + 1 = 7
Check: 3 × 3 + 7 = 16

Method two: elimination

In elimination, you add or subtract the equations so that one variable cancels. Sometimes you first multiply an equation by a number to make the coefficients match.

2x + 3y = 13
4x − y  = 5

Multiply the second equation by 3:

12x − 3y = 15

Add it to the first. The y terms cancel.

14x = 28
x = 2
2 × 2 + 3y = 13   so   y = 3
Check: 4 × 2 − 3 = 5
Two ways to solve a system
Substitution Solve one equation for a variable Replace it in the other equation Handy when a variable already stands alone Typical for supply and demand Elimination Scale equations so coefficients match Add or subtract to cancel a variable Handy when equations are in tidy rows Extends well to larger systems VS Substitution Solve one equation for a variable Replace it in the other equation Handy when a variable already stands alone Typical for supply and demand Elimination Scale equations so coefficients match Add or subtract to cancel a variable Handy when equations are in tidy rows Extends well to larger systems

Both give the same answer. Pick the one with less arithmetic.

Supply, demand and the price that clears

Now for the strawberries. Suppose that on a given Saturday:

Quantity demanded:  Qd = 500 − 50P
Quantity supplied:  Qs = −100 + 100P

P is dollars per basket, and the quantities are baskets. The demand slope is negative: each extra dollar loses 50 sales. The supply slope is positive: each extra dollar draws out 100 more baskets. The −100 looks odd. It simply means that growers bring nothing until the price passes $1, since −100 + 100 × 1 = 0.

Market equilibrium is the situation where quantity demanded equals quantity supplied. That is a third equation: Qd = Qs.

500 − 50P = −100 + 100P
600 = 150P
P = 4
Q = 500 − 50 × 4 = 300
Check supply: −100 + 100 × 4 = 300

The equilibrium price is $4 and the equilibrium quantity is 300 baskets.

The strawberry market
Price ($) 300 $4 Demand Supply Equilibrium Baskets Price ($) 300 $4 Demand Supply Equilibrium Baskets

The crossing point is the only price and quantity that satisfy both equations.

Off the crossing

Plug in a different price to see why it cannot last.

At P = $6, buyers want 500 − 300 = 200 baskets and growers bring −100 + 600 = 500. There is a surplus, or extra supply, of 300 baskets. Growers with unsold berries have a reason to cut prices.

At P = $2, buyers want 400 and growers bring 100. There is a shortage of 300 baskets. Buyers who miss out have a reason to offer more, and growers notice they could charge more.

The algebra finds where the forces balance. The story about why the price drifts there comes from market equilibrium.

A worked example: a tax on each basket

The town considers a fee of $1.50 per basket, paid by sellers. What happens?

Step 1: Name two prices. Buyers pay Pb. Sellers keep Ps. The difference is the fee.

Pb = Ps + 1.50

Step 2: Give each side its own price.

Qd = 500 − 50 Pb
Qs = −100 + 100 Ps

Step 3: Substitute and set equal.

500 − 50 (Ps + 1.50) = −100 + 100 Ps
500 − 50 Ps − 75 = −100 + 100 Ps
525 = 150 Ps
Ps = 3.50
Pb = 5.00
Q = 500 − 50 × 5 = 250
Check supply: −100 + 100 × 3.50 = 250

Step 4: Read the result. The price buyers pay rose from $4 to $5, up $1. The price sellers keep fell from $4 to $3.50, down 50 cents. Together that is the $1.50 fee. Sales fell from 300 baskets to 250. The town collects 1.50 × 250 = $375.

Who carries the $1.50 fee
Extra paid by buyers per basket $1 Less kept by sellers per basket $0.50 Total fee per basket $1.50 Extra paid by buyers per basket $1 Less kept by sellers per basket $0.50 Total fee per basket $1.50

Buyers bear two thirds here, because their demand responds less to price than supply does. Hypothetical example: the numbers are made up to show the method, not a quote or an average.

The law said sellers pay. The algebra says buyers carry most of it. Try writing the fee on the buyer instead, and you will get the same two prices and the same quantity. Who sends the money to the town does not settle who ends up poorer.

Comparing two worlds

What you just did is called comparative statics: solve a model, change one outside condition, solve again and compare. It is one of the most useful habits in economics.

You can even do it with letters. Let demand be Qd = a − bP and supply be Qs = c + dP. Setting them equal gives

a − bP = c + dP
a − c = (b + d)P
P = (a − c) / (b + d)

Test it: a = 500, b = 50, c = −100, d = 100 gives P = 600 / 150 = 4. Matches.

The formula tells a story without any numbers. A larger a, meaning stronger demand, raises the price. A larger c, meaning more supply at every price, lowers it. For instance, a bumper crop that raises c from −100 to 50 gives P = 450 / 150 = 3 and Q = 350.

Equilibrium price for linear supply and demand
P* = a − c ÷ b + d P* = Price The price where the two quantities match. a − c = Gap at zero price Demand intercept minus supply intercept. b + d = Combined response How fast the gap closes per extra dollar. P* = a − c ÷ b + d P* = Price The price where the two quantities match. a − c = Gap at zero price Demand intercept minus supply intercept. b + d = Combined response How fast the gap closes per extra dollar.

The second part of that fraction makes sense. At a price of zero, the gap between what buyers want and what sellers offer is a − c. Each extra dollar closes the gap by b + d units. Divide to find how many dollars it takes.

A second shock: a new fad

Try comparative statics once more, this time on the buyers' side. A popular cooking video makes strawberry shortcake the thing to bake. At every price, shoppers now want 150 more baskets, so demand becomes Qd = 650 − 50P. Supply is unchanged.

650 − 50P = −100 + 100P
750 = 150P
P = 5
Q = 650 − 250 = 400

The price rose from $4 to $5 and the quantity rose from 300 to 400. Notice that demand shifted by 150 baskets, yet sales rose by only 100. The higher price drew out more berries from growers, and it also talked some shoppers out of buying. The two effects meet in the middle.

This is a lesson you would struggle to see without solving the system. It is tempting to say that 150 more baskets wanted means 150 more baskets sold. The market does not work that way unless sellers are willing to supply any amount at the old price.

You can read the same result from the general formula. The gap between buyers and sellers at a price of zero grew by 150, and each dollar closes 150 baskets of gap. So the price must rise by exactly one dollar.

When lines refuse to cooperate

Two lines in a plane can do three things.

  • Cross once. They have different slopes, and there is exactly one solution.
  • Never meet. They are parallel: same slope, different intercepts. Try y = 2x + 1 and y = 2x + 5. Setting them equal gives 1 = 5, which is false.
  • Coincide. They are the same line written twice. Every point on it is a solution.

Economic systems can also produce solutions that algebra loves and reality does not. If the lines cross at a negative quantity, there is no price at which trade happens in the ordinary way. Think of a good that costs more to make than anyone will pay.

The common mistake: mixing up the form

Students often set a quantity equation equal to a price equation. Suppose demand is given as P = 10 − Q/50 and supply as Qs = −100 + 100P. Writing 10 − Q/50 = −100 + 100P compares a price with a quantity, which is like asking whether a kilometer equals a banana.

Before setting two things equal, check that they measure the same thing in the same units. Either rewrite demand as Qd = 500 − 50P, or rewrite supply as P = 1 + Q/100. In the second form,

10 − Q/50 = 1 + Q/100
9 = 3Q/100
Q = 300
P = 4

Same answer, as it must be. The second habit to build is checking the solution in both original equations. A point that satisfies only one of them is on one line and missing the other.

Words to know

System of equations two or more equations that must hold at the same time.

Substitution solving a system by replacing a variable with an equivalent expression.

Elimination solving a system by combining equations so that a variable cancels.

Market equilibrium the price and quantity at which quantity demanded equals quantity supplied.

Surplus the amount by which quantity supplied exceeds quantity demanded.

Shortage the amount by which quantity demanded exceeds quantity supplied.

Comparative statics comparing solutions of a model before and after an outside change.

Check yourself

  1. Solve the system x + y = 12 and x − y = 2.
  2. Demand is Qd = 80 − 4P and supply is Qs = 6P − 20. Find the equilibrium price and quantity.
  3. In that market, what is the shortage or surplus at a price of 8?
  4. With the same market, a per-unit tax of 5 is paid by sellers. Find the new quantity and the two prices.
  5. Why do the equations y = 3x + 2 and y = 3x + 7 have no common solution?
  6. Explain why the side that legally pays a tax need not bear all of it.
Show the answers
  1. Adding gives 2x = 14, so x = 7 and y = 5.
  2. 80 − 4P = 6P − 20 gives 100 = 10P, so P = 10 and Q = 40.
  3. Demand is 80 − 32 = 48 and supply is 48 − 20 = 28, so there is a shortage of 20.
  4. 80 − 4(Ps + 5) = 6Ps − 20 gives 80 = 10Ps, so Ps = 8, Pb = 13 and Q = 28.
  5. They have the same slope but different intercepts, so the lines are parallel and never cross.
  6. The tax changes the market price, so buyers or sellers can shift part of the burden to the other side depending on how strongly each responds to price.

A free self-study program written for 4Economics with AI writing tools and not reviewed line by line by a person. It is not an accredited degree and awards no credit. Check anything you rely on against a textbook or primary source. Report an error.

In this unit: Algebra and functions

  1. Why Economists Use MathSee why economists turn stories into equations, what a model is, and how a few lines of algebra can settle a real argument.11 min
  2. Numbers, Percentages and Percentage PointsMaster percent change, percentage points, reversing a change and weighted averages so that economic headlines stop fooling you.11 min
  3. Solving Linear EquationsLearn to isolate an unknown, rearrange economic formulas and solve break-even problems with steps you can check yourself.11 min
  4. Lines, Slopes and InterceptsRead and build straight lines, interpret slope and intercept with units, and see how budget and demand lines tell economic stories.10 min
  5. Systems of Equations and Market EquilibriumSolve two equations at once by substitution or elimination, then use the method to find market prices and measure the effect of a tax.11 min
  6. Quadratic Functions, Revenue and ProfitDiscover why revenue and profit curve like hills, and use factoring, the vertex and the quadratic formula to find peaks and break-even points.10 min
  7. Exponents and PowersLearn the rules of exponents, including negative and fractional powers, and see why they describe production, scale and growth.11 min

In the news