So far the variables of a min/max problem were independent. Often they are not: they are tied by a relation , the constraint, and is to be minimised or maximised only among the points that satisfy it (transcript, p. 1; notes, p. 2). If the constraint is simple, solve it for one variable and substitute, and the problem is an ordinary one; when it is too complicated to solve, a new method is needed: Lagrange multipliers (p. 1). (Physics example: pressure, volume and temperature of a gas are tied by , and it can be handy to keep all three as constrained variables, p. 1.) The critical points of itself are no help, since they usually do not satisfy the constraint (p. 2).
An example: closest to the origin#
Find the point of the hyperbola closest to the origin (transcript, p. 2; notes, p. 2). Minimising the distance is the same as minimising its square, so (p. 2):
In words
minimise f(x, y) equals x squared plus y squared subject to g(x, y) equals x y equals 3
On the contour plot of (circles) with the hyperbola on top: a large circle meets the hyperbola in four points; shrinking it, there is a smallest circle that still meets it, and that is the minimum. There the circle is tangent to the hyperbola (pp. 2–3; notes, p. 2). So at the minimum the level curve of is tangent to the level curve : they share a tangent line, so their normal vectors, the gradients, are parallel (p. 3; notes, p. 2).
The Lagrange equations#
Parallel vectors are proportional: there is a number , the multiplier, with (transcript, p. 4; notes, p. 2):
In words
del f equals lambda del g
( may be positive or negative, depending on whether the gradients point the same way, p. 5. It is called a multiplier because it is what is multiplied by to give , p. 9.) This replaces a min/max problem in two constrained variables by a system in three unknowns, , , . Two equations come from the components of the gradients, and the constraint is the third (p. 4; notes, p. 2):
In words
f sub x equals lambda g sub x, f sub y equals lambda g sub y, g(x, y) equals c
With a third variable, add (p. 4). For the hyperbola: , , (p. 5; notes, p. 2).
Solving the equations#
There is no general method: sometimes it is easy, sometimes it needs a computer (transcript, p. 7; notes, p. 3). Here the first two equations form a linear system (p. 7; notes, p. 3):
In words
2 minus lambda; lambda minus 2 x; y equals 0; 0
The obvious solution fails , so we need another solution, which exists only when the determinant is zero: , so (p. 7). For : and , giving and . For : and , no solution (p. 8; notes, p. 3). At both points , and on the picture is indeed twice (pp. 6, 8).
Why the method works#
At a constrained minimum or maximum, moving along the level set changes only in one way (only up, or only down), so to first order it does not change. The derivatives are zero, but only in the allowed directions, those tangent to (transcript, p. 9; notes, p. 3). For every unit vector tangent to the level set (pp. 9–10; notes, p. 3):
In words
( d f over d s ) sub u hat equals del f times u hat equals 0
So is perpendicular to every vector tangent to the level set: it is normal to the level set of . So is . Hence the two are parallel, which is the same as the level sets of and being tangent (p. 10; notes, p. 3).
Minimum or maximum?#
Warning: the method does not say whether a solution is a minimum or a maximum, or (in three variables) even a saddle (transcript, pp. 6, 11; notes, p. 3). The second derivative test does not apply, because only the directions along the constraint count (p. 11). What is left is to compare the values of at all solutions, or to argue geometrically (p. 11; notes, p. 3). On the hyperbola the two solutions tie for the minimum, and there is no maximum, since points of the hyperbola go arbitrarily far from the origin (p. 11). (Here one could also substitute and minimise directly, but that is not always possible, p. 6.)
An advanced example: the cheapest pyramid#
Build a pyramid on a given triangular base with a given volume, using as little surface area as possible (Auroux's story: a gold-covered building on a triangular plot) (transcript, pp. 11–12; notes, p. 3). Since the volume is , the height is fixed: only the position of the top vertex is free (p. 12; notes, p. 3). In coordinates the face areas are lengths of cross products, and minimising them that way is hopelessly messy (p. 13; notes, p. 3).
Better variables, adapted to the geometry. Let be the side lengths of the base and the distances from the point below the top vertex to the three sides. Each side face is a triangle with base and, by Pythagoras, height (pp. 13–14; notes, p. 3). Cutting the base into three triangles with heights gives the constraint (p. 14; notes, p. 3):
In words
f equals one half a one the square root of u one squared plus h squared, end of root, plus one half a two the square root of u two squared plus h squared, end of root, plus one half a three the square root of u three squared plus h squared, end of root, g equals one half a one u one plus one half a two u two plus one half a three u three equals capital A base
The Lagrange equations simplify, the factors cancelling, to (pp. 14–15; notes, p. 3):
In words
u one over the square root of u one squared plus h squared, end of root, equals u two over the square root of u two squared plus h squared, end of root, equals u three over the square root of u three squared plus h squared, end of root, equals lambda which gives u one equals u two equals u three
The point below the top is equally far from all three sides: the top goes above the incenter of the base triangle (p. 15; notes, p. 3).
Closest point on a plane, and a maximum on a circle
(a) Find the point of the plane closest to the origin. (b) Find the largest and smallest values of on the circle .
(a) Three variables
Minimise with : gives , , . The constraint gives , so and the point is , at distance . (It lies along the normal vector , as it should.)
(b) Two solutions, two values
gives and , so ; would force , off the circle, so . With : , , points and with . With : , points and with .
(b) Compare values
The method alone does not say which is which; comparing values, the maximum of on the circle is 4 and the minimum is .
Summary#
- To minimise or maximise subject to : solve together with (three equations in , , for two variables).
- At a constrained extremum the level sets of and are tangent, because for every direction along .
- Example: on , the points closest to the origin are (same signs), with and .
- The method does not tell minimum from maximum, and the second derivative test does not apply: compare values or argue geometrically.
- The least-area pyramid on a given base with given volume has its top above the incenter.