LightMySky

Lagrange Multipliers

Optimise subject to a constraint by setting the gradient of the objective parallel to the gradient of the constraint, which is the moment the level curves touch.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Set up the multiplier equations for a constrained problem
  • Explain the tangency condition in terms of level curves
  • Compare the multiplier method with substituting the constraint directly

1 · Read

Optimising with a constraint means staying on a curve while pushing the objective as far as possible. The best feasible point is where a level curve of f just touches the constraint instead of crossing it. Touching curves share a tangent, so grad f = lambda grad g, solved together with the constraint itself.

Try it together

A rectangle with perimeter 20 obeys x + y = 10. The multiplier equations give x = y, so the winner is a 5 by 5 square with area 25. Likewise, x + y on x squared + y squared = 2 peaks at x = y = 1 with value 2.

Lambda is not a spare part; it is the exchange rate. It says how much the optimum improves per unit of relaxed constraint. When substitution is easy both routes agree, but on a circle isolating a variable creates square roots that are painful to differentiate.

Good to know

The method finds suspects; the comparison convicts. Evaluate f at every candidate, then keep the largest or smallest, and check boundary behaviour plus any nonsmooth points. For x squared + y squared with x + y = 4, symmetry picks (2, 2) and the minimum 8.

Set the gradients parallel, add the constraint, solve, and compare candidates before declaring a winner.

2 · Watch

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Lagrange Multipliers · Mathematics, ages 19 to 20 · LightMySky