Explore modules

Envelope Theorem

Differentiate an optimized value while the optimizer moves and constraints become active.

Free theory article

Differentiate an optimized value while the optimizer moves and constraints become active.

Concept & interpretation

When an objective function depends on a parameter, finding how its optimized value changes with respect to that parameter might seem to require differentiating the entire optimization process. The envelope theorem shows that, under certain conditions, we only need to evaluate the partial derivative of the objective function at the optimal point.

Observe the Envelope Derivative

Open Envelope Theorem to see the interaction between the parameter, the optimizer, and the optimal value.

  1. Set Reward a to 1, Curvature b to 1, and Capacity to 2. Check that the Optimal action is 1 and the Envelope derivative is 1.
  2. Change Reward a to 4. The unconstrained optimum would be 4, but due to the capacity constraint, the Optimal action clips to 2. Notice that the Envelope derivative becomes 2, matching the new clipped x*.
  3. Set Reward a to -1. The optimal action clips to the lower bound 0, and the Envelope derivative becomes 0.
Read the full free theory article