Sub topic 8
Finding the market equilibrium
This chapter assumes you can read a price-quantity graph, solve two linear equations, and tell a demand curve from a supply curve. Here you will find the one price at which a market clears, check that the answer is right, and see why the market tends toward it. Later chapters use this equilibrium as the baseline that shifts move.
What equilibrium means
A market equilibrium is a price and quantity at which the quantity buyers want to buy equals the quantity sellers want to sell. Economists call the price the equilibrium price (or market-clearing price) and the quantity the equilibrium quantity.
Two conditions define it:
- The point lies on the demand curve, so buyers are willing to purchase that quantity at that price.
- The point lies on the supply curve, so sellers are willing to sell that quantity at that price.
On the graph, the equilibrium is where the two curves cross. At any other price, one curve says one quantity and the other curve says a different quantity.
Equilibrium is a statement about plans, not about trades. Quantity demanded and quantity supplied are the amounts people want to trade at a given price. Only at the equilibrium price do those plans match, so nobody is left wanting to do something different.
Surplus and shortage away from equilibrium
Take a market with these curves, using the same model as the earlier chapters:
- Demand: Qd = 100 - 2P
- Supply: Qs = 20 + 3P
Compare the two quantities at three prices.
| Price | Quantity demanded | Quantity supplied | Result |
|---|---|---|---|
| 10 | 80 | 50 | Shortage of 30 |
| 16 | 68 | 68 | Balanced |
| 20 | 60 | 80 | Surplus of 20 |
A surplus (excess supply) exists when quantity supplied exceeds quantity demanded at the current price. A shortage (excess demand) exists when quantity demanded exceeds quantity supplied. Both are measured at one specific price. A surplus is not a leftover stock in general. It is the gap between two curves at that price.
Why price moves toward equilibrium
The standard story is that sellers and buyers respond to the gap:
- With a surplus, some sellers cannot sell what they planned to sell. They cut prices, which raises quantity demanded and lowers quantity supplied. The gap shrinks.
- With a shortage, some buyers cannot buy what they planned to buy. They bid prices up, which lowers quantity demanded and raises quantity supplied. The gap shrinks.
- At the equilibrium price, neither pressure exists, so the price stays put.
The diagram loops back to the comparison because adjustment is repeated. Each price change shrinks the gap until it reaches zero.
Finding the equilibrium algebraically
Write demand as Qd = a - bP and supply as Qs = c + dP, where b and d are positive. Set Qd = Qs and solve for P.
- Set the two quantities equal: a - bP = c + dP.
- Collect the price terms on one side: a - c = (b + d)P.
- Solve for price: P* = (a - c) / (b + d).
- Substitute P into either curve to get the quantity: Q = a - bP*.
For the example, a = 100, b = 2, c = 20, d = 3:
- P* = (100 - 20) / (2 + 3) = 80 / 5 = 16
- Q* = 100 - 2(16) = 68
Check the answer with the other curve
Always substitute P* into both curves. If the two quantities differ, you made an arithmetic error. Here Qs = 20 + 3(16) = 68, which matches Qd = 68.
Using the inverse form
Graphs put price on the vertical axis, so textbooks often write each curve as price in terms of quantity (the inverse curve). Solving each equation for P gives:
- Inverse demand: P = 50 - 0.5Q
- Inverse supply: P = (Q - 20) / 3
Setting them equal gives 50 - 0.5Q = Q/3 - 20/3. Multiply by 6 to get 300 - 3Q = 2Q - 40, so 5Q = 340 and Q = 68. Then P = 50 - 34 = 16. The result is the same. Only the way the curves are written differs.
Computing it in code
The function below returns the equilibrium and also reports the gap at any price. It returns None when the formula gives a meaningless answer, which the next section explains.
def demand(price, a=100, b=2):
return a - b * price
def supply(price, c=20, d=3):
return c + d * price
def equilibrium(a, b, c, d):
# Demand: Qd = a - b*P Supply: Qs = c + d*P
price = (a - c) / (b + d)
quantity = a - b * price
if price < 0 or quantity <= 0:
return None # no sensible trade at a non-negative price
return price, quantity
for p in (10, 16, 20):
qd, qs = demand(p), supply(p)
if qd > qs:
state = f"shortage of {qd - qs}"
elif qs > qd:
state = f"surplus of {qs - qd}"
else:
state = "balanced"
print(p, qd, qs, state)
print(equilibrium(100, 2, 20, 3)) # (16.0, 68.0)
print(equilibrium(10, 2, 40, 3)) # NoneThe loop prints 10 80 50 shortage of 30, then 16 68 68 balanced, then 20 60 80 surplus of 20. The first equilibrium call returns (16.0, 68.0). The second returns None, because the formula gives a price of -6.
Edge cases and limits
The formula can give an impossible answer
The algebra does not know that prices and quantities cannot be negative. Suppose demand is Qd = 10 - 2P and supply is Qs = 40 + 3P. Then P* = (10 - 40) / 5 = -6. At any non-negative price, sellers want to sell more than buyers want to buy, so there is a permanent surplus and no market-clearing trade. A negative result tells you the linear model does not describe a working market in that range.
The same check matters for quantity. If Q* comes out zero or negative, no trade takes place at a sensible price.
The intercepts are not always meaningful
In Qs = 20 + 3P, sellers supply 20 units at a price of zero. Many real goods have no supply at zero price. A more realistic supply curve might be Qs = -20 + 3P, which gives positive quantity only above a price of about 6.67. Linear curves are local approximations around the observed price, so be careful about reading their intercepts as facts.
Equilibrium is not the same as fair or desirable
Equilibrium means plans match. It does not mean that everyone is happy, that the price is fair, or that the outcome is efficient. A very high equilibrium price can leave many people priced out. The concept describes where the market settles, not whether that outcome is good.
Prices held away from equilibrium
If a rule fixes the price, the market cannot adjust. A price ceiling (a legal maximum) set below P produces a shortage. A price floor (a legal minimum) set above P produces a surplus. In the example, a ceiling of 10 leaves buyers wanting 80 units while sellers offer 50, so the quantity actually traded is the smaller number, 50. When a gap exists, the quantity traded equals the lesser of quantity demanded and quantity supplied.
Slopes matter for stability and for later chapters
In the standard model, the demand curve slopes down and the supply curve slopes up, so the crossing is unique and the adjustment story works. The denominator b + d in the formula is always positive in that case. Other shapes can produce several crossings or paths that do not settle down, but those cases are outside this tutorial.
Why this chapter comes before shifts
Everything in the next chapters starts from a baseline equilibrium and then asks what changes after an event. Keep two things in mind:
- The equilibrium price is an outcome of the model. It is not a separate input.
- A change in the equilibrium price is therefore never a shift by itself. It is the market's response to a shift, or the result of moving along each curve to the new crossing.
Summary of the procedure
- Write down the demand and supply curves, with the same units for price and quantity.
- Set Qd = Qs and solve for P*.
- Substitute P into both curves and confirm the same Q.
- Check that P and Q are positive.
- Test one price above and one below P* to confirm a surplus and a shortage.
Exercise
Demand is Qd = 90 - 3P and supply is Qs = 10 + 2P. Find the equilibrium price and quantity, and check your answer using both curves.
Show answer
Set 90 - 3P = 10 + 2P, so 80 = 5P and P* = 16. Demand gives Q = 90 - 3(16) = 42. Supply gives Q = 10 + 2(16) = 42. Both curves agree, so the equilibrium is a price of 16 and a quantity of 42.
Exercise
For the same market (Qd = 90 - 3P, Qs = 10 + 2P), what happens at a price of 20? State the quantities, name the gap, and describe how the price is expected to move.
Show answer
At P = 20, Qd = 90 - 60 = 30 and Qs = 10 + 40 = 50. Quantity supplied exceeds quantity demanded, so there is a surplus of 20 units. Sellers who cannot sell their planned quantity cut prices, so the price falls toward 16. As it falls, quantity demanded rises and quantity supplied falls until the gap is zero.
Exercise
Demand is Qd = 12 - 2P and supply is Qs = 30 + P. Compute P* from the formula. What does the result tell you about this market?
Show answer
P* = (12 - 30) / (2 + 1) = -6. A negative price is not a working market outcome. At every non-negative price, quantity supplied exceeds quantity demanded, so there is a surplus and no market-clearing trade in the valid range.