Sub topic 1
Starting point: market equilibrium
Prerequisites
This chapter assumes you already know four things:
- How to read a supply curve and a demand curve on a graph with price on the vertical axis and quantity on the horizontal axis.
- What equilibrium price and quantity mean in general terms.
- How to solve two linear equations for two unknowns.
- The idea of opportunity cost: the value of the next-best use of a resource.
This chapter does not teach these topics from scratch. It fixes the model and the numbers that the rest of the tutorial uses. Price ceilings and price floors are defined as departures from equilibrium, so you need to be able to say precisely what equilibrium is.
Why start here
A price control is a legal rule that stops a price from settling where the market would put it. To judge what a rule changes, you need a baseline: the price, the quantity, and the gains from trade without the rule. Every later chapter compares a controlled market with the uncontrolled market described here.
The tutorial uses one linear market throughout, so you can check each result by hand.
The model: two linear curves
Quantity demanded is how much buyers want to purchase at a given price. Quantity supplied is how much sellers want to sell at a given price. Both are measured per period, for example units per month.
The market in this tutorial is:
- Demand: Qd = 100 − 2P
- Supply: Qs = 20 + 2P
Demand slopes down: each $1 increase in price reduces the quantity demanded by 2 units. Supply slopes up: each $1 increase in price raises the quantity supplied by 2 units. Prices below are in dollars and quantities in units. Only prices between 0 and 50 matter here. At P = 50, quantity demanded falls to zero, and below P = −10 quantity supplied would be negative, so the supply formula stops making sense.
In this form quantity is a function of price, which is how a buyer or seller experiences the market: they see a price and decide how much to buy or sell. Graphs put price on the vertical axis, so you will often rewrite each curve with price as a function of quantity. This is called the inverse form:
- Inverse demand: P = 50 − Q/2
- Inverse supply: P = Q/2 − 10
You get these by solving each equation for P. Inverse demand gives the highest price buyers will pay for the Qth unit. Inverse supply gives the lowest price sellers will accept for the Qth unit. Later chapters use both forms.
Finding the equilibrium
Equilibrium is the price at which quantity demanded equals quantity supplied. At that price every buyer who wants to buy at the going price finds a seller, and every seller finds a buyer.
Set Qd = Qs and solve:
- 100 − 2P = 20 + 2P
- 80 = 4P
- P = 20
- Q = 100 − 2(20) = 60
Check the answer in the supply equation: 20 + 2(20) = 60. Both sides agree, so the equilibrium is a price of $20 and a quantity of 60 units.
For general linear curves Qd = a − bP and Qs = c + dP, the same steps give:
- P* = (a − c) / (b + d)
- Q = a − bP
The code below defines the market and a general solver. You can run it as shown.
# Linear market: quantity demanded Qd = 100 - 2P, quantity supplied Qs = 20 + 2P
def demand(p):
return 100 - 2 * p
def supply(p):
return 20 + 2 * p
def equilibrium(a, b, c, d):
"""Solve Qd = a - b*P and Qs = c + d*P. Returns (price, quantity)."""
price = (a - c) / (b + d)
return price, a - b * price
price, quantity = equilibrium(100, 2, 20, 2)
print(price, quantity) # 20.0 60.0
print(demand(price), supply(price)) # 60.0 60.0The later chapters use the constants EQ_PRICE = 20 and EQ_QTY = 60 from this baseline.
Why the market moves toward equilibrium
Equilibrium is more than a point where two lines cross. It is also the price the market tends to reach when no rule interferes. The table shows the market at several prices.
| Price | Quantity demanded | Quantity supplied | Situation |
|---|---|---|---|
| 10 | 80 | 40 | Excess demand of 40 |
| 15 | 70 | 50 | Excess demand of 20 |
| 20 | 60 | 60 | Equilibrium |
| 25 | 50 | 70 | Excess supply of 20 |
| 30 | 40 | 80 | Excess supply of 40 |
Below $20, buyers want more than sellers offer. This is excess demand, also called a shortage. Some buyers cannot get the good at the posted price. Sellers can see unsold demand and buyers compete for limited units, so the price tends to rise. As it rises, buyers cut back and sellers produce more, which shrinks the gap.
Above $20, sellers offer more than buyers want. This is excess supply, also called a surplus. Unsold goods pile up, sellers cut prices to move them, and the gap closes from the other side.
The same table can be produced in code.
def demand(p):
return 100 - 2 * p
def supply(p):
return 20 + 2 * p
for p in (10, 15, 20, 25, 30):
qd, qs = demand(p), supply(p)
if qd > qs:
state = f"excess demand of {qd - qs}"
elif qs > qd:
state = f"excess supply of {qs - qd}"
else:
state = "equilibrium"
print(p, qd, qs, state)The output matches the table above. Price controls matter because they block this adjustment. A ceiling at $15 stops the price from rising out of the excess demand of 20, and a floor at $25 stops the price from falling out of the excess supply of 20. Later chapters work out the consequences.
What equilibrium does and does not mean
Equilibrium has a specific meaning, and a few common misreadings cause errors later.
- Equilibrium is not "fair" or "best for everyone." It is the price at which the market clears. A buyer who values the good at $18 does not buy at $20, and that is consistent with equilibrium.
- Equilibrium is not a promise that the market is at equilibrium. Real markets are often away from it for a while because of search costs, slow-changing prices, or rules. The model says where the market tends to go, not that it is already there.
- Equilibrium is not a point of zero trade. Quantity traded is 60 units. Of the people who would trade at some price, those with the highest values and the lowest costs trade.
- Equilibrium depends on the curves. If demand or supply shifts, for example because incomes change or an input becomes cheaper, the equilibrium moves. A price control that was harmless before the shift can start to bind afterward, and the reverse is also possible.
A first look at who gains: surplus at equilibrium
The next chapters measure how controls change the welfare of buyers and sellers, so it helps to compute the baseline now.
Consumer surplus is the gap between what buyers would have paid and what they actually pay. It is the area under the demand curve and above the price. Producer surplus is the gap between the price sellers receive and the minimum they would have accepted. It is the area above the supply curve and below the price.
With inverse demand P = 50 − Q/2, the highest price anyone will pay (at Q = 0) is $50. With inverse supply P = Q/2 − 10, the lowest price at which anyone will sell (at Q = 0) is −$10. Each region is a triangle:
- Consumer surplus = ½ × 60 × (50 − 20) = 900
- Producer surplus = ½ × 60 × (20 − (−10)) = 900
Total surplus is 1,800. This is the maximum the market can create. Any rule that moves trade away from 60 units can only reduce it, and later chapters measure that reduction as deadweight loss.
Q_STAR, P_STAR = 60, 20
choke_price = 50 # price at which quantity demanded is zero
min_supply_price = -10 # price at which quantity supplied is zero
consumer_surplus = 0.5 * Q_STAR * (choke_price - P_STAR)
producer_surplus = 0.5 * Q_STAR * (P_STAR - min_supply_price)
print(consumer_surplus, producer_surplus, consumer_surplus + producer_surplus)
# 900.0 900.0 1800.0Summary of the baseline
- Demand is Qd = 100 − 2P and supply is Qs = 20 + 2P.
- The equilibrium price is $20 and the equilibrium quantity is 60 units.
- Below $20 there is excess demand, and above $20 there is excess supply. Prices tend to move back toward $20.
- At equilibrium, consumer surplus and producer surplus are each 900, and total surplus is 1,800.
The next chapter defines price controls and shows how they interfere with the adjustment process described above.
Exercise
A market has demand Qd = 120 − 3P and supply Qs = 30 + 2P. (a) Find the equilibrium price and quantity. (b) At a price of 12, is there excess demand or excess supply, and how large is it?
Show answer
(a) Set 120 − 3P = 30 + 2P, so 90 = 5P and P = 18. Then Q = 120 − 3(18) = 66. Check with supply: 30 + 2(18) = 66. (b) At P = 12, Qd = 120 − 36 = 84 and Qs = 30 + 24 = 54. Quantity demanded exceeds quantity supplied by 30, so there is excess demand (a shortage) of 30 units, and the price would tend to rise.
Exercise
In the chapter's market (Qd = 100 − 2P, Qs = 20 + 2P), demand shifts so that it becomes Qd = 120 − 2P. What is the new equilibrium price and quantity? Would a legal maximum price of $22, which did not bind before the shift, bind now?
Show answer
Set 120 − 2P = 20 + 2P, so 100 = 4P and P = 25. Then Q = 120 − 50 = 70. The new equilibrium price is $25 and the quantity is 70. A ceiling of $22 is below the new equilibrium price of $25, so it now binds. At P = 22, Qd = 76 and Qs = 64, which gives a shortage of 12 units. Before the shift the equilibrium was $20, so the same ceiling of $22 was above it and had no effect.