Recall that a general optimization problem is of the form
The feasible set is an example of a constraint. Our goal is to transform constrained problems into unconstrained problems. Typically constraints are not presented with feasible sets, but instead a collection of equalities and inequalities.
Often times bound constraints can be removed by transforming . For example, the bound constraint can be removed by letting
For example,
is equivalent to
Some equality constraints can be reduced by solving for given . For example,
is equivalent to
given that .
Lagrange Multipliers
The method of Lagrange multipliers is to solve problems of the form
where and have continuous partial derivatives. Recall that the gradient of a function at a point is perpendicular to the contour line of that function through said point. So the gradient of is perpendicular to the contour line .
Thus, we seek the best that satisfies the constraint and
for some Lagrange multiplier .
We define the Lagrangian as the multivariate function
Notice that
and . Thus, solving solves both and .
Example
Consider the following problem:
We start by forming the Lagrangian
and compute the gradient
Setting the gradient to zero and solving yields , and .
The method of Lagrange multipliers can be extended to multiple equality constraints. For example, the problem
is equivalent to
Giving the Lagrangian of
Or in general with Lagrange multipliers and equality constraints: