Login
📚 Multivariable Calculus, Interactive Edition
Chapters ▾
⇩ Download ▾

4.3 Lagrange Multipliers

Most optimization in practice comes with a leash: maximize f, subject to g=c. The leash changes everything. A constrained maximum is almost never at a critical point of f itself — our specimen f(x,y)=xy has only a saddle, no maximum at all — yet on the constraint circle x2+y2=4 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.

A translucent red-and-blue saddle surface z = x*y with seventeen dark contour lines on the z = 0 plane — hyperbolas, plus a crossed pair of straight lines at level zero. A flat dark circle of radius 2 lies in that plane, and a thick red ribbon-like curve traces the value of x*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.Explore in 3D (opens in a new tab)
The translucent red-and-blue saddle z=xy, its seventeen dark level curves on the plane z=0 (hyperbolas, plus a crossed pair of lines at level 0), a flat dark circle of radius 2 in that same plane — the constraint x2+y2=4 — and a thick red ribbon that follows the circle while rising and falling with the surface: f evaluated along the constraint, the only part of the surface the problem is allowed to use. Two marker points at the constrained maxima hide in the object list.

Explore

  1. 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 dark circle.
  2. A crest is where f, walking along the constraint, stops increasing and starts decreasing — it stalls. What is the ribbon's slope, measured along the walk, at a stall?
  3. The ribbon's height over the circle is xy. Using symmetry — the product is largest where x and y are equal and share a sign — predict the exact coordinates of the two crests and the value of f there. Commit before revealing.
  4. Reveal the two hidden points with their eye toggles. They sit at the crests; zoom in and read their positions against the grid. Do they match your (±2,±2), f=2?
  5. Now the map view: orbit to look straight down and drag the contour plot's z-offset from 0 up to 2. The whole family of level curves rides up the saddle as one sheet. As it reaches crest height, the curve xy=2 meets the circle at exactly the two marked points — does it cross the circle there, or kiss it tangentially?
  6. Drag the z-offset back to about 1 and look at where xy=1 meets the circle: four honest crossings. Check against the ribbon — over those four points, is it at a crest, or still climbing? Say the connection out loud: crossing a level curve means the walk is still changing f. (The 17 levels put drawn curves exactly at the integer values 8,,8, 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 — f for the level curve, g for the constraint — so at a constrained extremum

f = λ g

for some scalar λ, the Lagrange multiplier, solved together with g=c. 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 f — 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.

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.