Lagrange multipliers — one and two constraints
WHY does this work? (Derivation from scratch)
WHAT we want: maximize/minimize where is forced to lie on the surface .
Step 1 — Think about moving along the constraint. Suppose is any smooth curve that lies inside the constraint surface, so for all . At a constrained extremum point , the value must have an ordinary extremum, so
Why this step? On the constraint surface we are no longer free — we can only travel along curves staying in the surface. A constrained max is just an ordinary max of the restricted function.
Step 2 — Apply the chain rule.
This holds for every tangent direction of the surface. So is orthogonal to all tangent directions — i.e. is normal to the constraint surface.
Step 3 — But is also normal to the surface. Differentiate : , so is normal too. Two vectors normal to the same surface (one-dim normal space) must be parallel:
Two constraints
Now the point must satisfy both and . Geometrically the feasible set is the intersection curve of two surfaces.
WHY two multipliers? Along that intersection curve, the allowed tangent direction must be perpendicular to both and . At an extremum , so has no component along — meaning lies in the plane spanned by and :
Worked Example 1 — One constraint (a classic)
Maximize subject to (point on unit circle).
, . Set :
- (why: first component)
- (why: second component)
Multiply: . If , then , . From with : . Plug into constraint: , .
Max value at . Why accept it: check gives , (the min).
Worked Example 2 — Distance / shadow-price meaning
Closest point on line to origin. Minimize , .
⟹ ⟹ . Constraint: , . . Check meaning: with , , so , and indeed . ✔ The multiplier equals the sensitivity.
Worked Example 3 — Two constraints
Maximize on the circle that is the intersection of plane ... wait, that's degenerate. Use: Minimize subject to (paraboloid) and (plane).
, , . :
From first two: ⟹ (if ). Constraints: and ⟹ ⟹ ⟹ . Why two roots: the curve dips down then up; one is min, one max of on the curve.
Recall Feynman: explain to a 12-year-old
Imagine you're walking on a fenced hilly field and you want the highest spot while staying on the fence path. You keep walking; as long as the ground still rises in your walking direction, keep going. You stop at the high point when the slope only goes sideways across the fence, not along your path. "Sideways to the path" is exactly " points across the fence" = parallel to the fence's normal . With two fences crossing, you can only stand where they cross, and you balance the two pulls — that's the two multipliers.
Flashcards
What condition does Lagrange's method impose at a constrained extremum (one constraint)?
Geometric meaning of ?
Why is normal to the surface ?
Interpretation of the multiplier ?
Condition with TWO constraints?
Why two multipliers for two constraints?
How many equations/unknowns for with two constraints?
A case where Lagrange can MISS an extremum?
Max of on ?
Connections
- Gradient and directional derivative — why gives steepest ascent.
- Tangent planes and normal vectors — as surface normal.
- Unconstrained optimization — critical points — the / no-constraint limit.
- KKT conditions — inequality-constraint generalization.
- Level sets and contours — tangency of level curves at the optimum.
- Dual problem and shadow prices — economic meaning of .
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Dekho, Lagrange multipliers ka idea bahut simple hai. Tumhe kisi function ko maximize ya minimize karna hai, lekin tum free nahi ho — ek constraint ke upar hi chalna allowed hai. Socho ek pahaadi field me fence ke raaste pe chal rahe ho aur sabse oonchi jagah dhundh rahe ho, par fence chhodna mana hai. Jab tak fence ke direction me zameen upar chadh rahi hai, chalte raho. Jahan ruk jaoge wahan ka slope sirf fence ke "across" rahega, fence ke "along" nahi. Matlab constraint surface ke perpendicular ho gaya — aur bhi perpendicular hota hai, to dono parallel: .
Yeh ko Lagrange multiplier bolte hain. Iska physical matlab bhi hai: , yaani agar constraint ko thoda dheela karo to optimal value kitna improve hoga — "shadow price". Bada matlab constraint mehenga pad raha hai. Solve karte time yaad rakho: gradient wali equations ke saath constraint equation ko bhi use karna zaroori hai, warna point fix nahi hoga.
Do constraints wale case me tum sirf un do surfaces ki intersection curve pe ho. Ab ko un dono normals aur ke combination ke barabar hona padega: . Reason simple hai — curve ke tangent direction me change nahi hona chahiye, isliye ka tangent ke along koi component nahi bachna chahiye, to woh aur ke plane me hi lie karega.
Common galti: log laga dete hain (woh unconstrained case ka rule hai), ya constraint equation bhool jaate hain, ya dono multipliers ki jagah ek hi laga dete hain. Inse bacho, har equation likho, count karo: me two constraints ka matlab 5 equations, 5 unknowns. Bas, mehnat solve karne me hai, concept clear hai!