Lagrange Multipliers

Move along the constraint circle and watch the geometry: constrained extrema occur exactly where the objective gradient and constraint gradient are parallel.

grad f = lambda grad g,   g(x,y)=0

Mathematical Description

Problem Maximize or minimize \[ f(x,y)=0.1x^2+0.1xy^2 \] subject to the circle \[ g(x,y)=x^2+y^2-16=0. \]
Constraint Geometry Parametrize the allowed motion by \[ c(t)=(4\cos t,4\sin t) \] with tangent vector \[ c'(t)=(-4\sin t,4\cos t). \] The constraint gradient \[ \nabla g=(2x,2y) \] is perpendicular to this tangent direction.
Lagrange Condition Along the circle, \(F(t)=f(c(t))\). At a constrained extremum, \[ F'(t)=\nabla f(c(t))\cdot c'(t)=0. \] Since \(\nabla g\cdot c'(t)=0\) too, both gradients are normal to the same tangent line: \[ \nabla f=\lambda \nabla g. \]

Constraint Circle And Gradients

grad f grad g tangent f contours g contours Lagrange point

Surface And One-Variable Reduction

F(t)=f(4 cos t, 4 sin t)
drag rotate · wheel zoom