Exercises — Lagrange multipliers — one and two constraints
Every method here rests on the parent result: See Lagrange multipliers — one and two constraints if any symbol below feels unfamiliar. Reminders: (read "grad f") is the vector of partial slopes — it points in the direction climbs fastest (Gradient and directional derivative). The constraint is a surface (a curve in 2D), and sticks out perpendicular to it (Tangent planes and normal vectors).
Level 1 — Recognition
Exercise 1.1
You are told: maximize on the circle . Write down (a) the constraint function , (b) the two gradients, (c) the vector equation Lagrange demands. Do not solve.
Recall Solution
WHAT we do: just translate words into the standard template. (a) Move everything to one side: , and the constraint is . (b) (constant — the slopes of a plane never change) and . (c) Lagrange's condition: That is 3 equations (, , and the constraint) in 3 unknowns . Recognizing this count is the whole point of L1.
Exercise 1.2
True or false, with one sentence each: (a) At a constrained maximum we always need . (b) points along the constraint surface. (c) The number tells you how the optimal value responds to relaxing the constraint.
Recall Solution
(a) False. On a constraint, is usually nonzero; it must point off the surface, parallel to . Setting is the unconstrained rule (Unconstrained optimization — critical points). (b) False. points perpendicular (normal) to the surface, not along it. (c) True. is the shadow price (Dual problem and shadow prices).
Level 2 — Application
Exercise 2.1
Finish Exercise 1.1: find the maximum of on .
Recall Solution
From and we solve for the coordinates in terms of : WHY divide: the two component equations already give ; we just need one more relation () which the constraint supplies. Substitute into : Take : . Then . The other sign gives , (the min). Max at . Sanity: is the direction of itself, scaled onto the radius-5 circle — the plane climbs fastest exactly along , so the highest point is where the radius points the same way. ✔
Exercise 2.2
Find the closest point on the plane to the origin, and the minimum squared distance.
Recall Solution
Minimize (squared distance — easier than the square root, same minimizer) subject to . Componentwise: ; ; . Substitute into the plane: . So , and . Minimum squared distance (distance ). Why it's a min not a max: on a flat plane, distance to origin has no upper bound but a single lowest point — the foot of the perpendicular.
Level 3 — Analysis
Exercise 3.1
Maximize and minimize on the circle . Find all critical points and classify each. (Watch the degenerate cases where a component is zero.)

Recall Solution
, . Condition : Case A — : the first equation gives . Then the second becomes . Constraint: , so . Points , . Case B — : the second gives . Then the first becomes . Constraint: , . Points , . Case C — and : impossible, that point is not on the circle. So no degenerate solution is lost. Classify: minimum at (red dots in figure), maximum at (mint dots). These sit exactly where the ellipse-shaped level curves of kiss the circle (Level sets and contours) — tangency is the geometric face of . Why splitting on the sign of matters: if you had blindly cancelled from you'd have lost the branch (which requires ). Handling each factor being zero is the analysis skill of L3.
Exercise 3.2
For (line moving with ), the closest point to the origin has (from parent Example 2). Verify directly that and interpret the sign.
Recall Solution
From the parent, at the optimum and . Differentiate the optimal value: . Indeed . ✔ Interpretation: as grows the line moves farther from the origin, so the minimum squared distance rises — a positive means "relaxing the constraint outward makes larger." Big → steep sensitivity. This is the shadow-price statement made concrete.
Level 4 — Synthesis
Exercise 4.1
Minimize on the intersection of the paraboloid and plane (parent Example 3). Find both critical -values, say which is the min and which is the max of on the curve, and give at the minimum.

Recall Solution
, , . Condition : Subtract the first two: . Case : . (Case forces from eqn 1 yet from eqn 3 — contradiction, so discard.) Constraints with : and , hence , i.e. Numerically or . Then :
- — the minimum of .
- — the maximum of . Why two answers: the intersection is a closed loop that dips low then rises high (see figure); has one lowest and one highest point on it. Both satisfy Lagrange because both are places sits in . Multipliers at the min (): from and , With , , so and — compute: .
Exercise 4.2
Maximize subject to with . (Interpret the answer.)
Recall Solution
. . So . From : ; since , . From : ; since , . Hence . Constraint: . So , . Interpretation: the product of positive numbers with fixed sum is largest when they're equal — this is the AM–GM inequality falling out of Lagrange. Maximum .
Level 5 — Mastery
Exercise 5.1
Prove that for a symmetric matrix, maximizing the quadratic form on the unit circle leads to an eigenvalue problem, and that the maximum value equals the largest eigenvalue.
Recall Solution
Let so where . Then and, with , . Lagrange demands , i.e. This is exactly the eigenvalue equation: the constrained critical directions are the eigenvectors of , and is the eigenvalue. Value at such a point: . So on the unit circle equals the eigenvalue. The maximum of is therefore the largest eigenvalue , achieved at its eigenvector; the minimum is . ∎ Why this is deep: the shadow-price meaning ( value of ) becomes literal, and Lagrange has just derived the variational characterization of eigenvalues.
Exercise 5.2
Test the mastery of the singular-point caveat. Consider minimizing subject to (a cusped curve). Does Lagrange's equation find the extremum at the cusp ? Explain.
Recall Solution
, . At : . Lagrange asks for , i.e. — impossible for any . So the algebra produces no solution at the cusp, even though the curve genuinely has its leftmost point (minimum of ) there at . Conclusion: Lagrange misses this extremum because its core assumption — , so the surface has a well-defined normal — fails at a singular point. Fix in practice: always separately inspect points where and any boundaries, as KKT conditions and the parent Mistake C warn.
Connections
- Gradient and directional derivative — every here is the steepest-ascent vector.
- Tangent planes and normal vectors — why is the surface normal (and why breaks L5.2).
- Level sets and contours — the "kissing" tangency in Exercise 3.1.
- Unconstrained optimization — critical points — the limit and the L1 trap.
- Dual problem and shadow prices — the reading in Exercise 3.2.
- KKT conditions — extends the caveat of Exercise 5.2 to inequalities.