In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equation constraints (i.e., subject to the condition that one or more equations have to be satisfied exactly by the chosen values of the variables). It is named after the mathematician Joseph-Louis Lagrange.
Summary and rationale The basic idea is to convert a constrained problem into a form such that the derivative test of an unconstrained problem can still be applied. The relationship between the gradient of the function and gradients of the constraints rather naturally leads to a reformulation of the original problem, known as the Lagrangian function or Lagrangian. In the general case, the Lagrangian is defined as ℒ(x,λ)≡f(x)+⟨λ,g(x)⟩ for functions f,g; the notation ⟨⋅,⋅⟩ denotes an inner product. The value λ is called the Lagrange multiplier. In simple cases, where the inner product is defined as the dot product, the Lagrangian is ℒ(x,λ)≡f(x)+λ⋅g(x) The method can be summarized as follows: in order to find the maximum or minimum of a function f subject to the equality constraint g(x)=0, find the stationary points of ℒ considered as a function of x and the Lagrange multiplier λ . This means that all partial derivatives should be zero, including the partial derivative with respect to λ .
or equivalently
The solution corresponding to the original constrained optimization is always a saddle point of the Lagrangian function, which can be identified among the stationary points from the definiteness of the bordered Hessian matrix. The great advantage of this method is that it allows the optimization to be solved without explicit parameterization in terms of the constraints. As a result, the method of Lagrange multipliers is widely used to solve challenging constrained optimization problems. Further, the method of Lagrange multipliers is generalized by the Karush–Kuhn–Tucker conditions, which can also take into account inequality constraints of the form h(𝐱)≤c for a given constant c.
Statement The following is known as the Lagrange multiplier theorem. Let f:ℝn→ℝ be the objective function and let g:ℝn→ℝc be the constraints function, both belonging to C1 (that is, having continuous first derivatives). Consider the following constrained optimization problem: maximize f(x)subject to: g(x)=0 Let x⋆ be an optimal solution to the above optimization problem such that, for the matrix of partial derivatives [Dg(x⋆)]j,k= ∂gj ∂xk, rank(Dg(x⋆))=c≤n: Then there exists a unique Lagrange multiplier λ⋆∈ℝc such that Df(x⋆)=−λ⋆𝖳Dg(x⋆) . (In this equation, λ⋆ is a column vector, so its transpose λ⋆𝖳 is a row vector. Alternatively, we can redefine the Lagrange multiplier directly as a row vector and thus avoid the transposition.) The Lagrange multiplier theorem states that at any local maximum (or minimum) of the function evaluated under the equality constraints, if constraint qualification applies (explained below), then the gradient of the function (at that point) can be expressed as a linear combination of the gradients of the constraints (at that point), with the Lagrange multipliers acting as coefficients. This is equivalent to saying that any direction perpendicular to all gradients of the constraints is also perpendicular to the gradient of the function. Or still, saying that the directional derivative of the function is 0 in every feasible direction.
Single constraint
For the case of only one constraint and only two choice variables (as exemplified in Figure 1), consider the optimization problem maximizex,yf(x,y)subject tog(x,y)=0. (Sometimes an additive constant is shown separately rather than being included in g, in which case the constraint is written g(x,y)=c, as in Figure 1.) We assume that both f and g have continuous first partial derivatives. We introduce a new variable (λ) called a Lagrange multiplier (or Lagrange undetermined multiplier) and study the Lagrange function (or Lagrangian or Lagrangian expression) defined by ℒ(x,y,λ)=f(x,y)+λ⋅g(x,y), where the λ term may be either added or subtracted. If f(x0,y0) is a maximum of f(x,y) for the original constrained problem and ∇g(x0,y0)≠0, then there exists λ0 such that (x0,y0,λ0) is a stationary point for the Lagrange function (stationary points are those points where the first partial derivatives of ℒ are zero). The assumption ∇g≠0 is called constraint qualification. However, not all stationary points yield a solution of the original problem, as the method of Lagrange multipliers yields only a necessary condition for optimality in constrained problems. Sufficient conditions for a minimum or maximum also exist, but if a particular candidate solution satisfies the sufficient conditions, it is only guaranteed that that solution is the best one locally – that is, it is better than any permissible nearby points. The global optimum can be found by comparing the values of the original objective function at the points satisfying the necessary and locally sufficient conditions. The method of Lagrange multipliers relies on the intuition that at a maximum, f(x, y) cannot be increasing in the direction of any such neighboring point that also has g = 0. If it were, we could walk along g = 0 to get higher, meaning that the starting point wasn't actually the maximum. Viewed in this way, it is an exact analogue to testing if the derivative of an unconstrained function is 0, that is, we are verifying that the directional derivative is 0 in any relevant (viable) direction. We can visualize contours of f given by f(x, y) = d for various values of d, and the contour of g given by g(x, y) = c. Suppose we walk along the contour line with g = c . We are interested in finding points where f almost does not change as we walk, since these points might be maxima. There are two ways this could happen:
… excerpt ends here. Continue reading the full article.





