EconGraphs Logo BETA
Note: This work is under development and has not yet been professionally edited.
If you catch a typo or error, or just have a suggestion, please submit a note here. Thanks!
course home page

Econ 50Q Section 6: Shephard's Lemma and the Envelope Theorem


Click here for the quiz on this reading.

The Envelope Theorem

In Week 4, we investigated the relationship between a constrained optimization problem (for example, minimizing utility subject given the prices a consumer faces and a target utility) and its associated value function (the “expenditure” function that returns the highest possible utility for any combination of prices and income). The Envelope Theorem is a powerful tool in economic and optimization theory that relates this relationship in a general way.

We can think of a constrained optimization problem as being defined by:

For example, for an expenditure minimization problem with two goods $x_1$ and $x_2$ with associated prices $p_1$ and $p_2$ and a target utility of $U$, we would have

We can think of the solution to this problem as being a function mapping the vector of parameters $\alpha$ into the vector of choice variables: that is, $\vec{x}^\star(\alpha)$. The value function $V(\vec{\alpha})$ gives the min (or max) value of $f$ when we choose $\vec{x}^\star(\alpha)$ optimally given the constraint: \(V(\vec{\alpha}) = f(x^\star(\alpha))\)

It turns out that the partial derivative $\frac{\partial V(\vec{\alpha})}{\partial \alpha_i}$ – that is, how the optimized value of a problem changes with each of the parameters which affect it – is a quantity that’s useful to know for a surprisingly broad range of applications. Big microeconomic, macroeconomic, and econometric results are completely dependent on knowing this derivative for interesting choices of objective functions and constraints. Before reading on, pause and try to think about how you might try to solve for this derivative: it isn’t obvious, since a change in any parameter $\alpha_i$ also changes the optimal $\vec{x}(\alpha)$ you would choose, which in turn changes $V$. In other words, it’s hard to take a derivative that involves a max or min.

The answer to this question—how to compute this derivative—ends up being surprisingly simple, and we call the answer the Envelope Theorem. The Envelope Theorem states that, under certain conditions, \(\frac{\partial V(\vec{\alpha})}{\partial \alpha_i} = \left. \frac{\partial f(\vec{x};\vec{\alpha})}{\partial \alpha_i} \right|_{\vec{x}=\vec{x}^\star(\vec{\alpha})} \tag{1}\) where $x^\star(\vec{\alpha})$ is the optimal choice of $x$ for the problem. The vertical line means “evaluated at,” so the right hand side tells us to just take the derivative of the objective with respect to the parameter, and plug in the optimal solution $\vec{x}^\star$ for $\vec{x}$.

We’ve known this theorem is true for “nice” functions for a little over 80 years, but in 2002 Stanford’s own Paul Milgrom and Ilya Segal proved an amazing new result extending the Envelope Theorem so it could work for much more general functions (see Milgrom and Segal (2002)). It was a huge achievement that led to a lot of important tools and created billions of dollars in social welfare out of thin air. Talk about using math to make the world a better place!

I won’t prove the Envelope Theorem for another few weeks, but if you still feel like you’re missing some intuition, this would be a super fun topic to get into in office hours. The Wikipedia page on the Envelope Theorem is also excellent, and goes into more detail than I have here.

Using the Envelope Theorem to Prove a Familiar Result

From here, let’s finally write up a proof for Shephard’s Lemma. We’re gonna prove it by applying the Envelope Theorem to the expenditure minimization problem described above. We’re going to try to minimize our spending by picking the amount of each good $\vec{x} = (x_1,x_2)$ to buy given the parameters $\vec{\alpha} = (p_1,p_2,U)$, so our objective function $f(\vec{x}; \vec{\alpha})$ is the total expenditure: \(\begin{aligned} \min_{\vec{x}} \quad & f(\vec{x}; \vec{\alpha}) = p_1x_1 + p_2x_2 \\ \text{s.t.} \quad & g(\vec{x}; \vec{\alpha}) = u(x_1,x_2) - U \ge 0 \end{aligned}\) and the value function is our expenditure function: \(V(\alpha) = E(p_1,p_2,U) = \min_{x_1,x_2} p_1x_1 + p_2x_2 \text{ s.t. }u(x_1,x_2) \ge U\) By the Envelope Theorem, the derivative of the value function $E(p_1,p_2,U)$ with respect to one of the parameters—say $p_1$—is the same as the derivative of $f(\vec{x},\vec{\alpha})$ with respect to $p_1$, evaluated at the optimal solution. In this context, the solution to the cost-minimization problem is the Hicksian bundle $\vec{x}^c(p_1,p_2,U)$; therefore the Envelope Theorem states that, \(\begin{aligned} \frac{\partial E(p_1,p_2,U)}{\partial p_1} &= \left. \frac{\partial f}{\partial p_1} \right|_{\vec{x}=\vec{x}^c(p_1,p_2,U)} \\ &= \left. \frac{\partial (p_1 x_1 + p_2 x_2)}{\partial p_1} \right|_{\vec{x}=\vec{x}^c(p_1,p_2,U)} \\ &= x_1 \big|_{\vec{x}=\vec{x}^c(p_1,p_2,U)} \\ &= x_1^c(p_1,p_2,U). \end{aligned}\)

In general, we can write: \(\frac{\partial E(\vec{p},U)}{\partial p_i} = x_i^c(\vec{p},U),\) which is exactly Shephard’s Lemma. It tells us that the partial derivative of the expenditure function with respect to a price gives the Hicksian demand for that good. Q.E.D.

(One small side note: there are really different envelope results for constrained versus unconstrained optimization problems. We won’t be covering those in detail in this class.)

Short-Run and Long-Run Costs (Optional)

Recall how we have defined the difference between the short run and the long run. In the short run, some input (usually capital) is fixed, while in the long run all inputs are variable. Intuitively, this means that in the long run you can produce any quantity at its cost-minimizing combination of outputs (i.e. its lowest possible cost), while in the short run you are “stuck” with some fixed amount of one good.

It follows that for any quantity $q$, the long-run cost of producing $q$ units of output must be no greater than the cost in the short run. As a consequence, we say that the long-run total cost is the lower envelope of the short-run total cost. This is actually where the name of the Envelope Theorem comes from.

Think about a situation in which a firm can choose three discrete levels of capital: a small factory, a medium-sized factory, and a large factory. If we plot out its short-run cost curves for each of these, we can see that as factory size increases, fixed costs increase while variable costs decrease. This means that for each potential quantity, of the three sizes is optimal; so the long-run cost curve traces out the “lower envelope” of the short-run cost curves:

See interactive graph online here.

Now assume that the size of the factory ($K$) is continuous. Now each $q$ has an optimal $K^\star(q)$. For example, in the diagram below, the optimal factory size for $q = 270$ is $K^\star = 70$. If you drag the quantity left and right, you can see that the optimal amount of capital changes: the more you want to produce, the more capital you would optimally use.

See interactive graph online here.

Let’s think about the relationship between the long-run cost curve and the short-run cost curve for a particular level of capital: say, $\overline K = 70$. We saw above that these two curves meet at $q = 270$; this means that if you were “stuck” with $\overline K = 70$ and were lucky enough to want to produce $q = 270$ units of output, you wouldn’t want to change a thing: you’re already using your cost-minimizing level of captial. But if you wanted to produce any other quantity, you could do so at a lower cost if you used a different amount of capital.

Let’s reinterpret the objects here to see the Envelope Theorem at work. Take the short-run cost $c^{SR}(q \mid \overline K)$ as our objective function. Usually both $\overline K$ and $q$ are parameters of short run cost minimization, but let’s think of $\overline K$ as a choice variable and $q$ as a parameter just for this note. Picking $\overline K$ optimally for each $q$ then gives the value function, which is exactly the long-run cost: \(c^{LR}(q) = \min_{\overline K}\ c^{SR}(q \mid \overline K).\) The Envelope Theorem then tells us that \(\frac{d c^{LR}(q)}{d q} = \left. \frac{\partial c^{SR}(q \mid \overline K)}{\partial q} \right|_{\overline K = \overline K^\star(q)}.\) Cool, right? At the quantity where the two costs are equal, i.e. where we have optimized the short run cost, long-run cost equals short-run cost in value and slope. So in the lower graph the two curves do not just touch at that quantity: by the envelope theorem, they are also tangent.


Reading Quiz

That's it for today! Click here to take the quiz on this reading.

Copyright (c) Christopher Makler / econgraphs.org