Skip to lesson

Math · Multivariable Calculus

Chapter 6: Optimization

Lagrange Multipliers

Optimising when you are not free to go anywhere.

Lesson
2
Time
About 25 minutes
0 of 12 done

Step 1: Let's Learn

Read it, or press Listen and follow the words.

Often you cannot roam the whole plane. A budget, a fence length or a fixed perimeter confines you to one curve.

The key picture

Walking along the constraint curve, you cross contours of f. As long as you are still crossing them, you can do better.

The best point

The best value happens where the constraint curve just touches a contour rather than crossing it. There the two curves are tangent.

What tangency means

Tangent curves have parallel normals, and the gradients are the normals. So ∇f = λ∇g at the optimum.

The multiplier

λ is the unknown ratio between the two gradients. It also measures how much the optimum would improve if the constraint were loosened.

What you solve

Two gradient equations plus the constraint itself gives three equations in x, y and λ.

Optimising under a constraint

When you cannot move freely, the optimum occurs where the level curve of the objective is tangent to the constraint curve. At that point the two gradients are parallel.

The multiplier condition

∇f = λ∇g together with the constraint gives a system to solve. The λ is the multiplier, and it is introduced precisely to express the parallelism as an equation.

The multiplier has a meaning

λ measures how much the optimal value would improve if the constraint were relaxed slightly. In economics it is the shadow price, which makes it a quantity of genuine interest rather than a device.

It produces candidates, not answers

The method finds points satisfying a necessary condition. Which is the maximum and which the minimum requires comparing the values, and the endpoints of the constraint must be examined too.

Step 2: Try It Yourself

Tap and try it out.

These parallel contours are a linear objective. A constraint curve laid across them is optimised where it stops crossing and merely touches.

Evenly spaced parallel lines mean a constant slope in every direction.

Step 3: Watch an Example

One step at a time.

Watch Silas Maximise an Area

Silas maximises the area xy of a rectangle whose perimeter 2x + 2y is fixed at 40.

  1. Step 1

    He writes the objective as f = xy and the constraint as g = 2x + 2y = 40.

Step 4: Your Turn

Practice makes it stick.

The Fence

Problem 1 of 2

A rectangle with perimeter 36 metres has the largest area when it is a square. What is that area, in square metres?

The Equations

Problem 2 of 2

How many equations does a two-variable Lagrange problem produce, counting the constraint?

Optimise Under Constraint

1 of 8

A rectangle with perimeter 20 has maximum area. What is that area?

2 of 8

At the optimum, are ∇f and ∇g parallel? 1 yes, 0 no.

3 of 8

∇f = ⟨6, 9⟩ and ∇g = ⟨2, 3⟩ at the optimum. What is λ?

4 of 8

A rectangle with perimeter 24 has maximum area. What is the side length?

5 of 8

How many unknowns are there in a two-variable Lagrange system?

6 of 8

Maximise x + y subject to x + y = 12. What is the maximum value?

7 of 8

Order the steps of a Lagrange multiplier solution.

  1. 1Set the gradient of f equal to lambda times the gradient of g
  2. 2Solve the system together with the constraint
  3. 3Evaluate f at each solution and compare
  4. 4Identify the objective f and the constraint g

8 of 8

A square of side 7 from a perimeter constraint. What is its area?

Step 5: Quick Check

Show what you know.

Question 1 of 2

A rectangle with perimeter 28 has maximum area. What is that area?

Question 2 of 2

What is true at a constrained optimum?

What You Learned

  • A constraint confines you to a curve rather than the whole plane.
  • The optimum is where the constraint curve touches a contour instead of crossing it.
  • That tangency means ∇f = λ∇g, which with the constraint gives three equations.