In mathematical optimization problems, the method of Lagrange multipliers, named after Joseph Louis Lagrange, is a method for finding the extrema of a function of several variables subject to one or more constraints; it is the basic tool in nonlinear constrained optimization. In Mathematics, the term optimization, or mathematical programming, refers to the study of problems in which one seeks to minimize or maximize a real function In Mathematics, maxima and minima, known collectively as extrema, are the largest value (maximum or smallest value (minimum that The Mathematical concept of a function expresses dependence between two quantities one of which is given (the independent variable, argument of the function In Mathematics, a constraint is a condition that a solution to an optimization problem must satisfy
Simply put, the technique is able to determine where on a particular set of points (such as a circle, sphere, or plane) a particular function is the smallest (or largest). Circles are simple Shapes of Euclidean geometry consisting of those points in a plane which are at a constant Distance, called the "Globose" redirects here See also Globose nucleus. A sphere (from Greek σφαίρα - sphaira, "globe
More formally, Lagrange multipliers compute the stationary points of the constrained function. In Mathematics, particularly in Calculus, a stationary point is an input to a function where the Derivative is zero (equivalently the By Fermat's theorem, extrema occur either at these points, or on the boundary, or at points where the function is not differentiable. Fermat's theorem is a Theorem in Real analysis, named after Pierre de Fermat. In Calculus, a branch of mathematics the derivative is a measurement of how a function changes when the values of its inputs change
It reduces finding stationary points of a constrained function in n variables with k constraints to finding stationary points of an unconstrained function in n+k variables. In Mathematics, particularly in Calculus, a stationary point is an input to a function where the Derivative is zero (equivalently the The method introduces a new unknown scalar variable (called the Lagrange multiplier) for each constraint, and defines a new function (called the Lagrangian) in terms of the original function, the constraints, and the Lagrange multipliers.
Contents |
Consider a two-dimensional case. Suppose we have a function f(x,y) we wish to maximize or minimize subject to the constraint

where c is a constant. We can visualize contours of f given by

for various values of dn, and the contour of g given by g(x,y) = c. A contour line (also Level set, isopleth, isoline, isogram or isarithm) of a function of two
Suppose we walk along the contour line with g = c. In general the contour lines of f and g may be distinct, so traversing the contour line for g = c could intersect with or cross the contour lines of f. This is equivalent to saying that while moving along the contour line for g = c the value of f can vary. Only when the contour line for g = c touches contour lines of f tangentially, we do not increase or decrease the value of f - that is, when the contour lines touch but do not cross. In Mathematics, contact of order k of functions is an equivalence relation corresponding to having the same value at a point P and also the same Derivatives
This occurs exactly when the tangential component of the total derivative vanishes:
, which is at the constrained stationary points of f (which include the constrained local extrema, assuming f is differentiable). In Mathematics, given a vector at a point on a Surface, that vector can be decomposed uniquely as a sum of two vectors one Tangent to the surface called In the mathematical field of Differential calculus, the term total derivative has a number of closely related meanings In Mathematics, particularly in Calculus, a stationary point is an input to a function where the Derivative is zero (equivalently the Computationally, this is when the gradient of f is normal to the constraint(s): when
for some scalar λ. In Mathematics, given a vector at a point on a Surface, that vector can be decomposed uniquely as a sum of two vectors one Tangent to the surface called Note that the constant λ is required because, even though the directions of both gradient vectors are equal, the magnitudes of the gradient vectors are most likely not equal.
A familiar example can be obtained from weather maps, with their contour lines for temperature and pressure: the constrained extrema will occur where the superposed maps show touching lines (isopleths). A contour line (also Level set, isopleth, isoline, isogram or isarithm) of a function of two An isopleth or Contour line, is a feature of meteorological charts connecting points which have an equal value of some variable at a given time and spatial area
Geometrically we translate the tangency condition to saying that the gradients of f and g are parallel vectors at the maximum, since the gradients are always normal to the contour lines. In Vector calculus, the gradient of a Scalar field is a Vector field which points in the direction of the greatest rate of increase of the scalar Thus we want points (x,y) where
, and, further, g(x,y) = c. To incorporate both these conditions into one equation, we introduce an unknown scalar, λ, and solve

with

and

As discussed above, we are looking for stationary points of f seen while travelling on the level set g(x,y) = c. This occurs just when the gradient of f has no component tangential to the level sets of g. This condition is equivalent to
for some λ. Stationary points (x,y,λ) of F also satisfy g(x,y) = c as can be seen by considering the derivative with respect to λ.
Be aware that the solutions are the stationary points of the Lagrangian F, and are saddle points: they are not necessarily extrema of F. In Mathematics, particularly in Calculus, a stationary point is an input to a function where the Derivative is zero (equivalently the In Mathematics, a saddle point is a point in the domain of a function of two variables which is a Stationary point but not a Local extremum F is unbounded: given a point (x,y) that doesn't lie on the constraint, letting
makes F arbitrarily large or small. However, under certain stronger assumptions, as we shall see below, the strong Lagrangian principle holds, which states that the maxima of f maximize the Lagrangian globally.
Denote the objective function by
and let the constraints be given by
, perhaps by moving constants to the left, as in
. The domain of f should be an open set containing all points satisfying the constraints. Furthermore, f and the gk must have continuous first partial derivatives and the gradients of the gk must not be zero on the domain. [1] Now, define the Lagrangian, Λ, as
without a subscript indicates the vector with elements
, which are taken to be independent variables. Observe that both the optimization criteria and constraints gk(x) are compactly encoded as stationary points of the Lagrangian:
if and only if 
means to take the gradient only with respect to each element in the vector
, instead of all variables. ↔ and
implies gk = 0. Collectively, the stationary points of the Lagrangian,
,give a number of unique equations totaling the length of
plus the length of
. This often makes it possible to solve for every x and λk, without inverting the gk. [1] For this reason, the Lagrange multiplier method can be useful in situations where it is easier to find derivatives of the constraint functions than to invert them.
Often the Lagrange multipliers have an interpretation as some salient quantity of interest. To see why this might be the case, observe that:

So, λk is the rate of change of the quantity being optimized as a function of the constraint variable. As examples, in Lagrangian mechanics the equations of motion are derived by finding stationary points of the action, the time integral of the difference between kinetic and potential energy. Lagrangian mechanics is a re-formulation of Classical mechanics that combines Conservation of momentum with Conservation of energy. In Physics, the action is a particular quantity in a Physical system that can be used to describe its operation Thus, the force on a particle due to a scalar potential,
, can be interpreted as a Lagrange multiplier determining the change in action (transfer of potential to kinetic energy) following a variation in the particle's constrained trajectory. In economics, the optimal profit to a player is calculated subject to a constrained space of actions, where a Lagrange multiplier is the value of relaxing a given constraint (e. g. through bribery or other means).
The method of Lagrange multipliers is generalized by the Karush-Kuhn-Tucker conditions. In Mathematics, the Karush–Kuhn–Tucker conditions (also known as the Kuhn-Tucker or the KKT conditions are necessary for a solution in Nonlinear
Suppose you wish to maximize f(x,y) = x + y subject to the constraint x2 + y2 = 1. The constraint is the unit circle, and the level sets of f are diagonal lines (with slope -1), so one can see graphically that the maximum occurs at
(and the minimum occurs at 
Formally, set g(x,y) = x2 + y2 − 1, and
Set the derivative dΛ = 0, which yields the system of equations:

As always, the
equation is the original constraint. In Mathematics, a level set of a real -valued function f of n variables is a set of the form { ( x 1
Combining the first two equations yields x = y (explicitly,
(otherwise (i) yields 1 = 0), so one can solve for λ, yielding λ = − 1 / (2x), which one can substitute into (ii)).
Substituting into (iii) yields 2x2 = 1, so
and the stationary points are
and
. Evaluating the objective function f on these yields

thus the maximum is
, which is attained at
and the minimum is
, which is attained at
.
Suppose you want to find the maximum values for

with the condition that the x and y coordinates lie on the circle around the origin with radius √3, that is,

As there is just a single condition, we will use only one multiplier, say λ.
Use the constraint to define a function g(x, y):

The function g is identically zero on the circle of radius √3. So any multiple of g(x, y) may be added to f(x, y) leaving f(x, y) unchanged in the region of interest (above the circle where our original constraint is satisfied). Let

The critical values of Λ occur when its gradient is zero. The partial derivatives are

Equation (iii) is just the original constraint. Equation (i) implies x = 0 or λ = −y. In the first case, if x = 0 then we must have
by (iii) and then by (ii) λ=0. In the second case, if λ = −y and substituting into equation (ii) we have that,

Then x2 = 2y2. Substituting into equation (iii) and solving for y gives this value of y:

Thus there are six critical points:

Evaluating the objective at these points, we find

Therefore, the objective function attains a global maximum (with respect to the constraints) at
and a global minimum at
The point
is a local minimum and
is a local maximum. In Mathematics, maxima and minima, known collectively as extrema, are the largest value (maximum or smallest value (minimum that In Mathematics, maxima and minima, known collectively as extrema, are the largest value (maximum or smallest value (minimum that In Mathematics, maxima and minima, known collectively as extrema, are the largest value (maximum or smallest value (minimum that In Mathematics, maxima and minima, known collectively as extrema, are the largest value (maximum or smallest value (minimum that
Suppose we wish to find the discrete probability distribution with maximal information entropy. In Probability theory and Statistics, a probability distribution identifies either the probability of each value of an unidentified Random variable Then

Of course, the sum of these probabilities equals 1, so our constraint is g(p) = 1 with

We can use Lagrange multipliers to find the point of maximum entropy (depending on the probabilities). For all k from 1 to n, we require that

which gives

Carrying out the differentiation of these n equations, we get

This shows that all pi are equal (because they depend on λ only). By using the constraint ∑k pk = 1, we find

Hence, the uniform distribution is the distribution with the greatest entropy.
Constrained optimization plays a central role in economics. Economics is the social science that studies the production distribution, and consumption of goods and services. For example, the choice problem for a consumer is represented as one of maximizing a utility function subject to a budget constraint. Consumer theory is a theory of Microeconomics that relates Preferences to consumer demand curves. In Economics, utility is a measure of the relative satisfaction from or desirability of Consumption of various Goods and services. A Budget constraint represents the combinations of goods and services that a consumer can purchase given current prices and his income The Lagrange multiplier has an economic interpretation as the shadow price associated with the constraint, in this case the marginal utility of income. Loosely the shadow price is the change in the objective value of the optimal solution of an optimization problem obtained by relaxing the Constraint by one unit In Economics, the marginal utility of a good or of a service is the Utility of the specific use to which an agent would put a given increase Income, refers to consumption opportunity gained by an entity within a specified time frame which is generally expressed in monetary terms
Given a convex optimization problem in standard form

with the domain
having non-empty interior, the Lagrangian function
is defined as

The vectors λ and ν are called the dual variables or Lagrange multiplier vectors associated with the problem. Convex optimization is a subfield of mathematical optimization. The Lagrange dual function
is defined as

The dual function g is concave, even when the initial problem is not convex. The dual function yields lower bounds on the optimal value p * of the initial problem; for any
and any ν we have
. If a constraint qualification such as Slater's condition holds and the original problem is convex, then we have strong duality, i. e.
.
For references to Lagrange's original work and for an account of the terminology see the Lagrange Multiplier entry in
Exposition
For additional text and interactive applets