Skip to main content

4  Cost Minimization and Profit Maximization

Cost and profit functions, curvature, and the envelope theorem.

4.1 Cost minimization and profit maximization

4.1.1 The COO’s problem: cost minimization

Consider a production function \(f(\left\{x_i\right\}_{i=1}^N)\), where \(x_i \ge 0\) are inputs. Assume that a firm can choose non-negative levels of inputs \(i=1\) through \(M\le N\). The output quantity target is \(q\). Assume the firm is a price taker on the input market and input prices are \(w_i\), the cost minimization problem for the firm is:

\[ \begin{gathered} \min_{ \left\{ x_i \right\}_{i=1}^M } \sum_{i=1}^N w_i\cdot x_i\\ \text{such that, } q \le f\left(\left\{x_i\right\}_{i=1}^N\right) \end{gathered} \]

The first \(M\) inputs are choices. The remaining \(O=(N-M)\) inputs potentially impact the marginal productivity of the \(M\) input choices, and carry with them sunk cost that will not impact optimal choices.

Using vector notations, we can represent variable inputs with \(x^v \in R^M_+\), represent fixed inputs with \(x^f \in R^{O}_+\), and represent all inputs with \(x \in R^{N}_+\). And the corresponding price vectors are \(w \in R^N_{++}\), \(w^v \in R^M_{++}\) and \(w^f \in R^{O}_{++}\). The cost minimization problem can be rewritten as:

\[ \begin{gathered} \min_{ x^v } {x}' w\\ \text{such that, } q \le f\left(x\right) \end{gathered} \]

Setting up the Lagrangian and solving the cost-minimization problem, we end with the following solution functions:

  • The conditional factor demand function: \(x^{\ast,\text{cost-min}}_i\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, q\right)\). Optimal choice is a function of the prices on inputs to be chosen, the quantities of fixed inputs, along with output level requirement.
  • The cost function is: \[\text{COST}^{\ast}\left(\left\{w_j\right\}_{j=1}^{N}, \left\{x_j\right\}_{j=M+1}^N, q\right) = \sum_{i=1}^{M} w_i \cdot x^{\ast,\text{cost-min}}_i\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, q\right) + \sum_{i=M+1}^N w_i \cdot x_i\] Cost given cost minimizing choices is a function of all prices and the non-chosen inputs, along with the output level requirement.

The cost minimization problem is the “COO’s problem”: the operational manager of the firm does not decide on how much to produce, just adjusts inputs to guarantee meeting the output requirement at the minimum cost.

In the firm’s overall problem, the firm demands inputs and supply outputs. In the COO’s problem, we isolate the firm inputs demand problem and solve this without worry about how is buying the outputs and at what prices.

Solving the cost minimization problem

Solving the constrained optimization problem, the Lagrangian is set up as follows:

\[ \begin{aligned} \mathcal{L}\left(\left\{x_i\right\}_{i=1}^M, \lambda\right) &= \sum_{i=1}^N w_i \cdot x_i - \lambda \left(f\left(\left\{x_i\right\}_{i=1}^N\right) - q\right) \end{aligned} \]

For an interior optimum with a binding output constraint and a regular differentiable technology, the first-order conditions with respect to the choice variables and multiplier are:

\[ \begin{aligned} \frac{\partial \mathcal{L}}{\partial x_i} &= w_i - \lambda \frac{\partial f\left(\left\{x_i\right\}_{i=1}^N\right)}{\partial x_i} = 0, \quad i=1,\ldots,M\\ \frac{\partial \mathcal{L}}{\partial \lambda} &= q - f\left(\left\{x_i\right\}_{i=1}^N\right) = 0 \end{aligned} \]

Corner solutions or a slack output constraint instead require the corresponding complementary-slackness conditions.

4.1.2 The CEO’s problem given the COO’s solutions: profit maximization over quantity

Given solutions to the COO’s problem, the CEO solves the quantity optimization problem. Let \(p\) be the price per unit of output, and assume that the firm is a price taker on the output market as well. We have:

\[ \begin{gathered} \max_{ q } p \cdot q - \text{COST}^{\ast}\left(\left\{w_j\right\}_{j=1}^{N}, \left\{x_j\right\}_{j=M+1}^N, q\right)\\ \end{gathered} \]

In vector notation, we have:

\[ \begin{aligned} \max_{ q } \left( p \cdot q - \text{COST}^{\ast}\left(w, x^f, q\right) \right)\\ \end{aligned} \]

The CEO maximizes the profit function by choosing the optimal quantity, the solutions to the profit maximization problem are:

  • The optimal output quantity: \(q^{\ast}\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, p\right)\), which is a function of the prices on inputs to be chosen, the quantities of fixed inputs, along with the output price level.

  • The factor demand function,

    \[ \begin{aligned} x^{\ast,\text{profit-max}}_i\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, p\right) &= x^{\ast,\text{cost-min}}_i\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, q^{\ast}\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, p\right)\right)\\ x^{\ast,\text{profit-max}}_i\left( w, x^f, p \right) &= x^{\ast,\text{cost-min}}_i\left( w, x^f, q^{\ast}\left(w, x^f, p \right)\right) \end{aligned} \]

    is equal to optimal quantity choice from the cost minimization problem evaluated at the optimal output quantity, which is a function of all prices on inputs to be chosen, the quantities of fixed inputs, along with the output price level.

  • The profit function is a function of all wages, unchosen quantities, and output price:

\[ \begin{aligned} &\text{PROFIT}^{\ast}\left(\left\{w_j\right\}_{j=1}^{N}, \left\{x_j\right\}_{j=M+1}^N, p\right)\\ =& p \cdot q^{\ast}\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, p\right)\\ &- \text{COST}^{\ast}\left(\left\{w_j\right\}_{j=1}^{N}, \left\{x_j\right\}_{j=M+1}^N, q^{\ast}\left(\left\{w_j\right\}_{j=1}^{M}, \left\{x_j\right\}_{j=M+1}^N, p\right)\right)\\ \end{aligned} \]

Solving the profit maximization problem over quantities

Given the profit maximization problem over quantities, the first-order condition for the optimal output quantity is obtained by differentiating the profit function with respect to \(q\) and setting it equal to zero:

\[ \frac{\partial}{\partial q} \left( p \cdot q - \text{COST}^{\ast}\left(\left\{w_j\right\}_{j=1}^{N}, \left\{x_j\right\}_{j=M+1}^N, q\right) \right) = 0. \]

We have two components above, marginal revenue, \(p\), and marginal cost, \(MC(q)\). Note that marginal revenue, for a price taking firm, is constant. The marginal cost, \(MC(q)\), is the derivative of the cost function with respect to output quantity \(q\).

If the MC function starts at zero for \(q\) small, and asymptotes to positive infinity as \(q\) gets larger, and is strictly increasing, there will be a unique optimal output quantity where marginal revenue equals marginal cost.

But this solution is unique solution is not guaranteed. For example, if MC is always below \(p\), there will be no finite optimal output quantity, and the firm will produce up to infinity.

The unique solution could also be to not operate the firm at all: if MC is always above \(p\), the optimal output quantity will be zero.

4.2 Concavity of cost and convexity of profit functions

4.2.1 Cost function and concavity with respect to prices

We begin with a discussion of the cost function. Let \(W\in R^N_{++}\) be the (column) vector of prices for \(N\) inputs, let \(X \in R^N_{+}\) be the (column) vector of input levels, let \(q\in R_{++}\) be the output quantity required, and let \(X^{\ast}(W, q)\) denote the (column) vector of optimal input levels.

Solving the cost minimization problem given prices and quantity constraints, we arrive at:

\[ \text{COST}\left(W, q\right) = X^{\ast}(W, q)' \cdot W \]

If the cost function is concave with respect to \(W\), that means, for any \(\widehat{W}\) and \(\widetilde{W}\), and for \(\alpha \in [0,1]\) with \(W^{\alpha} = \alpha\cdot\widehat{W} + \left(1-\alpha\right)\cdot\widetilde{W}\), we have by definition of concavity:

\[ \begin{aligned} &\text{COST}\left(\alpha\cdot\widehat{W} + \left(1-\alpha\right)\cdot\widetilde{W}, q\right)\\ =& X^{\ast}\left(W^{\alpha}, q\right)' \left(\alpha\cdot\widehat{W} + \left(1-\alpha\right)\cdot\widetilde{W}\right)\\ % =& \alpha X^{\ast}\left(W^{\alpha}, q\right)'\widehat{W} + % \left(1-\alpha\right) X^{\ast}\left(W^{\alpha}, q\right)'\widetilde{W} % \\ \ge& \alpha\cdot\text{COST}\left(\widehat{W}, q\right) + \left(1-\alpha\right)\cdot\text{COST}\left(\widetilde{W}, q\right). \end{aligned} \]

4.2.2 Visualize cost minimizing optimal choices, and costs

To develop intuitions, draw the following graph:

  1. Suppose \(N=2\), let x-axis be \(W_1\), and let y-axis be \(W_2\)
  2. Draw any two points on this surface: \(\widehat{W}\) and \(\widetilde{W}\).
  3. Connect a straight line through these two points, points along the line are characterized by: \(W^{\alpha} = \alpha\cdot\widehat{W} + \left(1-\alpha\right)\cdot\widetilde{W}\).
  4. Note the relative prices at the two points, and the relative prices along the line in between.

Draw the second graph:

  1. Let x-axis be \(X_1\), and let y-axis be \(X_2\)
  2. Draw an Isoquant, corresponding to output \(q\): \(f(X)=q\).
  3. Note that for any \(W\), the optimal choice for the cost minimization problem given \(q\) must land somewhere along the isoquant.
  4. Given relative prices, draw points along the isoquant that correspond to the two pairs of price: \(X^{\ast}\left(\widehat{W}, q\right)\) and \(X^{\ast}\left(\widetilde{W}, q\right)\).
  5. Visualize where \(X^{\ast}\left(W^{\alpha}, q\right)\) goes. With a smooth, strictly convex isoquant and unique interior optima, it lies on the isoquant between \(X^{\ast}\left(\widehat{W}, q\right)\) and \(X^{\ast}\left(\widetilde{W}, q\right)\). Without these regularity assumptions, optimal choices can be nonunique or discontinuous.

In the second graph, note that given cost minimization, \(x^{\ast}\left(W^{\alpha}, q\right)\) must be to the top-right of the relative price lines–corresponding to \(\widehat{W}\) and \(\widetilde{W}\)–that are tangent to the isoquant at optimal choices \(X^{\ast}\left(\widehat{W}, q\right)\) and \(X^{\ast}\left(\widetilde{W}, q\right)\), respectively.

4.2.3 Proof that the cost function is concave in prices

First, we know that, by the definition of optimality, for any price \(\overline{W}\), as discussed just now:

\[ X^{\ast}(W, q)' \cdot W \le X^{\ast}(\overline{W}, q)' \cdot W \]

Second, given the linearity of the cost function, distributing terms, we have:

\[ \begin{aligned} & X^{\ast}\left(W^{\alpha}, q\right)' \cdot \left(\alpha\cdot\widehat{W} + \left(1-\alpha\right)\cdot\widetilde{W}\right)\\ =& \alpha \cdot X^{\ast}\left(W^{\alpha}, q\right)' \cdot \widehat{W} + (1-\alpha) \cdot X^{\ast}\left(W^{\alpha}, q\right)' \cdot \widetilde{W} \end{aligned} \]

Third, combining one and two above and with the definition of concavity, we have:

\[ \begin{aligned} &\text{COST}\left(\alpha\cdot\widehat{W} + \left(1-\alpha\right)\cdot\widetilde{W}, q\right)\\ =& \alpha \cdot X^{\ast}\left(W^{\alpha}, q\right)' \cdot \widehat{W} + (1-\alpha) \cdot X^{\ast}\left(W^{\alpha}, q\right)' \cdot \widetilde{W}\\ \ge& \alpha \cdot X^{\ast}\left(\widehat{W}, q\right)' \cdot \widehat{W} + (1-\alpha) \cdot X^{\ast}\left(\widetilde{W}, q\right)' \cdot \widetilde{W}\\ =&\alpha\cdot\text{COST}\left(\widehat{W}, q\right) + \left(1-\alpha\right)\cdot\text{COST}\left(\widetilde{W}, q\right)\\ \end{aligned} \]

Using the definition of optimality, we have now shown the cost function is concave in prices.

Note that \(\widehat{W}\) and \(\widetilde{W}\) can be such that \(\frac{\widehat{W}}{\widehat{W}_i} = \frac{\widetilde{W}}{\widetilde{W}_i}\), meaning that prices are proportionally identical. When this is the case, the relative price line is the same for \(\widehat{W}\) and \(\widetilde{W}\), and \(X^{\ast}\left(\widehat{W}, q\right) = X^{\ast}\left(\widetilde{W}, q\right)\). When this is the case, we will have equality above, even if the production function is strictly concave in \(X\).

4.2.4 The profit function is convex in prices

The profit function is convex in prices. The intuition and proof are symmetric as for the cost function, with the reversal of the inequality symbol. Note that the profit function is a function of both input and output prices, and the price vector includes both, with opposing signs.

The profit function is defined as:

\[ \begin{aligned} \text{PROFIT}^{\ast}\left(P, W\right) =& P \cdot f\left(X^{\ast}(P, W)\right) - X^{\ast}(P, W)' \cdot W \end{aligned} \]

We combine the \(P \in R^1_{++}\) and \(W \in R^N_{++}\) into a single price vector \(Z\), where \(Z = \left[\begin{array}{c}P\\-W\end{array}\right]\). We can also combine the output quantity and input quantities into a single quantity vector \(Y \in R^{N+1}_{+}\), where \(Y = \left[\begin{array}{c}f(X)\\X\end{array}\right]\). The profit function can then be written as:

\[ \text{PROFIT}^{\ast}\left(Z\right) = Y^{\ast}(Z)' \cdot Z \]

The profit function is convex in prices \(Z\), meaning that for any \(\widehat{Z}\) and \(\widetilde{Z}\), and for \(\alpha \in [0,1]\):

\[ \begin{aligned} &\text{PROFIT}^{\ast}\left(\alpha\cdot\widehat{Z} + \left(1-\alpha\right)\cdot\widetilde{Z}\right) \le \alpha\cdot\text{PROFIT}^{\ast}\left(\widehat{Z}\right) + \left(1-\alpha\right)\cdot\text{PROFIT}^{\ast}\left(\widetilde{Z}\right)\\ \end{aligned} \]

This is true because:

\[ \begin{aligned} &\text{PROFIT}^{\ast}\left(\alpha\cdot\widehat{Z} + \left(1-\alpha\right)\cdot\widetilde{Z}\right)\\ =& Y^{\ast}\left(\alpha\cdot\widehat{Z} + \left(1-\alpha\right)\cdot\widetilde{Z}\right)' \cdot \left(\alpha\cdot\widehat{Z} + \left(1-\alpha\right)\cdot\widetilde{Z}\right)\\ =& \alpha \cdot Y^{\ast}\left(\alpha\cdot\widehat{Z} + \left(1-\alpha\right)\cdot\widetilde{Z}\right)' \cdot \widehat{Z} + (1-\alpha) \cdot Y^{\ast}\left(\alpha\cdot\widehat{Z} + \left(1-\alpha\right)\cdot\widetilde{Z}\right)' \cdot \widetilde{Z} \\ \le& \alpha\cdot\text{PROFIT}^{\ast}\left(\widehat{Z}\right) + \left(1-\alpha\right)\cdot\text{PROFIT}^{\ast}\left(\widetilde{Z}\right)\\ =& \alpha\cdot Y^{\ast}\left(\widehat{Z}\right)' \cdot \widehat{Z} + \left(1-\alpha\right) \cdot Y^{\ast}\left(\widetilde{Z}\right)' \cdot \widetilde{Z}\\ \end{aligned} \]

Given price vector \(Z\), the optimal choice \(Y^{\ast}(Z)\) must yield weakly higher profit than any alternative choice \(\overline{Y}\). This establishes the inequality above, and thus the convexity of the profit function in prices.

4.3 Envelope Theorem, Implications of Optimality, Lagrange Multiplier, and Shephard’s Lemma

4.3.1 Envelope Theorem and Lagrange Multiplier from Cost Minimization, total derivative

Assume a differentiable, regular optimum with positive chosen inputs and a binding output constraint. Under these assumptions, the first-order equalities below apply; corner solutions require complementary-slackness conditions. We can use the total derivative approach to express the Lagrangian as a function of the input choices, the Lagrange multiplier, and quantity. Quantity has direct impacts and indirect impacts through input choices and the multiplier:

\[ \begin{aligned} \mathcal{L^{\ast}}(\left\{x_i^{\ast}(q, \mathbf{w})\right\}_{i=1}^{N}, \lambda^{\ast}\left(q, \mathbf{w}\right), q) \end{aligned} \]

So the derivative of the Lagrangian evaluated at the optimal choices with respect to quantity is:

\[ \begin{aligned} &\frac{d\mathcal{L^{\ast}}(\left\{x_i^{\ast}\left(q, \mathbf{w}\right)\right\}_{i=1}^{N}, \lambda^{\ast}\left(q, \mathbf{w}\right), q) }{ d q}\\ =& \sum_{i=1}^N \frac{\partial \mathcal{L^{\ast}} }{\partial x_i} \cdot \frac{\partial x_i^{\ast}\left(q, \mathbf{w}\right)}{\partial q} + \frac{\partial \mathcal{L^{\ast}} }{\partial \lambda} \cdot \frac{\partial \lambda^{\ast}\left(q, \mathbf{w}\right)}{\partial q} + \frac{\partial \mathcal{L^{\ast}} }{\partial q}\\ =& \sum_{i=1}^N 0 \cdot \frac{\partial x_i^{\ast}\left(q, \mathbf{w}\right)}{\partial q} + 0 \cdot \frac{\partial \lambda^{\ast}\left(q, \mathbf{w}\right)}{\partial q} + \frac{\partial \mathcal{L^{\ast}} }{\partial q}\\ =& \lambda^{\ast} \end{aligned} \]

The terms are equal to zero, because of the first order optimality conditions for the constrained minimization problem, which says that at optimal choices the derivative of the lagrangian with respect to the choice variables and the lagrange multiplier must be equal to zero. Specfically:

\[ \begin{aligned} \frac{\partial \mathcal{L^{\ast}}}{\partial x_i} &= w_i - \lambda^{\ast}\cdot \frac{\partial f\left(\left\{x^{\ast}_j\right\}_{j=1}^N\right) }{\partial x_i } = 0 , \forall i\\ \frac{\partial \mathcal{L^{\ast}}}{\partial \lambda} &= q - f\left(\left\{x^{\ast}_i\right\}_{i=1}^N\right) = 0\\ \end{aligned} \]

Marginal cost and lagrange multiplier

At the optimal cost minimizing choices, the Lagrangian is equal to the cost function. The derivative of the lagrangian—evaluated at optimal choices—with respect to quantity is equal to the Lagrange multiplier. The derivative of the cost function with respect to quantity is the marginal cost of making one more unit of output. Hence, the Lagrange multiplier is equal to the marginal cost at the optimum.

\[ \begin{aligned} MC(q) &= \lambda^{\ast}(q) \end{aligned} \]

Interesting, from the optimality condition that we wrote above, we have that the derivative of the lagrangian with respect to input \(x_i\), evaluated at the optimal choices, is:

\[ \frac{\partial \mathcal{L^{\ast}}}{\partial x_i} = w_i - \lambda^{\ast} \frac{\partial f\left(\left\{x^{\ast}_j\right\}_{j=1}^N\right)}{\partial x_i} = 0, \quad \forall i \]

This can be rewritten to express the Lagrange multiplier in terms of the input prices and the marginal products of the inputs, all evaluated at the optimal choices:

\[ \lambda^{\ast} = \frac{w_i}{\frac{\partial f\left(\left\{x^{\ast}_j\right\}_{j=1}^N\right)}{\partial x_i}}, \quad \forall i \]

This provides another interesting perspective on the relationship between input prices, marginal products, and the marginal cost of production. At the optimal choices: the marginal cost of making one more unit of output is equal to the price per unit of each input divided by the marginal product of the corresponding input, for all input. Suppose we have two inputs, labor and capital, with prices \(w_L\) and \(w_K\), and marginal products \(MP_L\) and \(MP_K\), then at the optimum: \[ MC(q) = \frac{w_L}{MP_L} = \frac{w_K}{MP_K} \]

This is saying that given we have made our optimal choices, the marginal cost of producing an additional unit of output is the same when measured in terms of any input, reflecting the optimal allocation of resources.

Directly take derivatives cumbersome approach

Now we will not directly invoke the envelope theorem in the simple fashion as above, but will explicitly take derivative of every term that includes \(q\) with respect to \(q\), and show that we will have the same result as above, by also invoking the first-order optimality conditions.

Given price vector \(\left\{w_i\right\}_{i=1}^{N}\) and quantity \(q\), the lagrangian for the cost minimization problem, evaluated at the optimal choices \(\left\{x^{\ast}_i\left(\left\{w_j\right\}_{j=1}^{N}, q\right)\right\}_{i=1}^N\), is:

\[ \begin{aligned} \mathcal{L^{\ast}}(\left\{w_i\right\}_{i=1}^{N}, q) &= \sum_{i=1}^N w_i \cdot x^{\ast}_i - \lambda^{\ast}\left(f(\left\{x^{\ast}_i\right\}_{i=1}^N) - q\right) \end{aligned} \]

We now take the derivative of the Lagrangian evaluated at the optimal choices with respect to quantity, note that this is the same as taking the derivative of the cost function with respect to quantity, because at optimal choices, output equals to \(q\). Specifically:

\[ \begin{aligned} \frac{d \sum_{i=1}^N w_i \cdot x^{\ast}_i }{ d q} = \frac{d \mathcal{L^{\ast}}(\left\{w_i\right\}_{i=1}^{N}, q)}{ d q} &= \frac{ d \left( \sum_{i=1}^N w_i \cdot x^{\ast}_i - \lambda^{\ast}\left(f(\left\{x^{\ast}_i\right\}_{i=1}^N) - q\right) \right)}{d q}\\ &= \frac{d \sum_{i=1}^N w_i \cdot x^{\ast}_i }{d q} - \frac{d \lambda^{\ast}\cdot f(\left\{x^{\ast}_i\right\}_{i=1}^N) }{d q} + \frac{d \lambda^{\ast}\cdot q }{d q} \end{aligned} \]

For the three components above, first (the optimal choices are a function of \(q\) along with the wage vector \(\mathbf{w}\), we abbreviate the wage vector for space considerations):

\[ \begin{aligned} \frac{d \sum_{i=1}^N w_i \cdot x^{\ast}_i \left(q\right) }{d q} &= \sum_{i=1}^N w_i \cdot \frac{\partial x^{\ast}_i\left(q\right)}{\partial q} \end{aligned} \]

Second:

\[ \begin{aligned} \frac{d \lambda^{\ast}\left(q\right)\cdot f(\left\{x^{\ast}_i\left(q\right)\right\}_{i=1}^N) }{d q} &= \frac{\partial \lambda^{\ast}\left(q\right) }{\partial q}\cdot f\left(\left\{x^{\ast}_i\left(q\right)\right\}_{i=1}^N\right) + \lambda^{\ast}\left(q\right)\cdot \sum_{i=1}^N \frac{ \partial f\left(\left\{x^{\ast}_j\left(q\right)\right\}_{j=1}^N\right) }{ \partial x_i } \cdot \frac{\partial x_i^{\ast}\left(q\right)}{\partial q} \end{aligned} \]

Third:

\[ \begin{aligned} \frac{d \lambda^{\ast}\left(q\right)\cdot q }{d q} &= \frac{\partial \lambda^{\ast}\left(q\right)}{\partial q} \cdot q + \lambda^{\ast}\left(q\right) \end{aligned} \]

Note that, from the first order conditions of the cost minimization problem, we have

\[ \frac{w_i}{\lambda^{\ast}\left(q, \mathbf{w}\right)} = \frac{ \partial f\left(\left\{x^{\ast}_j\left(q\right)\right\}_{j=1}^N\right) }{\partial x_i} \]

Additionally, from the derivative of the objective function with respect to the Lagrange multiplier, at the optimum we also have \(f\left(\left\{x^{\ast}_i\left(q\right)\right\}_{i=1}^N\right)=q\). Therefore:

\[ \begin{aligned} \frac{d \mathcal{L^{\ast}}(\left\{w_i\right\}_{i=1}^{N}, q)}{ d q} &= \frac{d \sum_{i=1}^N w_i \cdot x^{\ast}_i }{d q} - \frac{d \lambda^{\ast}\cdot f(\left\{x^{\ast}_i\right\}_{i=1}^N) }{d q} + \frac{d \lambda^{\ast}\cdot q }{d q}\\ &= \sum_{i=1}^N w_i \cdot \frac{\partial x^{\ast}_i}{\partial q} - \frac{\partial \lambda^{\ast} }{\partial q}\cdot f\left(\left\{x^{\ast}_i\right\}_{i=1}^N\right) - \lambda^{\ast}\cdot \sum_{i=1}^N \frac{ \partial f\left(\left\{x^{\ast}_j\right\}_{j=1}^N\right) }{ \partial x_i } \cdot \frac{\partial x_i^{\ast}}{\partial q} + \frac{\partial \lambda^{\ast}}{\partial q} \cdot q + \lambda^{\ast}\\ &= \sum_{i=1}^N \left( w_i - \lambda^{\ast}\cdot \frac{ \partial f\left(\left\{x^{\ast}_j\right\}_{j=1}^N\right) }{ \partial x_i } \right) \cdot \frac{\partial x^{\ast}_i}{\partial q} + \left( q-f\left(\left\{x^{\ast}_i\right\}_{i=1}^N\right) \right)\cdot \frac{\partial \lambda^{\ast} }{\partial q} + \lambda^{\ast}\\ &= \sum_{i=1}^N \left(0\right) \cdot \frac{\partial x^{\ast}_i}{\partial q} + \left(0\right)\cdot \frac{\partial \lambda^{\ast} }{\partial q} + \lambda^{\ast}\\ &= \lambda^{\ast} \end{aligned} \]

In the example above. We invoked the optimality conditions for this constrained minimization problem to simplify terms. But this is also exactly what the envelope theorem does. Knowing the envelope theorem, we avoid having to work through all the cumbersome derivatives explicitly as we did above.

4.3.2 Envelope Theorem and the effect of a shift in price on the cost function, Shephard’s Lemma

We can also use the envelope theorem to derive the effect of a shift in price on the Lagrangian evaluated at the optimal choices, or equivalently the cost function evaluated at the optimal choices.

We can express the lagrangian as a function of the input choices, the lagrange multiplier, and \(w_j\). \(w_j\) has direct impacts, and indirect impacts through input choices and the lagrange multiplier:

\[ \begin{aligned} \mathcal{L^{\ast}}(\left\{x_i^{\ast}\left(q, \mathbf{w}\right)\right\}_{i=1}^{N}, \lambda^{\ast}\left(q, \mathbf{w}\right), w_j) \end{aligned} \]

We are highlighting here that the optimal choice are a function of \(w_j\), they are also a function of all other prices along with \(q\). So the derivative of the Lagrangian evaluated at the optimal choices with respect to quantity is:

\[ \begin{aligned} \frac{d \sum_{i=1}^N w_i \cdot x^{\ast}_i}{dw_j} &= \frac{d \mathcal{L^{\ast}}(\left\{x_i^{\ast}\left(q, \mathbf{w}\right)\right\}_{i=1}^{N}, \lambda^{\ast}\left(q, \mathbf{w}\right), w_j) }{ d w_j}\\ &= \sum_{i=1}^N \frac{\partial \mathcal{L^{\ast}} }{\partial x_i} \cdot \frac{\partial x_i^{\ast}\left(q, \mathbf{w}\right)}{\partial w_j} + \frac{\partial \mathcal{L^{\ast}} }{\partial \lambda} \cdot \frac{\partial \lambda^{\ast}\left(q, \mathbf{w}\right)}{\partial w_j} + \frac{\partial \mathcal{L^{\ast}} }{\partial w_j}\\ &= \sum_{i=1}^N 0 \cdot \frac{\partial x_i^{\ast}\left(q, \mathbf{w}\right)}{\partial w_j} + 0 \cdot \frac{\partial \lambda^{\ast}\left(q, \mathbf{w}\right)}{\partial w_j} + \frac{\partial \mathcal{L^{\ast}} }{\partial w_j}\\ &= x_j^{\ast}(\left\{w_i\right\}_{i=1}^{N}, q) \end{aligned} \]

This is Shephard’s Lemma, which says that the derivative of the cost function with respect to price is equal to the optimal choice of the input associated with that price. This result is very useful in empirical work, as it allows us to back out optimal input choices from the cost function. We do this by taking the derivative of the cost function with respect to price, and evaluating the derivative at the observed prices. Shephard’s Lemma applies when the cost function is continuously differentiable.

Derivative of the cost function with respect to input prices

One interesting thing to note here is that, why did we have to use the Lagrangian? why not directly take the derivative of the cost function with respect to price? Will we get the same result. Yes, we will. But it is only feasible if we have the solutions for the optimal conditional factor demand functions. Specifically, the derivative of the cost function with respect to price is:

\[ \begin{aligned} \frac{d \sum_{i=1}^N w_i \cdot x^{\ast}_i\left(q, \mathbf{w}\right)}{dw_j} &= \sum_{i=1}^N \frac{\partial (w_i \cdot x^{\ast}_i\left(q, \mathbf{w}\right))}{\partial w_j}\\ &= \sum_{i=1}^N \left( \frac{\partial w_i}{\partial w_j} \cdot x^{\ast}_i\left(q, \mathbf{w}\right) + w_i \cdot \frac{\partial x^{\ast}_i\left(q, \mathbf{w}\right)}{\partial w_j} \right) \\ &= x^{\ast}_j\left(q, \mathbf{w}\right) + \sum_{i=1}^N w_i \cdot \frac{\partial x^{\ast}_i\left(q, \mathbf{w}\right)}{\partial w_j}\\ \end{aligned} \]

The first order condition of the Lagrangian-based cost minimization problem does not directly tell us what the marginal effect of a change in the price of \(w_j\) on the optimal choice of \(x^{\ast}_i\) is. So we can not directly apply the envelope theorem.

However, it must be the case that \(\sum_{i=1}^N w_i \cdot \frac{\partial x^{\ast}_i\left(q, \mathbf{w}\right)}{\partial w_j} = 0\). Why is that the case? this is because as we discussed earlier at optimal choices \(w_i = \lambda^{\ast} \frac{\partial f(\mathbf{x}^{\ast})}{\partial x_i}\). So we can divide both sides by \(\lambda^{\ast}\) (still zero on the RHS), and end up with \[ \sum_{i=1}^N \frac{\partial f(\mathbf{x}^{\ast})}{\partial x_i} \cdot \frac{\partial x^{\ast}_i\left(q, \mathbf{w}\right)}{\partial w_j} = 0 \] It turns out the above is true when we are moving along an isoquant of the production function, where the output level \(q\) remains constant. Consider the quantity constrasnt \(q = f(\mathbf{x}^{\ast})\). Taking the total derivative with respect to \(w_j\), we get: \[ 0 = \frac{d q}{d w_j} = \sum_{i=1}^N \frac{\partial f(\mathbf{x}^{\ast})}{\partial x_i} \cdot \frac{\partial x^{\ast}_i\left(q, \mathbf{w}\right)}{\partial w_j} \]

The intuition here is that when one of the input prices change, all inputs will shift, and the shifts in all inputs will shift the output. But from a marginal/infinitesimal perspective, they must all shift in such a way that the output remains constant, which means all the shifts must cancel each other out exactly.