Lagrange multipliers are a method of finding the constrained extrema of a function, i.e. the maxima & minima subject to certain contraints.
Definition
Lagrange Multipliers ^definition
Let and be (smoothness) functions. is the objective function and is real-valued/scalar. is the constraint function, which should satisfy . Let be a point in the domain of . Assuming
Alternatively notated:
In some cases, the entire system is defined as the Lagrangian function (or simply, the Lagrangian). Then, the problem becomes one of finding the stationary points for
This provides one way to find extrema for constrained to , however it may not find all extrema!
Geometrically:
- is parallel to :
-  is tangential to a level set of  at :
- This is because the gradient vector of is always perpendicular to the contour.
 
Explanation
(Assuming is a scalar function, and we are finding the maximum.)
Lagrange multipliers work on some basic assumptions:
- The gradient vector points towards the direction of steepest ascent. That is, points towards closest highest value of from unless
- The level set of a function is always perpendicular to its gradient vector.
Okay, let’s get started:
- 
We know that the highest local extrema are when . However, it could be that these extrema do not satisfy the constraint function . 
- 
One way of ensuring we always satisfy the constraint is to treat as a level set. As we travel along the level curve of , we need to find the point that maximises the value of . 
- 
As we travel along this level curve, one of three things can happen: - We could be travelling in a way such that we are cutting through the level sets of . That is, we are travelling perpendicularly to these level sets.
- We could be travelling in a way such that we are going along with some level set of . That is, we are travelling parallelly to these level sets.
- We could could be doing neither.
 
- 
If we are travelling by cutting through level sets, then we are travelling parallel to the gradient vector of (see assumption), i.e. we are parallel to . These means we are going towards the extrema, but we haven’t found it. - If we are at some point and are travelling along this way, then we know cannot be an extrema because we can just go to a level set that is ‘higher’ or ‘lower’
 
- 
If we travel parallel to the level set, then all the values are the same, so even if one of these points is an extrema, they all become extrema. 
- 
Then what we need to do is to first travel as parallel to the gradient vector of as possible (to ensure most increase) then at some point we should be parallel to a level curve (so we know there is no higher point). 
- 
That is, our level curve of should be tangential to a level set of . Since by definition, a tangent touches a curve at exactly one point. 
- 
We can then use the second assumption. If we make and parallel at some point , then that makes and tangential at that point . The equation for parallel vectors results in: 
We also add the restriction $g(\vec{a}) \neq \vec{0}$, because the zero vector is parallel to *every vector*, which doesn't really help us.
9. This also captures any local extrema of because if we set , we find these extrema.
Visualisation
Theorems
T1: Superposition of Lagrange Multipliers ^t1
Let be smooth functions. is the objective function. Let the constraint functions be . If we have, for and . Let be a point . If we have:
- and are linear independent.
- and are both non-zero vectors ().
Then:
That is, if the gradient vector at the point can be written as the linear combination of the gradient vectors at the point , then is an extremum etc. etc. This is known as the superposition of Lagrange multipliers and can be used to solve linear programs for multiple constraints.
Examples
E1: Paraboloid constrained to an ellipse
Find the maximal and minimal values of (i.e. the extrema) subject to the constraint where:
Solution defines a ellipse.
We start by finding the gradient vectors for both and :
Note that
We use the Lagrange multipliers equation, combined with the restriction that
Solving results in a system of equations:
E2: Volume-Area Optimisation
An open rectangular box needs to be constructed with a volume of . What dimensions should the box be to minimised the material used?
Solution surface area of the box. Also, an open rectangular box implies it is a cuboid without one face. Hence, we have volume and surface area given by:
Firstly, note minimising the material used is the same as minimising the
We are minimising subject to the constraint function . Let’s start with the gradient vectors:
We then use the Lagrange multipliers equation, combined with the equation :
Solving the system of equations:
- We assume all the dimensions to be positive,
- We can express using in the 4th equation: . We assume that that we must maximise the box such that it is symmetrical in the x and y axis, (since the only ‘modification’ is that the box has an open z-face). Hence (assuming )
- Combining equations (1) - (2):
- Again, by symmetry we can modify equation 3: . The solutions are or . But since , the only solution is
- Then, by symmetry, . And by equation (4):
- Finally, we can use equation (2):
- Hence
So our solution
#todo composition of lagrange multipliers
