Sub topic 8
Computing Surplus with Linear Demand and Supply
Prerequisites and the market model
This chapter assumes that you can read supply and demand curves, find a market equilibrium, calculate triangle areas, and work with equations such as \(P=a-bQ\).
For a linear market, write demand as:
\[ P_D=a-bQ \]
and supply as:
\[ P_S=c+dQ \]
Here, \(a\) is the demand price intercept, \(b\) is the slope magnitude of demand, \(c\) is the supply price intercept, and \(d\) is the supply slope. The quantity \(Q\) is measured along the horizontal axis, and price \(P\) is measured along the vertical axis.
Market equilibrium occurs where the price buyers are willing to pay equals the price sellers require:
\[ a-bQ=c+dQ \]
Solving gives:
\[ Q^*=\frac{a-c}{b+d} \]
Then substitute \(Q^\) into either curve to find \(P^\).
Calculating the two surpluses
Consumer surplus is the difference between buyers’ willingness to pay and the price they actually pay. With linear demand, it is the area of a triangle:
\[ CS=\frac{1}{2}Q^(a-P^) \]
Producer surplus is the difference between the price sellers receive and their costs. With linear supply, it is also a triangle:
\[ PS=\frac{1}{2}Q^(P^-c) \]
Total surplus adds the gains received by both sides:
\[ TS=CS+PS \]
The same result can be found directly from the total gains from trade:
\[ TS=\frac{1}{2}Q^*(a-c) \]
| Measure | Triangle base | Triangle height | Formula |
|---|---|---|---|
| Consumer surplus | \(Q^*\) | \(a-P^*\) | \(\frac{1}{2}Q^*(a-P^*)\) |
| Producer surplus | \(Q^*\) | \(P^*-c\) | \(\frac{1}{2}Q^*(P^*-c)\) |
Worked example
Suppose demand is \(P=100-2Q\), and supply is \(P=10+Q\).
Set the equations equal:
\[ 100-2Q=10+Q \]
Thus:
\[ Q^*=30 \]
The equilibrium price is:
\[ P^*=10+30=40 \]
Now calculate the areas:
\[ CS=\frac{1}{2}(30)(100-40)=900 \]
\[ PS=\frac{1}{2}(30)(40-10)=450 \]
Therefore:
\[ TS=900+450=1350 \]
# Linear market: demand P = a - b*Q, supply P = c + d*Q
a, b = 100, 2
c, d = 10, 1
q_eq = (a - c) / (b + d)
p_eq = c + d * q_eq
cs = 0.5 * q_eq * (a - p_eq)
ps = 0.5 * q_eq * (p_eq - c)
print(q_eq, p_eq, cs, ps, cs + ps)
# 30.0 40.0 900.0 450.0 1350.0Common errors
- Do not use the equilibrium price as the height for either triangle. Use the vertical gap between the curve’s intercept and the equilibrium price.
- Do not confuse the demand intercept \(a\) with the supply intercept \(c\).
- Do not omit the factor \(\frac{1}{2}\). Surplus is triangular when the curves are linear.
- Check units. If price is dollars per unit and quantity is units, surplus is dollars.
- If a curve does not begin at a positive price intercept, the simple triangle formula may need adjustment.
Exercise
For demand P = 80 - Q and supply P = 20 + 2Q, find equilibrium quantity, equilibrium price, consumer surplus, producer surplus, and total surplus.
Show answer
Q = 20, P = 60, CS = 200, PS = 400, and TS = 600.