Lagrange Multipliers

Vajradevam
(April 27, 2025)

Turning a constrained problem into an unconstrained one

The basic idea behind the method of Lagrange multipliers is to convert a constrained optimization problem into a form where the usual derivative-based tests for maxima and minima can still be applied.

Suppose we want to maximize or minimize a function f(x) subject to one or more equality constraints:

g(x)=0 (1)

Instead of solving this directly, we define a new function—called the **Lagrangian**:

(x,λ)=f(x)+λ,g(x) (2)

where , is the inner product. In simpler cases, this reduces to a dot product:

(x,λ)=f(x)+λg(x) (3)

To find optimal points, we look for stationary points of (x,λ). That means we solve:

x =0 (4)
λ =0 (5)

Equation (5) is equivalent to enforcing the original constraint:

g(x)=0 (6)

while (4) ensures the gradients of f and g are aligned:

f(x)+λg(x)=0 (7)

This approach avoids needing to parameterize the constraint explicitly, and the solution to the original problem turns out to be a saddle point of the Lagrangian function. In more advanced settings, checking definiteness via the bordered Hessian can confirm the nature of the point.

This method also extends beyond equality constraints using the more general Karush–Kuhn–Tucker (KKT) conditions, which can handle inequalities like h(x)c.

Example

Let’s find the maximum and minimum values of:

f(x,y)=xy

subject to:

g(x,y)=x2+y21=0

This keeps us on the unit circle.

Setting up the Lagrangian and equations

We define the Lagrangian:

(x,y,λ)=xyλ(x2+y21) (8)

Take partial derivatives and set them to zero:

x =y2λx=0 (9)
y =x2λy=0 (10)
λ =(x2+y21)=0 (11)

Solving the system

From (9) and (10):

y=2λx,x=2λyx=4λ2x(14λ2)x=0

This gives two cases:

  • x=0y=±1

  • λ=±12x=±12,y=±12

Checking which ones are max or min

Evaluate f(x,y)=xy at each critical point:

f(0,±1) =0
f(12,12) =12
f(12,12) =12
f(12,12) =12
f(12,12) =12

Therefore: Maximum value: 12 Minimum value: 12