TheoremComplete

Method of Lagrange Multipliers

The method of Lagrange multipliers provides an elegant and systematic approach to constrained optimization, reducing the problem of extremizing a function subject to constraints to a system of algebraic equations.


The Theorem

Theorem8.7Lagrange Multipliers

Let f,g1,,gk:RnRf, g_1, \ldots, g_k : \mathbb{R}^n \to \mathbb{R} be C1C^1 functions with k<nk < n. Suppose a\mathbf{a} is a local extremum of ff subject to the constraints g1(x)==gk(x)=0g_1(\mathbf{x}) = \cdots = g_k(\mathbf{x}) = 0, and that the gradients g1(a),,gk(a)\nabla g_1(\mathbf{a}), \ldots, \nabla g_k(\mathbf{a}) are linearly independent. Then there exist scalars λ1,,λk\lambda_1, \ldots, \lambda_k (called Lagrange multipliers) such that f(a)=λ1g1(a)++λkgk(a)\nabla f(\mathbf{a}) = \lambda_1 \nabla g_1(\mathbf{a}) + \cdots + \lambda_k \nabla g_k(\mathbf{a})

The geometric interpretation is clear: at a constrained extremum, the gradient of ff is a linear combination of the constraint gradients. Equivalently, f\nabla f is perpendicular to the constraint surface at a\mathbf{a}, meaning there is no direction along the constraint surface in which ff can increase.


Applications

ExampleOptimization on a sphere

Maximize f(x,y,z)=x+2y+3zf(x, y, z) = x + 2y + 3z subject to g(x,y,z)=x2+y2+z21=0g(x, y, z) = x^2 + y^2 + z^2 - 1 = 0.

The Lagrange condition f=λg\nabla f = \lambda \nabla g gives: 1=2λx,2=2λy,3=2λz1 = 2\lambda x, \quad 2 = 2\lambda y, \quad 3 = 2\lambda z So x=12λx = \frac{1}{2\lambda}, y=1λy = \frac{1}{\lambda}, z=32λz = \frac{3}{2\lambda}. Substituting into the constraint: 14λ2+1λ2+94λ2=1    144λ2=1    λ=±142\frac{1}{4\lambda^2} + \frac{1}{\lambda^2} + \frac{9}{4\lambda^2} = 1 \implies \frac{14}{4\lambda^2} = 1 \implies \lambda = \pm\frac{\sqrt{14}}{2} Maximum value: f=114(1+2+91)=14f = \frac{1}{\sqrt{14}}(1 + 2 + \frac{9}{1}) = \sqrt{14} at (114,214,314)\left(\frac{1}{\sqrt{14}}, \frac{2}{\sqrt{14}}, \frac{3}{\sqrt{14}}\right).

ExampleInequality constraint: AM-GM

To prove the AM-GM inequality, minimize f(x1,,xn)=x1++xnnf(x_1, \ldots, x_n) = \frac{x_1 + \cdots + x_n}{n} subject to g=x1x2xncn=0g = x_1 x_2 \cdots x_n - c^n = 0 for xi>0x_i > 0. The Lagrange condition gives 1n=λjixj\frac{1}{n} = \lambda \prod_{j \neq i} x_j for each ii, implying all xix_i are equal: x1==xn=cx_1 = \cdots = x_n = c. This establishes x1++xnn(x1xn)1/n\frac{x_1 + \cdots + x_n}{n} \geq (x_1 \cdots x_n)^{1/n}.


RemarkThe multiplier has economic meaning

The Lagrange multiplier λ\lambda has the interpretation λ=dfdc\lambda = \frac{df^*}{dc} where ff^* is the optimal value and cc is the constraint level. In economics, if ff represents utility and gg a budget constraint, then λ\lambda measures the marginal utility of income (the "shadow price" of relaxing the constraint by one unit).