Sub topic 1
Starting point: the competitive equilibrium
This chapter sets up the market model that every later chapter uses to measure deadweight loss. You will learn how to find the equilibrium in a linear market, how to read it, and why it is the benchmark against which taxes and price controls are judged.
Prerequisites
This chapter assumes you can:
- Read supply and demand curves drawn with price on the vertical axis and quantity on the horizontal axis.
- Solve two linear equations for two unknowns.
- Compute the area of a triangle (one half times base times height).
- Work with percentage changes.
You do not need any calculus. All curves in this tutorial are straight lines unless stated otherwise.
The model in one paragraph
A competitive market has many buyers and many sellers. Each is too small to move the price, and all trade the same good at one price. The demand curve shows how many units buyers want at each price. The supply curve shows how many units sellers offer at each price. The competitive equilibrium is the price and quantity at which these two amounts are equal.
Linear demand and supply
We write both curves with price as a function of quantity. This is called the inverse form, and it matches how the curves are drawn.
- Demand: P = a − b·Q. The intercept a is the highest price anyone will pay. The slope −b says each extra unit sells only if the price falls by b.
- Supply: P = c + d·Q. The intercept c is the lowest price at which any seller will offer a unit. The slope d says each extra unit costs d more to bring to market.
Reading the curves in price terms gives each one a second meaning:
- A point on the demand curve is the most a buyer would pay for that unit. This is the buyer's willingness to pay.
- A point on the supply curve is the least a seller would accept for that unit. This is the seller's marginal cost.
These two readings are the foundation of the surplus ideas in the next chapters.
Solving for the equilibrium
At equilibrium the price on the demand curve equals the price on the supply curve at the same quantity. Set the two expressions equal:
a − b·Q = c + d·Q
Solve for quantity:
Q* = (a − c) / (b + d)
Substitute Q* into either curve to get the price:
P = a − b·Q
The condition a > c is required. If a ≤ c, the highest price any buyer will pay is below the lowest price any seller will accept, and no trade happens.
A running example
Throughout this tutorial we use one market: demand P = 100 − Q and supply P = 20 + Q. So a = 100, b = 1, c = 20, d = 1.
- Q* = (100 − 20) / (1 + 1) = 40
- P* = 100 − 1·40 = 60
Check with the supply curve: 20 + 40 = 60. Both curves agree, so the market clears at 40 units and a price of 60.
def equilibrium(a, b, c, d):
"""Demand: P = a - b*Q. Supply: P = c + d*Q."""
if a <= c:
raise ValueError("No trade: the highest buyer value is not above the lowest seller cost.")
q = (a - c) / (b + d)
p = a - b * q
return q, p
q_star, p_star = equilibrium(a=100, b=1, c=20, d=1)
print(q_star, p_star) # 40.0 60.0The function adds a guard for the no-trade case. Later chapters reuse this function and its output.
Why the price settles here
The equilibrium is stable because prices respond to imbalances. The two cases below show how.
- If the price is above P*, sellers want to supply more than buyers want to buy. Unsold goods pile up (a surplus of goods), and sellers cut prices to move them.
- If the price is below P*, buyers want more than sellers will supply. Some buyers go unserved (a shortage), and buyers bid prices up or sellers raise them.
At P neither pressure exists. Every buyer willing to pay at least P can buy, and every seller willing to accept at most P* can sell.
Who trades and who does not
The equilibrium sorts people into two groups.
- Buyers whose willingness to pay is at least P* buy. In the example, a buyer who values a unit at 80 buys it at 60.
- Buyers whose willingness to pay is below P* do not buy. A buyer who values a unit at 50 stays out.
- Sellers whose marginal cost is at most P* sell. A seller with cost 30 sells at 60.
- Sellers whose marginal cost is above P* stay out. A seller with cost 70 does not sell.
Every unit up to Q is traded by someone who values it more than it costs to produce. Every unit beyond Q would cost more to produce than any remaining buyer would pay. Look at the 41st unit in the example. Its willingness to pay is 100 − 41 = 59, and its marginal cost is 20 + 41 = 61. Producing it would waste 2 in value. This comparison of value and cost, unit by unit, is the core of the efficiency argument made in the chapters ahead.
Why this is the benchmark
Deadweight loss is always measured relative to something. Here the reference point is the competitive equilibrium, because it has two properties:
- Every trade that benefits both sides takes place. Any unit with willingness to pay above marginal cost is traded.
- No trade that harms the total takes place. Any unit with marginal cost above willingness to pay is not traded.
When a tax or a price control moves the market away from Q*, some of the first kind of trade disappears. The value of those lost trades is the deadweight loss. The later chapters make this precise by measuring surplus.
Common errors
- Mixing up axes. Price is on the vertical axis, so slope is price change per unit of quantity. A "steeper" curve in this form is less responsive in quantity terms. The next chapter returns to this when it links slopes to elasticity.
- Solving for P first and forgetting to substitute. Q alone is not the full answer. Report both Q and P*.
- Assuming equilibrium means fairness. The equilibrium is a statement about balance and efficiency. It says nothing about whether the distribution of gains is fair.
- Using the wrong slope sign. In P = a − b·Q, b is positive and the minus sign is already in the formula. Entering a negative b gives a wrong Q*.
- Forgetting the no-trade condition. If a ≤ c, the formula gives zero or a negative quantity, which is meaningless.
Changing the parameters
You can see how the equilibrium responds by changing the inputs. A higher demand intercept a shifts the demand curve up. It raises both Q and P. A higher supply intercept c shifts the supply curve up. It lowers Q and raises P.
def equilibrium(a, b, c, d):
if a <= c:
raise ValueError("No trade.")
q = (a - c) / (b + d)
p = a - b * q
return q, p
print(equilibrium(100, 1, 20, 1)) # (40.0, 60.0) baseline
print(equilibrium(120, 1, 20, 1)) # (50.0, 70.0) demand shifts up
print(equilibrium(100, 1, 40, 1)) # (30.0, 70.0) supply shifts upEach shift changes where the benchmark sits. Whenever a later chapter compares a distorted market to the benchmark, it uses the equilibrium of the same curves, not an equilibrium from different ones.
What comes next
The next chapter links the slopes b and d to elasticity, which measures how strongly quantities respond to price. After that, the tutorial defines consumer and producer surplus as areas on this diagram, so that deadweight loss can be measured as a lost area.
Exercise
Demand is P = 90 − 2Q and supply is P = 10 + 3Q. Find the equilibrium quantity and price. Then check whether the 17th unit would be efficient to produce, by comparing its willingness to pay with its marginal cost.
Show answer
Here a = 90, b = 2, c = 10, d = 3. Q = (90 − 10) / (2 + 3) = 16. P = 90 − 2·16 = 58. Check with supply: 10 + 3·16 = 58. For the 17th unit, willingness to pay is 90 − 2·17 = 56 and marginal cost is 10 + 3·17 = 61. The cost exceeds the value by 5, so producing it would not be efficient. The market correctly stops at 16 units.
Exercise
In the running example (demand P = 100 − Q, supply P = 20 + Q), suppose the price is stuck at 70. How many units do buyers want, how many do sellers offer, and which side is short?
Show answer
Buyers want Q = 100 − 70 = 30 units. Sellers offer Q = 70 − 20 = 50 units. Sellers offer 20 more units than buyers want, so there is excess supply of 20 units and no one is short. Sellers would cut prices toward 60.