Skip to content

Method of Lagrange for Inequality-Constrained Maximization

Theorem

Let A⊆RnA\subseteq\mathbb{R}^n be open, and let f,g1,…,gk ⁣:A→Rf,g_1,\ldots,g_k\colon A\to\mathbb{R} be continuously differentiable. Consider

max⁡x∈Af(x)subject togi(x)≤bi, i=1,…,k.\begin{aligned} &\max_{\boldsymbol{x}\in A} f(\boldsymbol{x})\\ &\text{subject to}\quad g_i(\boldsymbol{x})\le b_i,\ i=1,\ldots,k. \end{aligned}

The course convention writes bi−gi(x)≥0b_i-g_i(\boldsymbol{x})\ge0 and defines

L(x,λ)=f(x)+∑i=1kλi(bi−gi(x)).L(\boldsymbol{x},\boldsymbol{\lambda})=f(\boldsymbol{x})+\sum_{i=1}^k\lambda_i(b_i-g_i(\boldsymbol{x})).

If x∗\boldsymbol{x}^\ast is a local constrained maximizer, then either nondegenerate constraint qualification (NDCQ) fails or there exists λ∗\boldsymbol{\lambda}^\ast such that

∇xL(x∗,λ∗)=0,λi∗(gi(x∗)−bi)=0,λi∗≥0,gi(x∗)≤bi.\boldsymbol{\nabla}_xL(\boldsymbol{x}^\ast,\boldsymbol{\lambda}^\ast)=0,\qquad \lambda_i^\ast(g_i(\boldsymbol{x}^\ast)-b_i)=0,\qquad \lambda_i^\ast\ge0,\qquad g_i(\boldsymbol{x}^\ast)\le b_i.

The condition λi∗(gi(x∗)−bi)=0\lambda_i^\ast(g_i(\boldsymbol{x}^\ast)-b_i)=0 is complementary slackness.


Interpretation

Inequality constraints are directional, so multiplier signs and slackness matter. At a maximizer each constraint is either slack, and plays no role nearby, or binding, and acts as a one-sided equality. The sign condition λi≥0\lambda_i\ge0 and complementary slackness handle both cases.

Feasible triangle x1 + x2 at most 3.8, with the unconstrained maximum of f outside it. At x star on the boundary the gradients of f and g are parallel and point outwards.

The unconstrained maximum of ff, the centre of the grey level circles, lies outside the shaded feasible side of x1+x2≤3.8x_1+x_2\le3.8, so the constrained maximum x∗\boldsymbol{x}^\ast lies on the line. There the gradient ∇f(x∗)\boldsymbol{\nabla} f(\boldsymbol{x}^\ast) and ∇g=(1,1)\boldsymbol{\nabla} g=(1,1) point the same way, outwards towards the infeasible peak, so ∇f(x∗)=λ∇g(x∗)\boldsymbol{\nabla} f(\boldsymbol{x}^\ast)=\lambda\boldsymbol{\nabla} g(\boldsymbol{x}^\ast) with λ>0\lambda>0: ff could only increase outside the feasible set.

Drag the peak of ff: if it is feasible the constraint is slack and λ=0\lambda=0; otherwise the optimum sits on the line and ∇f=λ∇g\boldsymbol{\nabla} f=\lambda\boldsymbol{\nabla} g with λ>0\lambda>0.

The sign condition encodes this direction. If ∇f(x∗)\boldsymbol{\nabla} f(\boldsymbol{x}^\ast) were a negative multiple of ∇gi(x∗)\boldsymbol{\nabla} g_i(\boldsymbol{x}^\ast), it would point into the feasible set, and a small step inwards would increase ff. Complementary slackness says that each constraint is binding or has λi∗=0\lambda_i^\ast=0. NDCQ is checked for the binding constraints only.

The conditions are necessary only. For max⁡xy\max xy subject to x+y≤10x+y\le10 from the Examples, both (0,0)(0,0) with λ=0\lambda=0 and (5,5)(5,5) with λ=5\lambda=5 satisfy them. The first is a saddle point of xyxy. The second is a local maximizer but not a global one: xy=t2xy=t^2 grows without bound along the feasible points x=y=−tx=y=-t, t→∞t\to\infty.

Compared with equality constraints, whose multipliers may have either sign, these two conditions are new. Linear programming shows the same pattern: a resource with unused slack has shadow price 00.


Key Results

  • A binding constraint satisfies gi(x∗)=big_i(\boldsymbol{x}^\ast)=b_i.
  • A nonbinding constraint has zero multiplier by complementary slackness.
  • The theorem gives necessary, not sufficient, conditions.

Examples


Prerequisites

Sources

Keywords: inequality FONC for maximization, KKT necessary conditions for max Symbols: element of, infinity, lambda, nabla gradient, real numbers, subset, sum

Last updated: 22 October 2026 19:04