Consumer Theory

Roy's Identity

A single division recovers Marshallian demand from indirect utility — Shephard's mirror image on the utility side

x_i(p, m) = −(∂v/∂p_i) / (∂v/∂m). Differentiate indirect utility twice and divide — out pops Marshallian demand. No Lagrangian required.

  • Formulax_i = −(∂v/∂p_i)/(∂v/∂m)
  • RecoversMarshallian demand x
  • FromIndirect utility v(p, m)
  • Operations2 derivatives + 1 division
  • CounterpartShephard's lemma (Hicksian)
  • DiscoveredRené Roy 1947

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

How Roy's identity works

Picture the consumer's value function: the indirect utility v(p, m) — the maximum utility she can attain at prices p with income m. It encodes the entire optimization without revealing the underlying bundles; you give it prices and an income, it gives you back the optimal utility number. Roy's identity is the rule for unpacking that information good by good:

x_i(p, m)  =  −  ∂v / ∂p_i
                  ─────────────
                  ∂v / ∂m

The numerator is the partial of v in the i-th price. When p_i rises, indirect utility falls — the consumer is worse off. The numerator is the magnitude of that fall, per unit price increase. The denominator is the partial of v in income. When m rises, indirect utility increases — the consumer is better off. The denominator is the marginal utility of income.

Divide one by the other, flip the sign, and you have the consumption level x_i. Roy's identity recovery: 1 division instead of full optimization — once you have v(p, m), every Marshallian demand pops out by two derivatives and a quotient.

Formal statement

Let v(p, m) = max u(x) subject to p · x ≤ m. Roy's identity:

x_i(p, m)  =  −  (∂v/∂p_i)  /  (∂v/∂m)     for all i

Equivalent forms used in different contexts:

x_i(p, m)  ·  ∂v/∂m   +   ∂v/∂p_i   =  0       (additive form)

w_i(p, m)  =  −  ∂ log v / ∂ log p_i
              ─────────────────────────────       (share form)
                 ∂ log v / ∂ log m

The share form is convenient for empirical work: w_i = p_i · x_i / m is the budget share, and the right side is a ratio of log-derivatives that's easy to compute from translog or Almost-Ideal specifications.

Derivation in three lines

Start with the identity that defines indirect utility at the optimum:

v(p, m)  =  u(x(p, m))       for all (p, m)

Differentiate with respect to p_i, using the chain rule:

∂v/∂p_i  =  Σ_j  (∂u/∂x_j) · ∂x_j/∂p_i

At the consumer's optimum, the first-order conditions give ∂u/∂x_j = λ · p_j, where λ is the Lagrange multiplier on the budget constraint. Substitute:

∂v/∂p_i  =  λ · Σ_j  p_j · ∂x_j/∂p_i

Now differentiate Walras's Law (p · x = m) with respect to p_i:

0  =  x_i  +  Σ_j  p_j · ∂x_j/∂p_i
Σ_j  p_j · ∂x_j/∂p_i  =  −x_i

Substitute back:

∂v/∂p_i  =  −λ · x_i

Now do the same trick with income. Differentiate v(p, m) = u(x(p, m)) with respect to m:

∂v/∂m  =  Σ_j  (∂u/∂x_j) · ∂x_j/∂m
        =  λ · Σ_j  p_j · ∂x_j/∂m
        =  λ · 1   (from differentiating Walras)
        =  λ

So ∂v/∂m = λ — the marginal utility of income equals the Lagrange multiplier. Combine the two results:

∂v/∂p_i  =  −λ · x_i  =  −(∂v/∂m) · x_i
⇒  x_i  =  − ∂v/∂p_i  /  ∂v/∂m

Done. The Lagrange multiplier cancels, and the identity is unit-clean.

Worked example: Cobb-Douglas indirect utility

For U(x, y) = x^α · y^(1−α), the indirect utility function is:

v(p, m)  =  α^α · (1 − α)^(1 − α) · m · p_x^(−α) · p_y^(−(1 − α))

Apply Roy's identity:

∂v/∂p_x  =  α^α · (1 − α)^(1 − α) · m · (−α) · p_x^(−α − 1) · p_y^(−(1 − α))
∂v/∂m    =  α^α · (1 − α)^(1 − α) ·       p_x^(−α)     · p_y^(−(1 − α))

x_x(p, m)  =  − ∂v/∂p_x / ∂v/∂m
            =  − (−α) · m / p_x
            =  α · m / p_x

For α = 0.4 and m = 100: x_x = 40/p_x. At p_x = $4, that's 10 units of x. Same answer as direct optimization, but obtained by differentiation rather than solving a Lagrangian.

By symmetry, x_y = (1 − α) · m / p_y. At α = 0.4, m = 100, p_y = $5: x_y = 60/5 = 12. Verify Walras: 4 · 10 + 5 · 12 = 40 + 60 = 100 = m. Check.

Shephard vs Roy: side by side

Shephard's lemmaRoy's identity
Value function inputExpenditure e(p, u)Indirect utility v(p, m)
What it recoversHicksian (compensated) demand h_iMarshallian (ordinary) demand x_i
Formulah_i = ∂e/∂p_ix_i = −(∂v/∂p_i)/(∂v/∂m)
Number of derivatives needed12 + 1 division
Why an extra division for Roy?e(p, u) is in dollar units (cardinal)v(p, m) is ordinal (need to scale out λ)
Proof techniqueEnvelope theoremEnvelope theorem + Walras's Law
DiscoveredShephard 1953Roy 1947
Producer-side analoguex_i = ∂C/∂w_i (cost function)— (no direct analog)

The asymmetry — Shephard takes one derivative, Roy takes two and divides — reflects a deep fact about ordinal vs cardinal value functions. The expenditure function e(p, u) is in dollar units: it's the literal minimum cost. Its derivatives are quantities directly. The indirect utility function v(p, m) is ordinal: only monotonic transformations matter. The marginal utility of income λ = ∂v/∂m is the local rate of conversion between utils and dollars; dividing by it normalizes the price-derivative back into quantity units.

Combined with Shephard: full consumer duality

Roy's identity plus Shephard's lemma plus the Slutsky equation give the complete consumer-duality machine. Starting from either v(p, m) or e(p, u), you can construct the entire demand system:

Start withGet x_i viaGet h_i viaGet the other value function via
v(p, m)Roy's identityx(p, e(p, u)) = h(p, u)Invert v → e via v(p, e(p, u)) = u
e(p, u)x(p, m) = h(p, v(p, m))Shephard's lemmaInvert e → v via e(p, v(p, m)) = m

The two value functions encode the same preference information; either is sufficient. In practice, indirect utility is more convenient for empirical demand work (it's where Translog and AIDS specifications live), while expenditure is more convenient for welfare analysis (it's where CV, EV, and the Konüs cost-of-living index live).

Applications

  • Empirical demand systems. Translog indirect utility — log v is quadratic in log prices and log income — yields linear-in-log-shares demand equations via Roy's identity. The Almost Ideal Demand System (Deaton-Muellbauer 1980) is a related specification built from a PIGLOG expenditure function; combined with the share-form of Roy's identity, it's the workhorse of empirical demand work.
  • Welfare analysis. The compensating variation between two price vectors p^0 and p^1 (at fixed initial utility u^0) is e(p^1, u^0) − e(p^0, u^0). Roy's identity gives access to the underlying expenditure function via inversion: if you have v(p, m), find e by solving v(p, e) = u^0.
  • Tax incidence. The change in indirect utility from a tax change is ∂v/∂t = (∂v/∂p_i)·(∂p_i/∂t). Roy's identity converts this into a quantity-weighted formula: change in utility per dollar of revenue = x_i · (dp/dt) — the consumer's incidence is the quantity she buys times the price-pass-through.
  • Optimal taxation (Mirrlees, Ramsey). Both literatures rely on indirect utility for the planner's problem — maximize a social welfare function of indirect utilities subject to a revenue constraint. Roy's identity provides the demand response that determines tax revenues and deadweight loss.
  • Discrete choice (McFadden). The choice probability for an alternative is a function of the deterministic part of indirect utility. Roy-style envelope arguments give the expected demand for any alternative as a derivative of the log-sum (inclusive value) — the same envelope-theorem machinery in stochastic-choice form.
  • International trade and CGE models. Most computable general equilibrium models use indirect utility (CES, nested CES, Stone-Geary, AIDS) for consumers; demand equations come directly from Roy's identity applied to those functional forms.

Properties of indirect utility behind Roy

  • Homogeneous of degree zero in (p, m). v(λp, λm) = v(p, m). Doubling all prices and income leaves utility unchanged.
  • Non-increasing in p. Higher prices can never raise utility (a more-expensive world is never better). The numerator ∂v/∂p_i ≤ 0.
  • Non-decreasing in m. More income never hurts. The denominator ∂v/∂m ≥ 0.
  • Quasi-convex in p. The set {p : v(p, m) ≤ k} is convex for any k. Equivalent to the cost-minimization side's concavity of the expenditure function.
  • Continuous. Small price or income changes produce small utility changes (under usual continuity assumptions on u).
  • Differentiable almost everywhere. Roy's identity requires differentiability of v; this holds wherever the optimal bundle is unique, which is the generic case under strict convexity of preferences.

Common pitfalls

  • Confusing Roy with Shephard. They're dual but not interchangeable. Roy returns Marshallian (ordinary) demand from indirect utility; Shephard returns Hicksian (compensated) demand from expenditure. Mixing them in a derivation is a recipe for sign errors.
  • Forgetting the minus sign. The minus is essential: ∂v/∂p_i is negative (higher price hurts utility), and the minus flips it into a positive quantity. Drop the sign and you get a negative consumption number.
  • Misinterpreting ∂v/∂m as cardinal utility. The marginal utility of income is an ordinal-preserving construct: any monotonic transformation of v will change ∂v/∂m, but the ratio ∂v/∂p_i / ∂v/∂m is invariant (both transform by the same factor). Only the ratio has empirical content.
  • Applying Roy's identity at non-differentiable points. Like Shephard, Roy's identity requires v to be differentiable in (p, m). At kinks (perfect complements, corner solutions), the derivative doesn't exist as a function; the identity generalizes to subdifferentials but the simple ratio form breaks.
  • Using Roy to back out Hicksian demand directly. Roy gives Marshallian only. To get Hicksian, either (a) apply Shephard to e(p, u), or (b) apply Slutsky-style chain rule to convert: h_i(p, u) = x_i(p, e(p, u)).
  • Forgetting that v(p, m) must come from a well-defined consumer problem. Roy's identity assumes v is an indirect utility function — that is, it arises from max u(x) s.t. p·x ≤ m. An arbitrary smooth function v(p, m) that doesn't satisfy the integrability conditions (homogeneity, monotonicity, quasi-convexity) can produce nonsensical "demand" via the identity.

Frequently asked questions

What is Roy's identity?

Roy's identity recovers Marshallian (uncompensated) demand for good i from the indirect utility function v(p, m) by a single division: x_i(p, m) = −(∂v/∂p_i) / (∂v/∂m). The numerator is how indirect utility falls when price i rises (negative). The denominator is how indirect utility rises when income grows (positive — the marginal utility of income). Flip the sign of the ratio and you have the consumption level of good i. Named after French economist René Roy who proved the result in 1947.

Why does Roy's identity work?

It's the envelope theorem applied to the utility-maximization problem. Start with v(p, m) = u(x(p, m)). Differentiate in p_i: ∂v/∂p_i = Σ_j (∂u/∂x_j)·∂x_j/∂p_i. At the optimum ∂u/∂x_j = λ·p_j (FOCs), so ∂v/∂p_i = λ·Σ_j p_j·∂x_j/∂p_i. Differentiating Walras's law p·x = m gives Σ_j p_j·∂x_j/∂p_i = −x_i. So ∂v/∂p_i = −λ·x_i. Similarly ∂v/∂m = λ. Divide: x_i = −(∂v/∂p_i)/(∂v/∂m). The Lagrange multiplier λ cancels.

How does Roy's identity differ from Shephard's lemma?

Both recover a demand from a value function via the envelope theorem, but they live on different sides of duality. Shephard's lemma: h_i = ∂e/∂p_i recovers Hicksian (compensated) demand from the expenditure function — a single derivative. Roy's identity: x_i = −(∂v/∂p_i)/(∂v/∂m) recovers Marshallian (uncompensated) demand from indirect utility — a ratio of two derivatives. The extra division in Roy's identity is because indirect utility is an ordinal object, so we need to divide out the units (the marginal utility of income λ).

How is Roy's identity used in empirical work?

Postulate a parametric form for indirect utility v(p, m) — Cobb-Douglas, Translog, CES, AIDS — and apply Roy's identity to derive Marshallian demand equations as closed-form functions of prices and income. Then estimate by regression on observed quantities. The Almost Ideal Demand System, the Linear Expenditure System, the Translog Demand System all use this trick. The advantage over starting from a utility function directly is that indirect utility is convex in prices and tractable to parameterize; demand equations from it are immediate.

What is the indirect utility function?

The indirect utility function v(p, m) is the maximum utility attainable at prices p and income m: v(p, m) = max u(x) subject to p·x ≤ m. It's the value function of the consumer's optimization problem — what utility you get after solving it, as a function of the prices and income inputs. Key properties: homogeneous of degree zero in (p, m), non-increasing in p, non-decreasing in m, quasi-convex in p, continuous, and (almost everywhere) differentiable.

What is the marginal utility of income?

The marginal utility of income, λ = ∂v/∂m, is how much indirect utility rises per dollar of additional income at the current optimum. It equals the Lagrange multiplier on the budget constraint in the utility-maximization problem. The Engel curve (consumption as a function of income at fixed prices) has slope ∂x_i/∂m, related to λ by the FOCs of the optimization. In Roy's identity λ appears in both numerator and denominator and cancels — that's why the identity is sign-clean and unit-independent.

How does Roy's identity tie into the Slutsky equation?

Roy's identity provides the Marshallian demand x(p, m); Shephard's lemma provides the Hicksian demand h(p, u). The Slutsky equation then writes the Marshallian price derivative as the Hicksian price derivative minus an income-effect correction: ∂x_i/∂p_j = ∂h_i/∂p_j − x_j·∂x_i/∂m. With Roy's identity giving x and Shephard's lemma giving h, the entire decomposition is available once you've postulated either v(p, m) or e(p, u) — the two value functions are dual to each other via the identity v(p, e(p, u)) = u.