4.4.15 · D1Multivariable Calculus

Foundations — Lagrange multipliers — one and two constraints

1,982 words9 min readBack to topic

This page assumes nothing. Before you can read , you must know what each squiggle is and what it looks like. We build them one at a time, each on top of the last.


1. Points, functions, and "a landscape"

Picture: a dot on graph paper (2D) or floating in a room (3D). Nothing more.

Picture: think of as the altitude of a hill above the floor position . Every floor spot gets one height. That is the "landscape" we keep referring to.

Why the topic needs it: the whole game is "make as big or small as possible." Without a value-assigning function there is nothing to optimize.

Figure — Lagrange multipliers — one and two constraints

2. Level sets — reading a hill without 3D

Standing inside a 3D hill is hard to draw. So we flatten it.

Picture: rings around a hilltop. Each ring is "all the places at exactly 500 m," the next ring "exactly 600 m," and so on. Crowded rings = steep; spread-out rings = gentle.

Why the topic needs it: the parent page's climax is that at the optimum the constraint path is tangent to a level curve of . You cannot see that without knowing what a level curve is. See Level sets and contours.

Figure — Lagrange multipliers — one and two constraints

3. The gradient — the arrow of steepest climb

Here is the star symbol.

Why this tool and not a plain derivative? Plain derivatives are for one input. Our landscape has several inputs ; the partial derivative lets us ask "rate of change in this one direction" separately, which we then bundle together.

Two facts you must feel, not just read:

  1. points in the direction of steepest ascent — straight uphill. Its length says how steep.
  2. is perpendicular to the level curve through that point. (Uphill is 90° across the rings, never along them.)

Why the topic needs it: is literally "which way does increase fastest and how fast." Optimization is about killing that increase in the allowed directions. Full detail lives in Gradient and directional derivative.

Figure — Lagrange multipliers — one and two constraints

4. Constraints — the fence you must stay on

Picture: a fence drawn on the floor of the hill. You may walk only on the fence. with means "stay on the circle of radius 1."

Why the topic needs it: "constrained optimization" = best height on the fence, not the best height anywhere. The fence is the whole reason ordinary calculus (find where ) is not enough.


5. Tangent and normal — "along the path" vs "across the path"

To say " stops rising along the path," we need two directions cleanly separated.

Picture: stand on the fence. "Forward along the fence" = tangent . "Step off sideways over the fence" = normal . Details: Tangent planes and normal vectors.

Figure — Lagrange multipliers — one and two constraints

Why the topic needs it: the entire derivation is "at the best point, has no tangent part — it lies fully along the normal ." That sentence is meaningless until tangent and normal are pinned down.


6. The dot product — measuring "along" precisely

Why this tool and not another? We keep asking "does have any component along the path direction ?" The dot product is precisely "how much of points along ." Setting it to zero says "none." That's why the parent's Step 2 is .


7. The chain rule — how height changes as you walk

Why the topic needs it: this is the bridge. " stops changing along the path" is ; the chain rule turns that into , which the dot product reads as " every tangent." That is how we conclude must be normal.


8. The multiplier — a single knob for "how parallel"

Picture: and are two arrows planted at the optimum, lying on the same line. is "how many 's make one " — the ratio of their lengths (with a sign if they point opposite ways).

  • : and point the same way.
  • : they point opposite ways (still the same line).
  • : — the constraint isn't doing any work; it's an unconstrained critical point. See Unconstrained optimization — critical points.

Why the topic needs it: it converts the geometric statement "parallel" into a solvable equation. And, as Dual problem and shadow prices shows, measures how much the best value improves when you nudge the fence.


9. Two constraints — why a second multiplier appears

With two fences and , you can only stand where they cross: the intersection curve. Along that single curve there is one tangent , but two normals and span the whole "sideways" plane. For to have no along-curve part, it must lie in that plane — a blend of both normals: The second scalar is the second multiplier — one knob per fence. This connects forward to inequality versions in KKT conditions.


Prerequisite map

Point x = list of coordinates

Function f gives a height

Level sets show the hill flat

Partial derivative one axis slope

Gradient grad f steepest climb arrow

Constraint g = 0 the fence

Tangent along and Normal across

Dot product measures along

Chain rule d dt f = grad f dot r prime

Parallel arrows give lambda

Two fences add mu

Lagrange multipliers


Equipment checklist

Test yourself — you should be able to answer each before reading the parent derivation.

What does the bold stand for?
A whole point, i.e. the list of coordinates or at once.
What is pictured as?
The height of a hill above the floor position .
What is a level set / contour of ?
All points sharing one value — a ring on the topographic map.
What does the partial derivative measure?
How fast changes when you nudge only and freeze the others.
What is , and what two facts must you feel about it?
The stacked partials; it points steepest uphill and is perpendicular to the level curve.
What does describe?
The fence/constraint surface — the only points you're allowed to be on.
Difference between a tangent and a normal on the fence?
Tangent runs along the path (); normal runs straight across it ().
When is the dot product zero?
Exactly when and are perpendicular.
State the chain rule for height along a path.
.
What does say geometrically?
The two arrows are parallel; is how many 's equal one .
What do , , mean?
Same direction, opposite direction, and unconstrained critical point ().
Why does a second constraint need a second multiplier ?
Two fences give two normals spanning a plane; must be a blend .