Microeconomics • Competitive Markets: Supply, Demand & Welfare

Utility Maximization & Demand Derivation

How rational consumer choices under budget constraints give rise to the downward-sloping demand curve.

Microeconomics emblem with a scatter chart, coins, and a shopping basket.
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

The demand curve is one of the most familiar images in economics, yet for centuries economists struggled to explain why consumers buy less when prices rise. Classical economists such as Adam Smith discussed value in terms of labor and production costs, but this approach could not resolve the famous diamond–water paradox: water is essential to life yet cheap, while diamonds are inessential yet expensive. The resolution required a fundamentally new way of thinking about value—one rooted not in production, but in the subjective satisfaction a consumer derives from each additional unit of a good.

1776 • Smith's Paradox of Value

Adam Smith identified the diamond–water paradox in The Wealth of Nations, exposing the gap between 'use value' and 'exchange value' that classical theory could not bridge.

1871 • The Marginalist Revolution

William Stanley Jevons, Carl Menger, and Léon Walras independently proposed that value derives from marginal utility—the additional satisfaction from one more unit—resolving Smith's paradox.

1890 • Marshall's Demand Curves

Alfred Marshall synthesized marginal utility theory with supply analysis in his Principles of Economics, formalizing the downward-sloping demand curve that is still taught today.

1934 • Hicks–Allen Ordinal Utility

John Hicks and R.G.D. Allen replaced measurable (cardinal) utility with ordinal preference rankings and indifference curve analysis, placing demand theory on a more rigorous foundation.

1950s • Samuelson's Revealed Preference

Paul Samuelson demonstrated that demand functions can be derived purely from observed choices, without assuming an underlying utility function—a methodological breakthrough for empirical economics.

The central question this lesson addresses is deceptively simple: given a consumer's preferences and a fixed budget, how does the consumer choose the best combination of goods, and how does that optimal choice change when a price changes? Answering this question rigorously is what connects the abstract idea of utility maximization to the concrete, observable demand curve that firms use in pricing decisions, governments rely on for tax policy, and financial analysts embed in market forecasts.

SECTION 2

Core Principles & Definitions

Before deriving demand, we need a precise vocabulary for describing consumer behavior. The framework rests on a small set of assumptions: consumers have well-defined preferences, they face a budget constraint, and they choose the affordable bundle that ranks highest in their preference ordering. The following concepts form the building blocks of that framework.

1

Utility Function

A mathematical representation U(x, y) that assigns a numerical score to each consumption bundle, reflecting the consumer's preference ranking. Higher numbers indicate more-preferred bundles. Only the ordinal ranking matters, not the specific numbers.
2

Marginal Utility (MU)

The additional utility gained from consuming one more unit of a good, holding everything else constant. The law of diminishing marginal utility states that MU typically falls as consumption increases.
3

Budget Constraint

The set of all bundles a consumer can afford given income M and prices Px and Py. The budget line is: Px·x + Py·y = M.
4

Indifference Curve

A curve connecting all bundles that yield the same utility level. Indifference curves are downward-sloping, convex to the origin, and never cross. Movement to a higher curve represents an increase in satisfaction.
5

Marginal Rate of Substitution (MRS)

The rate at which a consumer is willing to trade good y for good x while remaining equally satisfied. Formally, MRS = MUx / MUy. It equals the (negative of the) slope of the indifference curve.
✦

KEY TAKEAWAY

Think of utility maximization like managing a limited marketing budget across two advertising channels. Each additional dollar spent on social media ads yields some incremental revenue (marginal utility), and so does each dollar on search ads. You keep reallocating spending toward the channel with the higher bang-per-buck until the last dollar spent on each channel produces the same marginal return. At that point, no reallocation can improve your total outcome—you have maximized utility subject to your budget constraint.

SECTION 3

Visual Explanation: The Optimal Bundle

The consumer's problem has an elegant geometric interpretation. The budget line represents all affordable combinations of goods x and y, while each indifference curve represents bundles yielding equal satisfaction. The consumer seeks the highest indifference curve that still touches the budget line. At this tangency point, the slope of the indifference curve (−MRS) equals the slope of the budget line (−Px/Py), which is the optimality condition MRS = Px/Py.

Good xGood yBudget LineU₃ (unaffordable)U₂ (optimal)U₁ (sub-optimal)E* (Optimal Bundle)x*y*Tangency: MRS = Pₓ / Pᵧ
At the optimal bundle E*, the indifference curve U2 is tangent to the budget line. The consumer cannot reach U3 (it lies entirely above the budget set), while U1 is affordable but leaves utility on the table. The dashed projections show the optimal quantities x* and y*.

The intuition is straightforward: at any point along the budget line that is not the tangency, the indifference curve crosses the budget line, meaning the consumer can move along the budget line toward a higher indifference curve. Only at the tangency is there no further improvement available. This tangency condition, MRS = Px/Py, is equivalent to saying that the consumer's subjective rate of trade-off between the two goods exactly equals the market's rate of trade-off (the price ratio). In business terms, the consumer has equalized the 'return on the last dollar' across all goods.

SECTION 4

Mathematical Framework

The consumer's optimization problem can be stated formally using constrained optimization. The consumer maximizes utility U(x, y) subject to the budget constraint Px·x + Py·y = M. We solve this using the Lagrangian method, which converts a constrained problem into an unconstrained one by introducing a multiplier λ.

LAGRANGIAN

L=U(x,y)−λ(Px⋅x+Pγ⋅y−M)ℒ = U(x, y) − λ(Pₓ·x + Pᵧ·y − M)

where U(x, y) is the utility function, λ is the Lagrange multiplier (interpreted as the marginal utility of income), Px and Py are the prices of goods x and y, and M is income.

FIRST-ORDER CONDITIONS

∂L/∂x=MUx−λPx=0→MUx/Px=λ∂L/∂y=MUγ−λPγ=0→MUγ/Pγ=λ∂L/∂λ=M−Px⋅x−Pγ⋅y=0∂ℒ/∂x = MUₓ − λPₓ = 0 → MUₓ/Pₓ = λ ∂ℒ/∂y = MUᵧ − λPᵧ = 0 → MUᵧ/Pᵧ = λ ∂ℒ/∂λ = M − Pₓ·x − Pᵧ·y = 0

The first two conditions imply MUx/Px = MUy/Py, the equal-marginal-utility-per-dollar rule.

OPTIMALITY CONDITION (TANGENCY)

MRS=MUx/MUγ=Px/PγMRS = MUₓ / MUᵧ = Pₓ / Pᵧ

The marginal rate of substitution equals the price ratio. This is the tangency condition visible in the diagram: the slope of the indifference curve equals the slope of the budget line.

To derive the demand function for good x, we solve the tangency condition together with the budget constraint to express the optimal quantity of x as a function of its own price, the price of y, and income: x* = Dx(Px, Py, M). This function tells us how much of good x the consumer buys at every possible price Px, holding Py and M constant—which is precisely the individual demand curve for x.

COBB-DOUGLAS DEMAND (EXAMPLE)

IfU(x,y)=xα⋅yβ,thenx∗=(α/(α+β))⋅(M/Px)If U(x, y) = x^α · y^β, then x* = (α / (α + β)) · (M / Pₓ)

For Cobb-Douglas preferences, the consumer spends a fixed fraction α/(α + β) of income on good x, regardless of prices. This is a convenient result for business applications because the expenditure share is constant.

SECTION 5

From Optimal Choice to the Demand Curve

The price-consumption curve (PCC) traces out the sequence of optimal bundles as the price of good x changes while income and Py remain fixed. When Px falls, the budget line pivots outward along the x-axis, creating a new tangency on a higher indifference curve and generally increasing the quantity of x purchased. By recording each (Px, x*) pair and plotting price on the vertical axis and quantity on the horizontal axis, we obtain the individual's demand curve for good x. The diagram below illustrates this two-panel derivation.

Panel A: Indifference Curve MapxyBL₁ (P₁ high)BL₂BL₃ (P₃ low)U₁U₂U₃E₁E₂E₃PCCPanel B: Derived Demand CurvexPₓP₁x₁P₂x₂P₃x₃D(x)As Pₓ falls (BL pivots outward), optimal x* rises.Plotting each (Pₓ, x*) pair in Panel B traces the demand curve.
Panel A shows three budget lines as Px decreases from P1 to P3. Each tangency (E1, E2, E3) lies on the orange price-consumption curve (PCC). Panel B maps each price-quantity pair to obtain the downward-sloping demand curve D(x).

Two distinct effects explain why the demand curve slopes downward. The substitution effect captures the change in quantity demanded due solely to the change in the relative price of good x (holding utility constant). When x becomes cheaper relative to y, the consumer substitutes toward x. The income effect captures the change in quantity demanded due to the change in purchasing power: a lower price of x effectively increases real income, and if x is a normal good, the consumer buys more of it. For normal goods, both effects reinforce the negative price-quantity relationship. Only for Giffen goods (an extreme case of inferior goods) does the income effect dominate in the opposite direction, producing an upward-sloping demand curve—an empirical rarity.

EffectHolds ConstantDirection for Normal Good
Substitution EffectUtility level (moves along the original indifference curve)Always increases x when Px falls
Income EffectRelative prices (shifts to a new indifference curve)Increases x (reinforces substitution effect)
Total Effect— (observed market response)Quantity demanded rises; demand curve slopes downward

Decomposition of the price effect into substitution and income effects

SECTION 6

Worked Example: Cobb-Douglas Utility

Suppose a consumer has the utility function U(x, y) = x0.4 · y0.6, with income M = $200, Px = $10, and Py = $20. We will find the optimal bundle and then derive the demand function for good x.

Finding the Optimal Bundle & Demand Function

  1. 1

    Step 1 — Compute Marginal Utilities

    For U = x0.4y0.6, take partial derivatives: MUx = 0.4 × x−0.6 × y0.6 and MUy = 0.6 × x0.4 × y−0.4.
  2. 2

    Step 2 — Apply the Tangency Condition

    Set MRS = Px/Py. MRS = MUx/MUy = (0.4y)/(0.6x) = 2y/(3x). Setting this equal to Px/Py = 10/20 = 1/2, we get 2y/(3x) = 1/2, which simplifies to y = 3x/4.
    y = 3x/4
  3. 3

    Step 3 — Substitute into the Budget Constraint

    The budget constraint is 10x + 20y = 200. Substituting y = 3x/4: 10x + 20(3x/4) = 10x + 15x = 25x = 200, so x* = 8. Then y* = 3(8)/4 = 6.
    Optimal bundle: (x*, y*) = (8, 6)
  4. 4

    Step 4 — Verify the Expenditure-Share Property

    Spending on x: 10 × 8 = $80, which is 80/200 = 40% of income. Spending on y: 20 × 6 = $120, which is 120/200 = 60% of income. These exactly match the exponents α = 0.4 and β = 0.6, confirming the Cobb-Douglas constant expenditure share result.
    Expenditure shares: 40% on x, 60% on y ✓
  5. 5

    Step 5 — Derive the General Demand Function

    Using the Cobb-Douglas formula x* = [α/(α + β)] × (M/Px) = [0.4/(0.4 + 0.6)] × (M/Px) = 0.4M/Px. This is the demand function for good x. With M = 200, we get x* = 80/Px. Notice demand is inversely proportional to price—a rectangular hyperbola—confirming the downward slope.
    Demand function: x* = 0.4M / Pₓ = 80 / Pₓ

SECTION 7

Strengths, Limitations & Real-World Caveats

The utility-maximization framework is the workhorse of consumer theory and underpins much of microeconomic analysis. However, like any model, it makes simplifying assumptions that may limit its applicability. Business professionals should understand both where the model shines and where behavioral realities diverge from its predictions.

StrengthsLimitations
Logical rigor: Derives demand from a small set of axioms, making predictions testable and falsifiable.Rationality assumption: Real consumers display cognitive biases (anchoring, framing effects, loss aversion) that violate the completeness and transitivity axioms.
Demand derivation: Provides a micro-foundation for market demand, elasticity calculations, and welfare analysis (consumer surplus).Information requirements: Assumes consumers know their own preferences perfectly and have full information about all prices—unrealistic in many markets.
Policy analysis: Enables rigorous evaluation of taxes, subsidies, and price controls through changes in the budget constraint.Static framework: The basic model ignores time, habit formation, and intertemporal trade-offs. Extensions (e.g., dynamic programming) address this but add complexity.
Versatile functional forms: Different utility functions (Cobb-Douglas, CES, quasi-linear) capture a range of substitution patterns useful for pricing strategy.Aggregation difficulty: Moving from individual to market demand requires summing diverse preferences; representative-agent assumptions can mislead in heterogeneous populations.

Utility maximization model: strengths vs. limitations

💡

BUSINESS PERSPECTIVE

In practice, firms blend utility-theoretic demand analysis with behavioral insights. A pricing manager might use Cobb-Douglas demand functions to estimate price elasticities for a product line, while simultaneously running A/B tests to capture framing and anchoring effects that the standard model cannot predict. The model provides the structural backbone; behavioral economics supplies the fine-tuning. Recognizing the boundary between the two is a competitive advantage.

SECTION 8

Connection to Advanced Theory

The utility-maximization framework studied here is sometimes called the Marshallian (or uncompensated) approach because it holds nominal income constant. An alternative and complementary approach, the Hicksian (compensated) demand, holds utility constant and asks what the minimum expenditure is to achieve a given satisfaction level. Together, these dual formulations form the foundation of modern welfare economics and are essential for advanced topics in business economics, public policy, and industrial organization.

FeatureMarshallian (This Lesson)Hicksian (Advanced)
ObjectiveMaximize utility subject to budgetMinimize expenditure subject to a utility target
Held constantNominal income MUtility level Ū
Demand functionx*(Px, Py, M)h(Px, Py, Ū)
CapturesSubstitution + income effects combinedSubstitution effect only
Key identityRoy's Identity: x* = −(∂V/∂Px)/(∂V/∂M)Shephard's Lemma: h = ∂E/∂Px
Business useEstimating market demand curves and price elasticitiesWelfare measurement: compensating and equivalent variation

Marshallian vs. Hicksian demand: dual approaches

The Slutsky equation formally decomposes the Marshallian price effect into the Hicksian substitution effect and the income effect: ∂x*/∂Px = ∂h/∂Px − x* × (∂x*/∂M). This equation is the bridge between the two approaches and is indispensable for welfare analysis in public economics, cost-benefit analysis in corporate strategy, and demand estimation in econometrics. In advanced business economics courses, you will also encounter the indirect utility function V(Px, Py, M), which gives the maximum attainable utility as a function of prices and income and is the starting point for applied demand estimation.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain in your own words why the optimality condition MRS = Px/Py must hold at the consumer's optimal bundle. What would happen if MRS > Px/Py?
Show answer
The MRS represents the rate at which the consumer is willing to trade y for x while maintaining the same utility, while Px/Py represents the market's rate of exchange between the two goods. If MRS > Px/Py, the consumer values x more highly (relative to y) than the market does. The consumer can increase utility by buying more x and less y along the budget line, because the marginal utility per dollar from x exceeds that from y. This reallocation continues until diminishing marginal utility brings MRS down to equal the price ratio. At equality, no feasible reallocation can improve utility—this is the tangency point.

Question 2: BASIC CALCULATION

A consumer has the utility function U(x, y) = x0.5 · y0.5, with M = $100, Px = $5, and Py = $10. Find the optimal bundle (x*, y*) and the demand function for x.
Show answer
With α = β = 0.5, the Cobb-Douglas formula gives x* = [0.5/(0.5 + 0.5)] × (M/Px) = 0.5 × (100/5) = 10 units. Similarly, y* = 0.5 × (100/10) = 5 units. We can verify: 5(10) + 10(5) = 50 + 50 = $100 ✓. The general demand function for x is x* = 0.5M/Px = 50/Px. The consumer spends exactly half of income on each good, consistent with equal exponents.

Question 3: INTERMEDIATE

A consumer has quasi-linear preferences: U(x, y) = ln(x) + y. Income is M = $60, Px = $4, and Py = $1. Find the optimal bundle. Then derive the demand function for x and explain what is unusual about the income effect for this utility function.
Show answer
MUx = 1/x and MUy = 1. The tangency condition gives (1/x)/1 = 4/1, so x* = 1/4 = 0.25. Wait—let's re-derive: MRS = MUx/MUy = (1/x)/1 = Px/Py = 4/1, yielding x* = 0.25 units. From the budget constraint: 4(0.25) + 1(y) = 60, so y* = 59. The demand function is x* = Py/Px. The key insight: demand for x depends only on the price ratio, not on income M. With quasi-linear utility, the income effect for good x is zero—all additional income is absorbed entirely by good y. This makes quasi-linear utility especially useful for partial-equilibrium welfare analysis because consumer surplus exactly measures welfare changes.

Question 4: APPLIED

A coffee chain estimates that its average customer has Cobb-Douglas preferences between coffee (c) and all other goods (y), with U = c0.15 · y0.85. The average monthly income is $3,000 and the current price of a coffee is $5. If the chain raises the price to $6, by what percentage does quantity demanded change? What is the price elasticity of demand implied by this utility function?
Show answer
The Cobb-Douglas demand function gives c* = 0.15 × (3000/Pc) = 450/Pc. At Pc = $5, c* = 90 coffees per month. At Pc = $6, c* = 75 coffees. The percentage change is (75 − 90)/90 = −16.7%. The price elasticity of demand for Cobb-Douglas utility is always −1 (unit elastic), which can be verified: %ΔQ/%ΔP = −16.7%/20% ≈ −0.83 (arc elasticity), but the point elasticity ε = ∂c/∂P × P/c = −450/P² × P/(450/P) = −1 exactly. This unit elasticity means total expenditure on coffee remains constant at $450 regardless of price—a distinctive Cobb-Douglas property that the chain's pricing team should note.

Question 5: CRITICAL THINKING

A Giffen good is one whose demand curve slopes upward. Using the decomposition of the total price effect into substitution and income effects, explain the conditions under which a Giffen good can exist. Why are Giffen goods rarely observed in practice? Could a luxury good ever be a Giffen good?
Show answer
By the Slutsky decomposition, the total effect of a price decrease on quantity demanded equals the substitution effect (always positive for a price fall—the consumer substitutes toward the cheaper good) plus the income effect (positive for normal goods, negative for inferior goods). A Giffen good requires the income effect to be negative and large enough in absolute value to overwhelm the substitution effect, so demand falls when price falls. This requires (1) the good must be strongly inferior (higher real income reduces quantity demanded), and (2) the good must constitute a very large share of the consumer's budget so that the real-income change is substantial. These conditions are contradictory for luxury goods: a luxury good has a positive income elasticity by definition (it is a normal good), so its income effect reinforces the substitution effect, making it impossible for it to be Giffen. Giffen goods are rare because few goods are simultaneously inferior enough and budget-dominant enough to overcome the substitution effect. The classic textbook example—potatoes during the Irish famine—remains debated among economic historians, and modern empirical evidence (Jensen and Miller, 2008, on rice and wheat in China) suggests Giffen behavior can occur for extreme staples among very poor consumers.

SUMMARY

Lesson Summary

Summary

This lesson demonstrated how the utility maximization framework transforms subjective consumer preferences into the demand curve—the bedrock of market analysis. A consumer with a utility function chooses the bundle on the budget constraint that reaches the highest indifference curve. The optimality condition—MRS = Pₓ/Pᵧ or equivalently MUₓ/Pₓ = MUᵧ/Pᵧ—ensures that the last dollar spent on each good yields the same marginal satisfaction.

By varying Px and tracing the sequence of optimal bundles along the price-consumption curve, we derive the individual demand function x*(Px, Py, M). The downward slope of demand is explained by the substitution effect (consumers shift toward relatively cheaper goods) and the income effect (lower prices increase real purchasing power). For business applications, Cobb-Douglas utility provides a tractable starting point for estimating demand elasticities and forecasting revenue impacts of pricing decisions—tools that extend naturally into the Hicksian dual and the Slutsky equation for rigorous welfare analysis.

Varsity Tutors • Microeconomics • Utility Maximization & Demand Derivation