4.3 Lagrange Multipliers
Most optimization in practice comes with a leash: maximize , subject to . The leash changes everything. A constrained maximum is almost never at a critical point of itself — our specimen has only a saddle, no maximum at all — yet on the constraint circle the problem has clean, finite answers. The question is where to look, and the figure answers it twice over: once on the map, once along a ribbon.
Explore in 3D (opens in a new tab)A translucent red-and-blue saddle surface, z equals x times y, with seventeen sky-blue contour lines on the plane z equals 0: hyperbolas, plus a crossed pair of straight lines at level zero. A flat amber circle of radius 2 lies in that plane, and a red curve traces the value of x times y above and below each point of the circle, rising to two crests of height 2 and dipping to two troughs of depth 2. Two red marker points at the crests are hidden in this view; they can be shown by opening the figure in XYZ 3D.
Explore
- Orbit to a low side view and follow the red ribbon once around. How many crests and how many troughs does it have? Note roughly where the crests sit over the amber circle.
- A crest is where , walking along the constraint, stops increasing and starts decreasing — it stalls. What is the ribbon's slope, measured along the walk, at a stall?
- The ribbon's height over the circle is . Using symmetry — the product is largest where and are equal and share a sign — predict the exact coordinates of the two crests and the value of there. Commit before revealing.
- Press Open in XYZ 3D ↗ under the figure, and in the editor's object list turn on the two hidden Point rows with their eye toggles. They sit at the crests; zoom in and read their positions against the grid. Do they match your , ?
- Now the map view, still in the editor: step the Contours row's z offset box (steps of ) from up to . The whole family of level curves rides up the saddle as one flat sheet. At crest height, the raised curve meets the red ribbon at exactly the two marked points — does it cross the ribbon there, or kiss it tangentially? Then set the z offset back to and look straight down: on the floor, the same curve meets the amber circle directly below the markers, in the same way.
- Set the z offset to : the raised curve meets the ribbon at four points, crossing it each time. Over those four points, is the ribbon at a crest, or still rising or falling? Back at z offset , the same curve makes four honest crossings of the amber circle. Say the connection out loud: crossing a level curve means the walk is still changing . (The 17 levels put drawn curves exactly at the integer values , so both curves in this step and the last are actually drawn; other level counts can hide them.)
From kiss to equations
At a tangency the constraint curve and the level curve share a tangent line, so their normals point along one line. Those normals are gradients — for the level curve, for the constraint — so at a constrained extremum
for some scalar , the Lagrange multiplier, solved together with . The logic runs through step 6: where the level curve crosses the constraint, level curves of larger and smaller value lie on either side, so sliding along the constraint still changes — no extremum there. Only a kiss can stop the walk, and the ribbon says the same thing in its own language: kisses on the map are stalls on the ribbon.
The pivot of the example: eliminating and from the Lagrange equations leaves (written here with for ), whose two roots hand back the lines and and, with the constraint, all four kiss points.
An original work of XYZ Homework, built around interactive XYZ 3D figures. Aligned to OpenStax Calculus Volume 3 (Strang & Herman), © OpenStax (Rice University), licensed CC BY-NC-SA 4.0; no OpenStax content is reproduced, and this work is not affiliated with or endorsed by OpenStax or Rice University. License: CC-BY-NC-SA-4.0.