Tutorials › Calculus III › The Multiplier as a Marginal Value

Lagrange Multipliers · Tutorial 458 of 999

The Multiplier as a Marginal Value

Learn when a Lagrange multiplier gives the marginal change in an optimal value, and how to interpret its sign consistently.

Intermediate 10 min read

What You'll Learn

  • Define an optimal-value function for a family of equality constraints
  • Derive the relationship between the multiplier and the derivative of the optimal value
  • Identify the regularity and differentiability assumptions behind the relationship
  • Compute marginal values in linear and nonlinear constraint examples
  • Translate the multiplier correctly when the Lagrangian sign convention changes

From a Constraint to a Marginal Value

A constrained optimum answers a question at a particular constraint level. For example, it may tell us the smallest value of an objective when \(g(\mathbf{x})=4\). Often we also want to know how that optimum changes if the required level changes slightly: what happens when the constraint becomes \(g(\mathbf{x})=4.01\), or \(g(\mathbf{x})=3.99\)?

The Lagrange multiplier can answer this sensitivity question. Under suitable regularity and smoothness assumptions, it is the derivative of the optimal value with respect to the constraint level. This interpretation is local: it describes the change for a small change in the level, while the same optimizing branch remains relevant.

Definition: Given an objective \(f:\mathbb{R}^n\to\mathbb{R}\) and a constraint function \(g:\mathbb{R}^n\to\mathbb{R}\), define the optimal-value function \(V(c)\) to be the objective value at an optimizer of \(f\) subject to \(g(\mathbf{x})=c\), when such an optimizer exists. If there are multiple optimizers, they must give the same objective value for \(V(c)\) to be unambiguous.

The value \(c\) is a parameter describing the constraint, not an extra coordinate of \(\mathbf{x}\). As \(c\) changes, the feasible set changes, and so may its optimizer and optimal value.

Why the Multiplier Is the Derivative

Use the convention \(\nabla f(\mathbf{x})=\lambda\nabla g(\mathbf{x})\) for the one-constraint Lagrange equation. Suppose that for \(c\) near a level \(c_0\), there is a differentiable family of optimizers \(\mathbf{x}^*(c)\) on the same local branch. Assume \(f\) and \(g\) are differentiable, the constraint is regular there, and the optimizer satisfies the Lagrange equation with multiplier \(\lambda(c)\). Regularity here means \(\nabla g(\mathbf{x}^*(c))\ne\mathbf{0}\). Also assume the local optimal value is \(V(c)=f(\mathbf{x}^*(c))\).

Theorem: Under these assumptions, \(V'(c)=\lambda(c)\).

The reason is the chain rule. The optimizer remains on the constraint, so \(g(\mathbf{x}^*(c))=c\). Differentiate this identity, and also differentiate the objective value. The multiplier equation then identifies the two derivatives.

1
Differentiate the constraint.
By the chain rule, \(\nabla g(\mathbf{x}^*(c))\cdot \frac{d\mathbf{x}^*}{dc}=1\), since the derivative of \(c\) with respect to itself is \(1\).
2
Differentiate the optimal value.
Again by the chain rule, \(V'(c)=\nabla f(\mathbf{x}^*(c))\cdot \frac{d\mathbf{x}^*}{dc}\).
3
Use the Lagrange equation.
Substituting \(\nabla f=\lambda\nabla g\) gives \(V'(c)=\lambda(c)\nabla g(\mathbf{x}^*(c))\cdot \frac{d\mathbf{x}^*}{dc}=\lambda(c)\).

This is a complete local justification: the equality follows from differentiating the constraint and objective along the optimizer branch. It does not say that every solution of the Lagrange equations is an optimum, or that every multiplier automatically describes a global value function. The optimizer and value must have the stated regularity, and the branch being followed must actually determine the value under discussion.

Worked Example: A Minimum with a Fixed Sum

Worked Example: A Minimum with a Fixed Sum

Minimize \(f(x,y)=x^2+y^2\) subject to \(x+y=c\), and find how the minimum changes with \(c\).

Here \(g(x,y)=x+y\), so \(\nabla g=(1,1)\), which is nonzero for every \((x,y)\). The Lagrange equations for a minimum are

$$ (2x,2y)=\lambda(1,1). $$

Thus \(2x=\lambda\) and \(2y=\lambda\), so \(x=y\). Together with \(x+y=c\), this gives \(x=y=c/2\), and then \(\lambda=c\).

The value at this point is

$$ V(c)=\left(\frac{c}{2}\right)^2+\left(\frac{c}{2}\right)^2 =\frac{c^2}{2}. $$

This candidate is the global minimum: for any feasible pair, \(x+y=c\), and

$$ x^2+y^2=\frac{(x+y)^2+(x-y)^2}{2} =\frac{c^2+(x-y)^2}{2} \ge \frac{c^2}{2}. $$

Equality occurs when \(x=y=c/2\), as found above. Differentiating the value function gives \(V'(c)=c=\lambda\). For instance, at \(c=4\), the optimizer is \((2,2)\), the minimum is \(8\), and the multiplier is \(4\). The derivative \(V'(4)=4\) confirms that, locally, increasing the constraint level by one unit increases the minimum by about four units.

As a direct check at \(c=4\), the constraint gives \(2+2=4\), and the objective gives \(2^2+2^2=8\). The multiplier equation also holds: \(\nabla f(2,2)=(4,4)=4(1,1)=\lambda\nabla g\).

Worked Example: A Maximum and a Sign Convention

Worked Example: A Maximum and a Sign Convention

Maximize \(f(x,y)=-(x-1)^2-(y-2)^2\) subject to \(x+2y=c\). Find the optimal value and its marginal value.

Set \(g(x,y)=x+2y\), so \(\nabla g=(1,2)\). The Lagrange equations are

$$ \bigl(-2(x-1),-2(y-2)\bigr)=\lambda(1,2). $$

They imply \(x=1-\lambda/2\) and \(y=2-\lambda\). Substituting into the constraint gives

$$ 1-\frac{\lambda}{2}+2(2-\lambda)=5-\frac{5\lambda}{2}=c, \qquad \lambda=\frac{2(5-c)}{5}. $$

Therefore \(x=c/5\) and \(y=2c/5\). The value is

$$ V(c) =-\left(\frac{c-5}{5}\right)^2 -\left(\frac{2(c-5)}{5}\right)^2 =-\frac{(c-5)^2}{5}. $$

This is the global maximum on the constraint line: the objective is the negative of a sum of squares, and the Lagrange point gives the closest point on that line to \((1,2)\). More directly, writing \(x=c-2y\) makes the objective a negative quadratic in \(y\) with its unique maximum at \(y=2c/5\), which gives \(x=c/5\).

Differentiation verifies the marginal-value formula:

$$ V'(c)=-\frac{2(c-5)}{5} =\frac{2(5-c)}{5} =\lambda. $$

At \(c=3\), the optimizer is \((3/5,6/5)\), the objective is \(-4/5\), and \(\lambda=4/5\). The constraint check is \(3/5+2(6/5)=3\); the gradient check is \(\nabla f=(4/5,8/5)=(4/5)(1,2)\). Also \(V'(3)=4/5\).

If instead the Lagrangian is written \(L=f+\mu(g-c)\), its stationarity equation is \(\nabla f+\mu\nabla g=\mathbf{0}\). Thus \(\mu=-\lambda\), and the derivative of the optimal value is \(V'(c)=-\mu\), not \(\mu\). Here \(\mu=-4/5\) at \(c=3\), while the actual derivative is \(4/5\).

Worked Example: A Nonlinear Constraint Level

Worked Example: A Nonlinear Constraint Level

For \(c>0\), maximize \(f(x)=x\) subject to \(g(x)=x^2=c\). Find the multiplier and compare it with the derivative of the maximum.

The feasible values are \(x=\sqrt{c}\) and \(x=-\sqrt{c}\), so the maximum is attained at \(x^*(c)=\sqrt{c}\). The constraint is regular at this optimizer because \(g'(x^*)=2\sqrt{c}\ne0\). The Lagrange equation \(f'(x^*)=\lambda g'(x^*)\) gives

$$ 1=2\lambda\sqrt{c}, \qquad \lambda=\frac{1}{2\sqrt{c}}. $$

The optimal value is \(V(c)=\sqrt{c}\), and hence

$$ V'(c)=\frac{1}{2\sqrt{c}}=\lambda. $$

At \(c=4\), the maximizing feasible value is \(x=2\), the objective value is \(2\), and \(\lambda=1/4\). Substitution checks the constraint, since \(2^2=4\), and checks the Lagrange equation, since \(f'(2)=1=(1/4)g'(2)=(1/4)(4)\). The derivative \(V'(4)=1/4\) agrees. At \(c=0\), however, \(g'(0)=0\), so the regularity assumption fails; the regular-constraint argument cannot be applied there.

What the Sign and Size Mean

With the convention \(\nabla f=\lambda\nabla g\) and the constraint written \(g(\mathbf{x})=c\), a positive \(\lambda\) means that increasing \(c\) slightly increases the optimal objective value to first order. A negative \(\lambda\) means that a small increase in \(c\) decreases that value. The statement is local: over a finite change in \(c\), the multiplier may change, and the accumulated change need not equal the initial multiplier times the full change in \(c\).

The numerical size also depends on how the constraint is expressed. Replacing \(g(\mathbf{x})=c\) with \(a g(\mathbf{x})=a c\), where \(a\ne0\), changes the gradient of the constraint and therefore changes the multiplier’s numerical value. The derivative with respect to the new level \(a c\) is scaled accordingly. The predicted change in the optimal objective remains consistent when both the level and its units are interpreted using the same expression.

Key takeaway: Under the convention \(\nabla f=\lambda\nabla g\) for \(g(\mathbf{x})=c\), the multiplier is \(dV/dc\) when a differentiable, regular optimizer branch determines the value function. Changing the sign convention changes the multiplier’s sign; it does not change the underlying optimal value.

When the Interpretation Needs Care

The formula applies along a differentiable branch of optimizers, not automatically across every possible change in the global optimizer. For example, if two different local branches compete and the global optimum switches from one to the other, the global value function may fail to be differentiable at the switching level. In that situation, a multiplier calculated on one branch describes that branch’s local sensitivity; it need not equal a derivative of the global value at the switch.

There are two common errors to guard against:

  • Ignoring assumptions: a singular constraint, a nondifferentiable optimizer branch, or a branch that does not determine the relevant optimum can prevent the formula from applying as stated.
  • Mixing sign conventions: the multiplier from \(L=f+\mu(g-c)\) has the opposite sign from the multiplier in \(\nabla f=\lambda\nabla g\). Always derive the relationship from the Lagrangian actually being used.

For the second example at \(c=3\), the incorrect calculation would identify \(\mu=-4/5\) from \(L=f+\mu(g-c)\) and claim \(V'(3)=\mu=-4/5\). But direct differentiation gives \(V'(3)=4/5\). The correction is to use \(V'(c)=-\mu\) for that Lagrangian convention, or to use \(\lambda=-\mu\) in the convention \(\nabla f=\lambda\nabla g\).

Check Your Understanding

Use the convention \(\nabla f=\lambda\nabla g\) for constraints written as \(g(\mathbf{x})=c\).

  1. What two identities are differentiated to derive \(V'(c)=\lambda(c)\)?
  2. For the minimum of \(x^2+y^2\) subject to \(x+y=c\), what are \(V(c)\) and \(V'(c)\)?
  3. If \(L=f+\mu(g-c)\), how is \(V'(c)\) related to \(\mu\)?
  4. Why does the regularity condition fail for \(g(x)=x^2\) at \(x=0\)?
  5. Why may a multiplier on one local optimizer branch fail to give a derivative of the global value at a branch switch?