Lagrange multipliers is a technique to solve constrained optimization problems: find the extrema of a multivariate objective function
Note that
Key observations for
- Along a path (constraint
), critical points of = level curves of that are tangent to the contour representing - At each of these points, the gradient
is always perpendicular to the line tangent to the level curve passing through the point. Therefore, it is tangent to both the level curve and the constraint function at the critical point. and are parallel to each other and point towards the same direction. They are constant multiples of each other where
is called Lagrange multipliers
Process with Example
- Make sure the problem follow a form:
- The problem can be represented by a differentiable, multivariate function
with n-dimensional inputs - There are
constraint functions, each takes the form of multivariate function , where is a constant and has the same dimension as - Both
and are twice-differentiable around the open neighborhood of the optimizer
- The problem can be represented by a differentiable, multivariate function
- For each constraint function
, introduce a new variables —Lagrange multiplier. Then define the Lagrangian function as follows:
- Set the gradient of
to the zero vector to find critical points of . All components (partial derivatives) of must equate to 0.
- This leads to a system of equations
- Each candidate solution looks like
. Remove , then we have found critical points of , namely
To classify these critical point, there are two ways:
- Plug back the values
into function and compare function values, to determine the global maximum and minimum over the feasible region ). Easy and recommended. - Check bordered Hessian
: if the leading principal minor
Examples
Lagrange Multiplier as Sensitivity to change in constraint
The Lagrange multipliers
Derivation
Assume one constraint
Optimizing
Considering the optimal value of Lagrangian function
Take the partial derivative of