Sub topic 3
Stating the Law of Demand
What this chapter assumes
You should be comfortable with two ideas from earlier in this tutorial. Quantity demanded is the amount buyers are willing and able to purchase at one specific price. Ceteris paribus ("all else equal") means we change one variable and hold the others fixed. You should also be able to read a linear equation such as Q = 100 - 2P. This chapter turns those ideas into a precise statement and shows how to apply it correctly and how it gets misapplied.
The statement
The law of demand says:
> When the price of a good rises, and nothing else that affects buying changes, the quantity demanded of that good falls. When the price falls, the quantity demanded rises.
Economists often shorten this to "price and quantity demanded move in opposite directions, ceteris paribus." The relationship is called inverse or negative.
The statement has five working parts, and each one rules out a common misreading.
The good is fixed
The law is about one specific good, such as a particular grade of coffee beans in a particular market. If the product changes in quality or brand, you are no longer observing the same good.
The cause is the good's own price
The law concerns the good's own price. The price of a substitute or complement also affects demand, but that is a different relationship. It belongs to the chapter on what shifts demand.
The response is quantity demanded
The law predicts a change in quantity demanded, not a change in demand. This distinction is the most common source of confusion, and the chapter on movement versus shift covers it fully. For now, treat "quantity demanded" as a single number at a single price, and "demand" as the whole relationship between price and quantity.
Everything else is held constant
Income, tastes, expectations, the prices of related goods, and the number of buyers are held fixed. Without this condition the law would be false, as the next section shows.
The direction is the claim
The law gives a direction, not a size. It says quantity falls, but not by how much. Measuring how much is the job of elasticity, which comes later.
Why the ceteris paribus clause is not decoration
Suppose you collect three years of data on a good that is normal, meaning people buy more of it as their income rises. Each year both the price and incomes rise. The true demand relationship is Q = 20 - 2P + 0.01 × income.
def quantity_demanded(price, income, a=20, b=2, c=0.01):
"""Normal good: Q = a - b * P + c * income."""
return max(a - b * price + c * income, 0)
# What an analyst sees in raw data: price and income both rise each year
print("Raw data (price and income both change)")
for year, (price, income) in enumerate([(5, 3000), (6, 4000), (7, 5000)], start=1):
print(year, price, income, round(quantity_demanded(price, income), 1))
# What the law of demand describes: income held fixed at 3000
print("Income held constant")
for price in (5, 6, 7):
print(price, round(quantity_demanded(price, 3000), 1))
# Output:
# Raw data (price and income both change)
# 1 5 3000 40.0
# 2 6 4000 48.0
# 3 7 5000 56.0
# Income held constant
# 5 3000 40.0
# 6 3000 38.0
# 7 3000 36.0In the raw data, quantity rises from 40 to 56 while price rises from 5 to 7. A careless reader might conclude that higher prices cause higher purchases. In fact, income rose and pushed demand up by more than the price increase pushed quantity down. In the second table income is fixed, and the law shows up cleanly: each price increase reduces quantity demanded by 2.
The raw data do not contradict the law. They mix two effects, one from the price change and one from the income change. The ceteris paribus condition tells you to separate them before drawing a conclusion.
The law in symbols
If we write quantity demanded as a function of price with everything else fixed, Q = f(P), the law says that f is decreasing: for any two prices P₁ < P₂, we expect f(P₁) ≥ f(P₂).
If you know calculus, you can write the same idea as dQ/dP < 0. For the linear function Q = a - bP used in this tutorial, the slope is -b. The law therefore requires b > 0. In the example above b = 2, so each extra unit of price removes 2 units of quantity.
Two details matter when you apply the symbols:
- The inequality is often stated in a weak form (quantity does not rise) for a short price range, since a real schedule may have flat stretches. Many textbooks use the strict form for convenience.
- The function is defined only where quantity is non-negative. In the linear model, once a - bP reaches zero, quantity demanded stays at zero. That is why the code uses
max(..., 0).
A law of behavior, not of logic
The law of demand is not true by definition. It is an empirical regularity: a pattern found repeatedly in observed markets for ordinary goods. It could in principle fail, and we can ask when and why. Later chapters give the explanation (the substitution effect, the income effect, and diminishing marginal utility) and the rare exceptions (Giffen and Veblen goods).
Two consequences follow from this status:
- The law is stated for a market or for a group of buyers on average. One buyer may not change purchases when a price moves slightly. The law says the total tends to fall, not that every person adjusts.
- The law is a conditional prediction. It tells you what to expect if price changes and all else is equal. It does not predict what price will do.
Checking data against the law
You can turn the statement into a test. Given observed pairs of price and quantity demanded, measured with all else equal, the law requires that no higher price comes with a higher quantity.
def obeys_law_of_demand(observations):
"""observations: list of (price, quantity) pairs measured ceteris paribus.
Returns True if no higher price is paired with a higher quantity."""
ordered = sorted(observations)
for (p1, q1), (p2, q2) in zip(ordered, ordered[1:]):
if p2 > p1 and q2 > q1:
return False
return True
consistent = [(10, 80), (20, 60), (30, 40)]
violating = [(10, 80), (20, 90), (30, 40)]
flat_stretch = [(10, 80), (20, 80), (30, 40)]
print(obeys_law_of_demand(consistent)) # True
print(obeys_law_of_demand(violating)) # False
print(obeys_law_of_demand(flat_stretch)) # TrueThe function takes the weak form of the law, so a flat stretch passes. The function can only be meaningful if the input really holds everything else constant. If the pairs come from different years with different incomes, a False result tells you about the data collection, not about the law.
Common errors
| Error | What is wrong | Correct reading |
|---|---|---|
| "Price went up and sales went up, so the law failed." | Another factor probably shifted demand. | Check income, tastes, expectations, related prices, and buyers. |
| "The law says people stop buying when prices rise." | It claims a decrease in quantity, not zero. | Quantity demanded falls, often modestly. |
| "Demand falls when price rises." | This confuses demand with quantity demanded. | Quantity demanded falls. Demand, the whole relationship, stays the same. |
| "The law says how much quantity falls." | It gives only a direction. | The size of the response is measured by elasticity. |
| "If I raise my price, my sales must fall." | The law is about a market with all else equal. | A firm's sales also depend on competitors' prices and on shifts in demand. |
| "Each buyer must reduce purchases." | The law describes buyers in aggregate. | Some individuals may not change their behavior. |
Stating the law in your own words
A good statement of the law has four elements: the good's own price, the direction of the change, quantity demanded as the response, and the ceteris paribus condition. For example:
"For a given good, if its price rises while income, tastes, expectations, related-good prices, and the number of buyers stay the same, buyers will want to purchase less of it."
This sentence is the starting point for the next chapter. There we write the same relationship as a demand schedule, a table that lists quantity demanded at each of several prices.
Exercise
A city's data show that over five years the average price of a bus ride rose each year and the number of rides taken also rose each year. A student says this disproves the law of demand. Give a better explanation, and say what you would need to hold constant to test the law.
Show answer
Rising rides alongside rising fares suggests demand shifted rightward. Possible causes are population growth (more buyers), rising fuel prices that make driving a costlier substitute, or higher incomes if bus travel is a normal good. Observed price and quantity then lie on different demand curves. To test the law you would compare quantities at different fares while holding these other factors constant, for example by comparing riders before and after a fare change in a short window where nothing else changed.
Exercise
With Q = 20 - 2P + 0.01 × income, a buyer's income is 3000. Find quantity demanded at P = 8 and at P = 12. Then state whether income rising to 4000 changes the answer to "does a higher price lower quantity demanded?"
Show answer
At income 3000, Q = 20 - 16 + 30 = 34 when P = 8, and Q = 20 - 24 + 30 = 26 when P = 12. A higher price lowers quantity demanded by 8 units. At income 4000 the quantities are 44 and 36, so every quantity is 10 units higher, but quantity still falls by 8 as the price rises from 8 to 12. The income change shifts demand, while the law (the direction of the price effect at fixed income) still holds.
Exercise
Use obeys_law_of_demand to decide whether [(5, 50), (15, 30), (25, 35)] is consistent with the law. What does your answer tell you about the data, and what should you check next?
Show answer
The function returns False, because the price rises from 15 to 25 while quantity rises from 30 to 35. This does not prove the law is wrong. It suggests that something else changed between those two observations, so you should check whether income, tastes, expectations, related prices, or the number of buyers differed when the data were collected.