Constrained extrema
Lagrange multipliers and distance optimisation on curves and surfaces.
This page optimises a function on a curve given by an equation , without parameterising the curve. The feasible points form a level curve of , so the gradient-normal theorem makes normal to it. At a constrained extremum, must point along the same normal.
The resulting Lagrange multiplier method replaces the boundary parameterisation whenever is the natural description of a boundary. The page ends with distance problems.
Level set
For , with and , the level set of at level is
Gradient normal to a level set
Let be on an open neighbourhood of and let
If and , then is normal to at .
The multiplier condition
Constrained extremum
Let be an objective function and let
be its feasible set. A constrained maximum or minimum of is a maximum or minimum of when the comparison is restricted to points in .
The constraint limits the directions in which we may move. A point can fail to be an unconstrained stationary point and still be a constrained extremum, because the directions in which would increase or decrease are not feasible.
Lagrange multipliers
Suppose is a nonempty closed and bounded curve and and have continuous first partial derivatives on an open set containing . Then attains a maximum and a minimum on . At each constrained extremum where
there is a scalar such that
together with
The equation says that the gradients are parallel, not that they have equal length: records a scale and possibly a reversal of direction.
The regularity condition is essential. A feasible point where is a singular constraint point, where the multiplier condition is not guaranteed, so it must be checked separately along with any corners or endpoints introduced by an inequality constraint. Compactness and continuity still guarantee that the extrema exist.
At a regular point of , at least one of is nonzero, so the constraint is locally a smooth curve. A tangent vector to that curve satisfies
because is constant along the constraint. At a constrained extremum, the first-order change of must also vanish for every feasible tangent vector:
In the plane, both gradients are therefore normal to the same tangent line. Since , the two normals are parallel, so for some scalar . The existence of maximum and minimum values follows by applying the extreme-value theorem to the closed and bounded constraint curve.
Optimise subject to one equality constraint
To optimise subject to :
- check where on the constraint and retain any such singular feasible points for separate analysis;
- compute and ;
- solve
- evaluate at every solution;
- compare the values to identify the constrained maximum and minimum.
The system has three unknowns , and in the two-variable case. Symmetry and factorisation often reduce the algebra. Solving the multiplier equations produces candidates; it does not replace checking singular points or comparing objective values.
Re-solving the disk problem with multipliers
Optimise
subject to
The gradients are
The multiplier equations are
After dividing the first two equations by ,
The unit-circle constraint rules out , so the coefficient matrix must have determinant zero:
Thus or .
If , then . The constraint gives , so the two same-sign points
give .
If , then . The two opposite-sign points
give . This reproduces the boundary part of the closed-disk example, found there by parameterisation.
Distance optimisation
Minimise a distance through its square
For a fixed point , minimise the squared distance
instead of the distance . Since the square-root function is increasing on non-negative values, the points that minimise or maximise the two objectives are the same.
The squared expression avoids a square root and usually gives a polynomial objective. If the constraint has a visible normal direction, the shortest segment can sometimes be found geometrically before writing the multiplier system.
The closest point on a plane
Find the point on
closest to
The plane has normal vector
The shortest segment from to the plane is perpendicular to the plane, so the desired point has the form
Substituting into the plane equation gives
so and . Therefore
This nearest point is the orthogonal projection of onto the plane. The same point results from minimising
subject to , but the normal direction makes the geometric solution shorter.
Closest and furthest points on a quartic curve
Find the points on
that are closest to and furthest from the origin. Minimise and maximise
Both expressions depend only on and . Set
The problem becomes optimising subject to
At an interior constrained extremum in the first quadrant,
The two components on the right must be equal, so
Substituting into the constraint gives
and hence .
The boundary cases in the first quadrant are or . The constraint then gives the other variable as , so . The feasible set in is closed and bounded and these interior and boundary cases exhaust its extrema. Restoring the signs independently, the closest points are
with distance , while the furthest points are
with distance .
The closest point on a parabola
Let
and find the point on closest to . A point on the parabola is
The squared distance is
Differentiate:
The stationary values satisfy
The second possibility exists only when . Since as , compare the stationary candidates:
whereas at ,
Their difference is
Therefore, if , the closest point is
If , the two closest points are
At the two non-zero candidates merge with the origin.
[challenge]
The economic applications page uses the same multiplier geometry to allocate a fixed budget between inputs: the budget line is the constraint and the production gradient replaces .