Chapter 1 established that scarcity forces choices and that the price system coordinates those choices. This chapter introduces the specific mechanism through which prices emerge: the interaction of supply and demand. The supply-and-demand model is the most widely used tool in economics. It explains how prices are determined in competitive markets, predicts how prices respond to changes in underlying conditions, and reveals the unintended consequences of price interventions.
The model rests on a simple premise: in a competitive market — one with many buyers, many sellers, and a homogeneous product — no single participant can dictate the price. Instead, the price emerges from the collective behavior of all participants. Our task is to formalize this process.
The phrase "willing and able" matters. Desire alone is not demand — a student who wants a Ferrari but cannot afford one does not contribute to the demand for Ferraris. Demand requires both the willingness to buy and the purchasing power to follow through. The phrase "holding all other factors constant" — sometimes written in Latin as ceteris paribus — is equally important. Demand describes the relationship between price and quantity when everything else stays the same. When other things change (income, tastes, the price of related goods), we are no longer moving along the same demand curve — we are shifting to a new one.
Why does demand slope downward? Two reinforcing mechanisms are at work:
Both effects push in the same direction: higher price, lower quantity demanded.
Consider a neighborhood's demand for cups of lemonade per day:
| Price ($/cup) | Quantity demanded (cups/day) |
|---|---|
| 0.50 | 90 |
| 1.00 | 80 |
| 1.50 | 70 |
| 2.00 | 60 |
| 2.50 | 50 |
| 3.00 | 40 |
| 3.50 | 30 |
| 4.00 | 20 |
| 4.50 | 10 |
| 5.00 | 0 |
Each row represents a price-quantity pair. Notice the inverse relationship: as price rises by \$1.50, quantity falls by 10 cups. This regular pattern can be captured by a linear demand function:
where $a$ is the quantity demanded when price is zero (the horizontal intercept) and $b$ is the absolute value of the slope. From the table: $a = 100$ and $b = 20$:
$$Q_d = 100 - 20P$$
The inverse demand function — price as a function of quantity:
$$P = \frac{a}{b} - \frac{1}{b}Q = 5 - \frac{Q}{20}$$
What this says: Plugging in the numbers from the schedule gives a concrete demand equation: every \$1 price increase reduces quantity demanded by 20 cups. The inverse form flips the equation to express price as a function of quantity — useful for graphing, since we plot price on the vertical axis.
Why it matters: Both forms describe the same relationship. The "regular" form ($Q$ as a function of $P$) is natural for calculating quantities. The "inverse" form ($P$ as a function of $Q$) is what you read off the demand curve on a standard graph.
What changes: If the intercept $a$ rises (more demand at every price), the entire curve shifts right. If the slope $b$ rises (demand more sensitive to price), the curve becomes flatter.
In Full Mode, the numerical demand function and its inverse are derived explicitly.Figure 2.1. The demand curve shows the quantity demanded at each price, holding all other factors constant. It slopes downward by the law of demand. Hover over the curve or the schedule points for exact values.
A movement along the demand curve occurs when the good's own price changes — the consumer moves to a different point on the same curve. A shift of the demand curve occurs when any factor other than the good's own price changes. The entire curve moves left or right.
A critical rule of thumb: If you're analyzing the effect of a change in the good's own price, you move along the curve. If you're analyzing the effect of anything else, you shift the curve. Mixing these up leads to serious analytical errors.
There is a deeper reason why supply curves slope upward: increasing marginal cost. As a firm produces more, it eventually runs into capacity constraints. Each additional unit costs more to produce than the last. The firm produces that unit only if the price covers its rising marginal cost.
| Price ($/cup) | Quantity supplied (cups/day) |
|---|---|
| 0.50 | 0 |
| 1.00 | 10 |
| 1.50 | 20 |
| 2.00 | 30 |
| 2.50 | 40 |
| 3.00 | 50 |
| 3.50 | 60 |
| 4.00 | 70 |
From the table, the supply parameters fall straight out of the numbers.
From the table: $c = -10$, $d = 20$, so $Q_s = 20P - 10$. The inverse supply function — price as a function of quantity:
$$P = -\frac{c}{d} + \frac{1}{d}Q = 0.50 + \frac{Q}{20}$$
What this says: Plugging the schedule numbers into the supply equation gives $Q_s = 20P - 10$: every \$1 price increase draws out 20 more cups. The inverse form flips it to express price as a function of quantity — the form you read off the supply curve, since price sits on the vertical axis.
Why it matters: The two forms describe the same relationship. The "regular" form ($Q$ as a function of $P$) is natural for computing quantities supplied at a price. The "inverse" form ($P$ as a function of $Q$) tells you the minimum price a seller needs to bring the next unit to market — it traces rising marginal cost.
What changes: Raising the intercept $c$ (making it less negative — lower costs) shifts the whole curve to the right: more is supplied at every price. Raising the slope $d$ flattens the curve, so quantity supplied responds more strongly to price.
In Full Mode, the numerical supply function and its inverse are derived explicitly.Figure 2.3. The supply curve shows the quantity supplied at each price. It slopes upward because higher prices make production more profitable. Hover for exact values.
Set $Q_d = Q_s$:
Solving:
What this says: The equilibrium price is found by setting quantity demanded equal to quantity supplied and solving for price. The equilibrium quantity follows by plugging that price back into either equation.
Why it matters: This is the market-clearing condition — the one price at which buyers want to buy exactly as much as sellers want to sell. No surplus, no shortage, no pressure for the price to change.
What changes: If the demand intercept $a$ rises (demand increases), the equilibrium price and quantity both rise. If the supply intercept $c$ rises (supply increases), the equilibrium price falls and quantity rises. Steeper curves (larger $b$ and $d$) compress the equilibrium price toward the midpoint and make it less sensitive to shifts.
In Full Mode, Eqs. 2.3-2.5 derive the equilibrium price and quantity algebraically.Example 2.1
Using $Q_d = 100 - 20P$ and $Q_s = 20P - 10$:
\$100 - 20P = 20P - 10 \implies 110 = 40P \implies P^* = 2.75$
$Q^* = 100 - 20(2.75) = 45$ cups per day. Verification: $Q^* = 20(2.75) - 10 = 45$ ✓
Surplus (price too high). At $P = 3.50$: $Q_d = 30$ but $Q_s = 60$. Sellers have 30 unsold cups — a surplus. They cut prices until $P^* = 2.75$.
Shortage (price too low). At $P = 1.50$: $Q_d = 70$ but $Q_s = 20$. Frustrated buyers bid the price up to $P^*$.
From the equilibrium price formula $P^* = \frac{a - c}{b + d}$, we can read off the comparative statics directly:
A rise in $a$ (demand shift right) raises the equilibrium price. A rise in $c$ (supply shift right) lowers it. For quantities, substituting back into the demand function:
What this says: When demand increases (the whole curve shifts right), both the equilibrium price and quantity rise. When supply increases (the whole curve shifts right), the equilibrium price falls but quantity rises. These predictions follow directly from the equilibrium formula.
Why it matters: This is the core tool of supply-and-demand analysis: you identify which curve shifted, and the formula tells you what happens to price and quantity. Every newspaper story about "prices rose because of X" is implicitly making a comparative statics argument.
What changes: The steeper the supply and demand curves (larger $b + d$), the smaller the price response to any shift. Flat curves mean prices are very sensitive to shocks; steep curves mean quantities adjust more than prices.
In Full Mode, Eqs. 2.6-2.7 derive these predictions algebraically from the equilibrium formula.The demand intercept $a$ represents "how much people want the good" — driven by income, tastes, expectations, or number of buyers. Slide it to simulate a demand shift and watch the equilibrium move along the supply curve.
Figure 2.5. Drag the slider to shift the demand curve. The green equilibrium point moves along the supply curve. Shaded areas show consumer surplus (blue) and producer surplus (red). The dashed line is the original demand curve for reference.
The supply intercept $c$ represents production costs. A frost in the lemon-growing region raises costs (shifting supply left, making $c$ more negative). A technology improvement lowers costs (shifting supply right, making $c$ less negative). Watch the equilibrium ride along the demand curve.
Figure 2.6. Drag the slider to shift the supply curve. The equilibrium rides along the demand curve. When supply shifts right (lower costs), price falls and quantity rises — the signature of a supply increase.
When both curves shift at the same time, one variable's direction is unambiguous (both shifts push it the same way), while the other is ambiguous (depends on magnitudes). Use both sliders to explore:
Figure 2.7. Drag both sliders. Watch how some combinations produce unambiguous outcomes (both shifts push price the same way) while quantity becomes ambiguous, or vice versa. The dashed curves show the original positions.
General principle for simultaneous shifts:
| Demand ↑ | Demand ↓ | |
|---|---|---|
| Supply ↑ | Q ↑ unambiguous; P ambiguous | P ↓ unambiguous; Q ambiguous |
| Supply ↓ | P ↑ unambiguous; Q ambiguous | Q ↓ unambiguous; P ambiguous |
A heat wave increases demand for lemonade. The demand intercept rises from $a = 100$ to $a = 120$: $Q_d = 120 - 20P$.
New equilibrium: \$120 - 20P = 20P - 10 \implies 130 = 40P \implies P^* = 3.25$, $Q^* = 120 - 20(3.25) = 55$.
Result: price rises from \$2.75 to \$3.25 (+\$0.50), quantity rises from 45 to 55 (+10 cups). Both increase when demand shifts right.
A frost destroys lemon groves, raising costs. Supply intercept shifts from $c = -10$ to $c = -30$: $Q_s = 20P - 30$.
New equilibrium: \$100 - 20P = 20P - 30 \implies 130 = 40P \implies P^* = 3.25$, $Q^* = 100 - 20(3.25) = 35$.
Result: price rises from \$2.75 to \$3.25 (+\$0.50), quantity falls from 45 to 35 (−10 cups). Price and quantity move in opposite directions when supply shifts left.
Heat wave ($a = 120$) and lemon frost ($c = -30$) hit simultaneously.
\$120 - 20P = 20P - 30 \implies 150 = 40P \implies P^* = 3.75$, $Q^* = 120 - 20(3.75) = 45$.
Price rises unambiguously (\$2.75 → \$3.75) because both shifts push price up. Quantity is unchanged (45 → 45) because the two shifts are equal in magnitude and push quantity in opposite directions. If the demand shift were larger, Q would rise; if the supply shift were larger, Q would fall.
When a binding price ceiling $\bar{P} < P^*$ is imposed, the shortage equals:
The shortage grows linearly as the ceiling is pushed further below $P^*$. At the equilibrium price, the shortage is zero; at a ceiling of zero, the shortage equals $a - c$ (maximum possible demand minus minimum possible supply).
What this says: When the government caps a price below where the market would naturally settle, more people want to buy than sellers are willing to supply. The gap between what buyers want and what sellers offer is the shortage.
Why it matters: Shortages don't just mean "less stuff" — they mean the price mechanism stops working as an allocator. Something else must ration the good: waiting in line, connections, black markets, or luck. These alternatives are almost always less efficient than letting the price adjust.
What changes: The further the ceiling is pushed below equilibrium, the larger the shortage. Steeper curves (less elastic supply and demand) produce smaller shortages for the same price distortion, because quantities respond less to the price change.
In Full Mode, Eq. 2.8 derives the shortage formula from the demand and supply functions.Drag the price ceiling. When it's above equilibrium (\$2.75), it has no effect. As you drag it below equilibrium, a shortage appears and grows.
Figure 2.8. Drag the ceiling below \$2.75 to see the shortage appear. The gap between quantity demanded and quantity supplied is the shortage — allocated by queuing, rationing, or black markets instead of price.
The city imposes a price ceiling of \$1.00 per cup on lemonade ($Q_d = 100 - 20P$, $Q_s = 20P - 10$, $P^* = 2.75$).
At $P = 2.00$: $Q_d = 100 - 20(2) = 60$, $Q_s = 20(2) - 10 = 30$.
Shortage = $Q_d - Q_s = 60 - 30 = 30$ cups. The ceiling is binding (below $P^*$), creating a shortage of 30 cups per day. Some willing buyers cannot purchase lemonade at the controlled price.
Real-world application: Rent control. The most prominent price ceiling is rent control. When the cap is below the market-clearing rent: shortage of apartments, deterioration of quality (landlords underinvest), misallocation (apartments go to those who found them first, not those who value them most), reduced construction, and black-market side payments.
A binding price floor $\bar{P} > P^*$ is the mirror image of the ceiling. The surplus equals:
The surplus grows linearly as the floor is pushed further above $P^*$. At the equilibrium price the surplus is zero; in a labor market, this surplus is involuntary unemployment.
What this says: When the government sets a price above where the market would settle, sellers want to supply more than buyers want to buy. The gap between what sellers offer and what buyers absorb is the surplus — unsold cups here, unemployed workers in a labor market.
Why it matters: A floor is the mirror image of a ceiling. A ceiling caps the price low and produces a shortage; a floor props the price high and produces a surplus. The same logic — price prevented from clearing the market — runs both ways. This is why the minimum-wage debate is really the price-floor diagram applied to labor.
What changes: The further the floor is pushed above equilibrium, the larger the surplus. Steeper (less elastic) curves produce smaller surpluses for the same price distortion, because quantities respond less to the price change.
In Full Mode, Eq. 2.8b derives the surplus formula as the mirror of the ceiling's shortage formula.Figure 2.9. Drag the floor above \$2.75 to see the surplus appear. The gap between quantity supplied and quantity demanded is the surplus — unsold output (or, in labor markets, unemployment).
The city imposes a price floor of \$1.50 per cup on lemonade.
At $P = 3.50$: $Q_d = 100 - 20(3.50) = 30$, $Q_s = 20(3.50) - 10 = 60$.
Surplus = $Q_s - Q_d = 60 - 30 = 30$ cups. The floor is binding (above $P^*$), creating a surplus of 30 cups per day. Sellers cannot find enough buyers at the mandated price.
Real-world application: The minimum wage. The most prominent price floor is the minimum wage. If set above the equilibrium wage, the simple model predicts a surplus of labor — unemployment. However, Card and Krueger's famous 1994 study found no significant employment effect of a minimum wage increase in New Jersey, illustrating why theoretical predictions must always be tested against data. If firms have monopsony power, a minimum wage can actually increase employment.
The surplus-and-shortage welfare reasoning behind these price-intervention diagrams isn't original to the modern textbook — it descends from the marginalist revolution, which gave price theory its formal apparatus of consumer and producer surplus.
Rent control has a concrete historical record: interwar Vienna's municipal cost-rent housing ("Red Vienna") is the canonical large-scale experiment — see the interwar chapter in the economic-history book.
A housing activist's video argues that economists' opposition to rent control is ideological, not empirical — that the famous "93% oppose it" IGM survey was a rigged question, and that Diamond et al. (2019) actually proves rent control works for the people it protects. The video has a point about one thing. But it misses the mechanism that makes rent control self-defeating.
Intro“A person who is working a full-time minimum wage job cannot afford a two-bedroom apartment in any state in the United States of America.”
— Alexandria Ocasio-Cortez, House floor, February 2019
Alexandria Ocasio-Cortez argued on the House floor that no one can survive on \$7.25 an hour and that a \$15 federal minimum wage is a matter of basic dignity. The clip went viral — millions of views across platforms. The moral force is real. But \$15 is a number, not a principle, and it lands very differently in Manhattan than in rural Mississippi.
IntroWhen a country opens to international trade, the market operates at the world price $P_W$. If $P_W < P^*_{domestic}$, the country imports (domestic demand exceeds domestic supply at the world price). If $P_W > P^*_{domestic}$, the country exports.
With a tariff $t$ on imports, the domestic price rises to $P_W + t$. Imports shrink, and two deadweight loss triangles appear:
Deadweight loss grows with the square of the tariff: doubling the tariff quadruples the efficiency loss.
What this says: A tariff raises the domestic price above the world price, which shrinks imports from both sides: domestic buyers purchase less and domestic producers supply more. The efficiency loss comes from two sources — domestic firms producing goods they could have imported more cheaply, and consumers forgoing purchases they would have made at the lower world price.
Why it matters: The deadweight loss grows with the square of the tariff rate, not linearly. Small tariffs cause small losses; large tariffs cause disproportionately large losses. This "triangle rule" is why economists generally favor low uniform tariffs over high targeted ones if protection is politically unavoidable.
What changes: If domestic supply and demand are more elastic (flatter curves, larger $b$ and $d$), the same tariff causes more distortion because quantities respond more to the price change. In markets with steep, inelastic curves, tariffs cause smaller efficiency losses but also do less to reduce imports.
In Full Mode, Eqs. 2.9-2.10 derive the import and deadweight loss formulas from the linear model.The world price of lemonade is $P_W = 2.00$, below the domestic equilibrium of $P^* = 2.75$.
At $P_W = 2.00$: $Q_d = 100 - 20(2) = 60$, $Q_s = 20(2) - 10 = 30$.
Imports = $Q_d - Q_s = 60 - 30 = 30$ cups per day. Domestic consumers gain from cheaper lemonade; domestic producers lose as they produce less at the lower price.
A tariff of $t = 0.50$ per cup is imposed on imported lemonade. Domestic price rises to $P_W + t = 2.50$.
At $P = 2.50$: $Q_d = 100 - 20(2.50) = 50$, $Q_s = 20(2.50) - 10 = 40$.
Imports fall from 30 to 10 cups. Tariff revenue = \$1.50 \times 10 = \\$1.00$. Two DWL triangles appear: (1) production DWL from inefficient domestic production replacing cheaper imports ($\frac{1}{2}(0.50)(40 - 30) = 2.50$), (2) consumption DWL from lost consumer purchases ($\frac{1}{2}(0.50)(60 - 50) = 2.50$). Total DWL = \$1.00.
Figure 2.10. Adjust the world price to see imports (when $P_W$ is below autarky equilibrium) or exports (when above). Add a tariff to see imports shrink, domestic production rise, and deadweight loss appear. The yellow triangles are DWL from the tariff.
The tariff diagram is partial-equilibrium and aspatial. The same trade it abstracts has a concrete geography — the routes, ports, and bilateral flows that the spatial trade map lays out.
The argument over whether a trade surplus is a nation's gain or a mutual surplus is shared has a long intellectual history. The history-of-thought timeline traces it from the mercantilists through Hume and Smith to Ricardo's case for comparative advantage.
For the lineage of these ideas: the trade-surplus-versus-mutual-gain debate begins with the mercantilists and Hume's specie-flow correction, and the formal answer — Ricardo's comparative advantage — arrives with classical political economy.
The distributional damage the model hides played out concretely in the post-2000 China shock — see globalization and the Great Moderation and the era after the financial crisis in the economic-history book.
“We are right now taking in \$billions in Tariffs. MAKE AMERICA RICH AGAIN. I am a Tariff Man.”
@realDonaldTrump — December 2018
At rally after rally, Trump declared himself "a Tariff Man" and called tariffs "the greatest thing ever invented," claiming they'd bring back manufacturing, punish China, and make foreign countries pay billions into the US Treasury. The crowds loved it. Economists almost universally cringed. But here's the uncomfortable part: East Asia industrialized behind tariff walls, and the US itself used tariffs throughout its 19th-century rise. Is Trump simply wrong, or is he crudely right about something the profession doesn't like to admit?
IntroMaya has set up her lemonade stand. She surveys her neighborhood and estimates daily demand: $Q_d = 100 - 20P$. Her supply function, based on costs: $Q_s = 20P - 10$.
Setting demand equal to supply: \$100 - 20P = 20P - 10 \implies P^* = 2.75$, $Q^* = 45$.
Maya will sell 45 cups per day at \$2.75 each, earning revenue of \$123.75/day. Her opportunity cost is \$120/day (the bookstore job from Chapter 1). She's making at most \$3.75 per day above her opportunity cost — precarious. Any shock (a tax, a competitor, a rise in lemon prices) could push her into negative territory.
| Label | Equation | Description |
|---|---|---|
| Eq. 2.1 | $Q_d = a - bP$ | Linear demand function |
| Eq. 2.2 | $Q_s = c + dP$ | Linear supply function |
| Eq. 2.3 | $a - bP^* = c + dP^*$ | Equilibrium condition |
| Eq. 2.4 | $P^* = (a - c)/(b + d)$ | Equilibrium price |
| Eq. 2.5 | $Q^* = a - bP^*$ | Equilibrium quantity |
| Eq. 2.6 | $\Delta P^*/\Delta a = 1/(b+d)$ | Comparative statics: price response to demand shift |
| Eq. 2.7 | $\Delta Q^*/\Delta a = d/(b+d)$ | Comparative statics: quantity response to demand shift |
| Eq. 2.8 | $\text{Shortage} = (a-c) - (b+d)\bar{P}$ | Shortage under binding price ceiling |
| Eq. 2.9 | $\text{Imports} = Q_d(P_W+t) - Q_s(P_W+t)$ | Imports under tariff |
| Eq. 2.10 | $\text{DWL} = \frac{(b+d)}{2}t^2$ | Deadweight loss from tariff (linear model) |