Definition

The method of Lagrange multipliers is a method for finding the local maxima and minima of a function subject to equality constraints

Solution

Given general problem

In order to find the maximum or minimum of a function subject to the equality constraint , find the stationary point of considered as a function of and the Lagrange multiplier . In other words, all partial derivatives should be zero. The solution of the constrained optimization problem is always a Saddle Point of the Lagrangian function .

Facts

The gradient of constraint and the gradient of the function should be in same or directions.

Proof

If and don’t have same or directions, then there is the direction decreasing subject to

If and have the same or opposite direction, then there is no direction decreasing subject to