Lectures

Math Camp

Lecture 7: Constrained Optimization

1 Overview: constraints, tangent directions, and multipliers

Lecture 6 solved an optimization problem in three separate steps: establish that a solution exists, generate candidates from first-order conditions, and certify a candidate as global, by concavity or by comparing values. Its first-order condition at a boundary point was one-sided: at a local maximizer x*x^{*},

f(x*)v0for every feasible direction v from x*,\nabla f(x^{*})\cdot v\leq0 \qquad\text{for every feasible direction $v$ from }x^{*},(FOC)

where vv is a feasible direction if the segment x*+tvx^{*}+tv stays in the feasible set for all small t>0t>0.

In economic problems the feasible set is typically described by equations and inequalities. For example, in a consumer problem, the budget constraint pxmp\cdot x\leq m is a linear inequality. In a planner’s problem, the requirement x1+x2=mx_{1}+x_{2}=m that a resource be split between two uses is a linear equality. In a producer’s problem, the technology constraint q=F(z)q=F(z), linking output qq to inputs zz, is a nonlinear equality whenever the production function FF is nonlinear.

Depending on the shape of the feasible set, the condition (FOC) may be vacuous, i.e., it may rule out nothing. Suppose first that there is just one equality constraint h(x)=0h(x)=0. If hh is affine, as in the planner’s problem, the feasible set is a line: segments along the line stay in the set, so nonzero feasible directions exist and (FOC) is not vacuous (Figure 1.1, left). If instead the feasible set is curved, such as the circle {x2:x12+x22=2}\{x\in\mathbb{R}^{2}:x_{1}^{2}+x_{2}^{2}=2\}, it contains no segments: every straight move away from a point of the circle leaves the circle. The only feasible direction is then v=0v=0, so (FOC) holds at every point of the circle and rules out nothing (Figure 1.1, right).

Figure 1.1. Feasible movement under an equality constraint. Left: an affine constraint. The feasible set is the line h(x)=0 with h(x)=m-x_{1}-x_{2}; the two blue arrows from x^{*} are feasible directions, since segments along the line stay in the set. Right: a curved constraint. The feasible set is the circle h(x)=0 with h(x)=2-x_{1}^{2}-x_{2}^{2}; every straight move from x^{*} leaves the circle. The feasible movement is the curve \gamma, which bends with the circle; the green vector v is its velocity at x^{*}, tangent to the circle (the dashed tangent line).

For a curved feasible set, directions of movement come from curves rather than segments. A feasible movement through x*x^{*} is a curve γ(t)\gamma(t) that stays in the feasible set, with γ(0)=x*\gamma(0)=x^{*}: think of γ(t)\gamma(t) as the position of a moving point at time tt. Its velocity v=γ(0)v=\gamma'(0) is the vector of the instantaneous rates of change of its coordinates — the direction in which the moving point passes through x*x^{*}. The path bends with the set, but the velocity is an ordinary vector: on the circle it is tangent to the circle, and on the line the curve can be the line itself, whose velocity is one of the old feasible directions.

At points satisfying a regularity condition (LICQ), these velocities — the tangent directions — are exactly the vectors orthogonal to every constraint gradient hj(x*)\nabla h_{j}(x^{*}), and the first-order condition becomes f(x*)+μ1*h1(x*)++μk*hk(x*)=0\nabla f(x^{*}) +\mu_{1}^{*}\nabla h_{1}(x^{*})+\cdots+\mu_{k}^{*}\nabla h_{k}(x^{*}) =0 for some coefficients μj*\mu_{j}^{*}, which are the Lagrange multipliers. The function L(x,μ)=f(x)+μh(x)L(x,\mu)=f(x)+\mu\cdot h(x) is the Lagrangian; its critical points are precisely the pairs (x,μ)(x,\mu) that satisfy this equation together with h(x)=0h(x)=0.

Section 3 then adds inequality constraints, written gi(x)0g_{i}(x)\geq0. At a candidate x*x^{*}, a constraint is active if gi(x*)=0g_{i}(x^{*})=0 and slack if gi(x*)>0g_{i}(x^{*})>0; a slack constraint does not restrict small movements, so it drops out of the first-order condition. Stationarity, feasibility, nonnegative multipliers on the inequalities, and the rule that each multiplier or its constraint is zero (complementary slackness) together form the Karush–Kuhn–Tucker (KKT) conditions.

Section 4 then provides the global certification, specialized to the cases of Section 2 and Section 3. As in Lecture 6, existence must be shown separately, using Weierstrass, coercivity, or a direct argument.

2 Equality constraints and the Lagrangian

2.1 Tangent directions and constraint normals

Let UnU\subseteq\mathbb{R}^{n} be open, let f:Uf:U\to\mathbb{R} and h:Ukh:U\to\mathbb{R}^{k} be C1C^{1}, and consider maxxUf(x)subject toh(x)=0.\max_{x\in U}\ f(x) \qquad\text{subject to}\qquad h(x)=0 . Here, the feasible set {xU:h(x)=0}\{x\in U:h(x)=0\} is described by a system of kk equations. When one of these equations is nonlinear, the feasible set may be curved. We thus work with feasible curves and their velocities.

We call γ\gamma a feasible curve through x*x^{*} if γ\gamma is differentiable, γ(0)=x*\gamma(0)=x^{*}, and h(γ(t))=0h(\gamma(t))=0 for all tt near 00. Its velocity at x*x^{*} is v=γ(0)v=\gamma'(0). Such a velocity is called a tangent direction to the constraint set at x*x^{*}.

Lemma 2.1 (Tangent directions lie in the null space). Let γ\gamma be a feasible curve through x*x^{*} with velocity vv. Then Dh(x*)v=0.\mathrm{D}h(x^{*})\,v=0 .

Proof. h(γ(t))=0h(\gamma(t))=0 for all tt near 00, and differentiating using the chain rule from Lecture 4 gives Dh(γ(t))γ(t)=0at t=0,soDh(x*)v=0.\mathrm{D}h(\gamma(t))\,\gamma'(t) = 0 \quad \text{at } t=0, \quad\text{so}\quad \mathrm{D}h(x^{*})\,v=0 . ◻

Every tangent direction thus lies in the null space N(Dh(x*))N(\mathrm{D}h(x^{*})) from Lecture 3. Row by row, the display says hj(x*)v=0for each j.\nabla h_{j}(x^{*})\cdot v=0 \qquad\text{for each }j. In other words, each constraint gradient is orthogonal (perpendicular) to every tangent direction. A vector perpendicular to the tangent directions is called a normal to the constraint set. Thus the constraint gradients are normals to the constraint set.

Figure 2.1. The local geometry at x^{*} for one constraint (k=1). The feasible curve \gamma stays on the constraint set. Its velocity v=\gamma'(0) is tangent to the constraint set, while \nabla h(x^{*}) is normal to it; hence \nabla h(x^{*})\cdot v=0. The dashed lines are the tangent and normal lines at x^{*}.

The converse is generally not true. That is, if Dh(x*)v=0\mathrm{D}h(x^{*})\,v=0 for some vector vv, there may be no feasible curve through x*x^{*} with velocity vv. For example, if h(x)=x2h(x) = x^2, then the feasible set is the single point {0}\{0\}, so the only feasible velocity at 00 is 00. Yet, the null space of h(0)=0h'(0) = 0 is all of \mathbb{R}, so any vector vv \in \mathbb{R} satisfies Dh(0)v=0\mathrm{D}h(0)\,v = 0.

The following condition ensures that all vectors in the null space of Dh(x*)\mathrm{D}h(x^{*}) are velocities of feasible curves through x*x^{*}.

Definition 2.2 (LICQ for equality constraints). The linear independence constraint qualification holds at a feasible point x*x^{*} if the constraint gradients h1(x*),,hk(x*)\nabla h_{1}(x^{*}),\dots,\nabla h_{k}(x^{*}) are linearly independent; equivalently, if rankDh(x*)=k\operatorname{rank}\mathrm{D}h(x^{*})=k.

Remark 2.3 (How many constraints?). The number kk of equations need not equal the number of independent restrictions they place near x*x^{*}; that number is r=rankDh(x*)r=\operatorname{rank}\mathrm{D}h(x^{*}). When the constraints have a locally equivalent description by rr independent equations, the feasible set is locally a surface of dimension nrn-r. Thus r<nr<n leaves feasible movement, while r=nr=n makes the feasible point locally isolated. LICQ says r=kr=k, so it requires knk\leq n: more than nn vectors in n\mathbb{R}^{n} cannot be linearly independent. When k>nk>n, no description with that many equations satisfies LICQ; when possible, re-describe the same feasible set by independent equations, and otherwise analyze it directly.

Lemma 2.4 (Tangent directions under LICQ). Let hh be C1C^{1} and let LICQ hold at the feasible point x*x^{*}. If Dh(x*)v=0\mathrm{D}h(x^{*})\,v=0, then vv is the velocity of a differentiable feasible curve through x*x^{*}.

Intuitively, if a vector vv is orthogonal to the constraint normals, then it is tangent to the constraint set, and a curve can be drawn along the constraint set in the direction of vv. LICQ thus ensures that the constraints form a smooth surface locally around x*x^*, so that every vector of the null space is realized as the velocity of a feasible curve.

Combining Lemma 2.1 and Lemma 2.4, we conclude that under LICQ, the set of feasible velocities at x*x^{*} is exactly N(Dh(x*))N(\mathrm{D}h(x^{*})).

2.2 First-order conditions and the Lagrangian

Now suppose x*x^{*} is a local maximizer at which LICQ holds. For any feasible curve through x*x^{*}, the restriction tf(γ(t))t\mapsto f(\gamma(t)) has a local maximum at the interior point t=0t=0, so its derivative at t=0t=0 is zero. Chain rule and Lemma 2.4 thus yield f(x*)v=0for every vN(Dh(x*)).\nabla f(x^{*})\cdot v=0 \qquad\text{for every }v\in N(\mathrm{D}h(x^{*})) . This is the equality-constraint analogue of (FOC). It holds with equality because both directions along the constraint set are available: if vv is a tangent direction, then so is v-v, the velocity of the reversed curve γ(t)\gamma(-t). Simply put, the gradient of the objective ff must be orthogonal to every tangent direction vv, or else moving along a feasible curve in one of the directions vv and v-v would increase ff. Under LICQ, the tangent directions are exactly the vectors orthogonal to the constraint gradients.1 Since f(x*)\nabla f(x^{*}) is orthogonal to every tangent direction, it must be a linear combination of the constraint gradients; that is, there are coefficients μ1*,,μk*\mu_{1}^{*},\dots,\mu_{k}^{*} such that f(x*)+μ1*h1(x*)++μk*hk(x*)=0.\nabla f(x^{*}) +\mu_{1}^{*}\nabla h_{1}(x^{*})+\cdots +\mu_{k}^{*}\nabla h_{k}(x^{*})=0. These coefficients are called the Lagrange multipliers. The first-order condition is summarized by the following theorem.

Theorem 2.5 (Lagrange multiplier theorem). Let ff and hh be C1C^{1}, let x*x^{*} be a local extremum (maximizer or minimizer) of ff subject to h(x)=0h(x)=0, and let LICQ hold at x*x^{*}. Then there is a unique vector μ*k\mu^{*}\in\mathbb{R}^{k} such that f(x*)+Dh(x*)μ*=0.\nabla f(x^{*})+\mathrm{D}h(x^{*})^{\top}\mu^{*}=0.

Proof (optional, using Lecture 8’s implicit function theorem). Stack the objective gradient on top of the constraint gradients: M=(f(x*)h1(x*)hk(x*)).M= \begin{pmatrix} \nabla f(x^{*})^{\top}\\ \nabla h_{1}(x^{*})^{\top}\\ \vdots\\ \nabla h_{k}(x^{*})^{\top} \end{pmatrix}. Suppose, for contradiction, that rankM=k+1\operatorname{rank}M=k+1. Then some k+1k+1 columns of MM form an invertible matrix. Hold the remaining coordinates fixed at their x*x^{*}-values and apply the implicit function theorem to the selected coordinates in the system f(x)=c0,h(x)=c.f(x)=c_{0}, \qquad h(x)=c. It follows that every right-hand side (c0,c)(c_{0},c) sufficiently close to (f(x*),0)(f(x^{*}),0) has a solution near x*x^{*}. In particular, take c=0c=0 and c0=f(x*)+εc_{0}=f(x^{*})+\varepsilon. If x*x^{*} is a local maximizer, choose ε>0\varepsilon>0; if it is a local minimizer, choose ε<0\varepsilon<0. Either choice produces a nearby feasible point that contradicts the optimality of x*x^{*}. Therefore, rankMk\operatorname{rank}M\leq k.

By LICQ, the kk constraint gradients are linearly independent. Since adding f(x*)\nabla f(x^{*}) does not increase their rank, f(x*)\nabla f(x^{*}) must be a linear combination of them. Thus there is a vector μ*k\mu^{*}\in\mathbb{R}^{k} such that f(x*)+Dh(x*)μ*=0.\nabla f(x^{*})+\mathrm{D}h(x^{*})^{\top}\mu^{*}=0. Finally, if both μ*\mu^{*} and μ̃\tilde\mu satisfy this equation, then Dh(x*)(μ*μ̃)=0\mathrm{D}h(x^{*})^{\top}(\mu^{*}-\tilde\mu)=0. LICQ makes the constraint gradients linearly independent, so μ*=μ̃\mu^{*}=\tilde\mu. ◻

As in Lecture 6, the theorem gives only a necessary condition for a local extremum. Note that the Lagrange multipliers are not restricted in sign, i.e., they can be positive or negative. For a fixed objective, constraint description, and candidate x*x^{*}, LICQ makes the multiplier vector unique. Rescaling or rewriting a constraint (e.g., multiplying both sides by 22) changes its multiplier. Finally, the theorem does not guarantee that an optimizer exists; existence must be established separately.

LICQ cannot be dropped from Theorem 2.5, and all points in the feasible set that do not satisfy LICQ must be treated separately.

Example 2.6 (A singular description loses the multiplier). Consider maxxx\max_{x\in\mathbb{R}}x subject to h(x)=x2=0h(x)=x^{2}=0. We have f(x)=1f'(x) = 1 and h(x)=2xh'(x) = 2x. If we were to apply the Lagrange multiplier theorem, we would get 1+2xμ=01+2x\mu=0. However, the feasible set is the single point {0}\{0\}, meaning that x*=0x^*=0 is the global maximizer. Clearly, at x*=0x^*=0 there does not exist a μ\mu that satisfies the multiplier condition 1+2x*μ=01+2x^*\mu=0.

The Lagrange multiplier condition and the feasibility requirement h(x)=0h(x)=0 form a system of n+kn+k equations in the n+kn+k unknowns (x,μ)(x,\mu). These equations can be written as the critical-point conditions of a single function of n+kn+k variables, the Lagrangian.

Definition 2.7 (Lagrangian). The Lagrangian of the problem maxf(x)\max f(x) subject to h(x)=0h(x)=0 is the function of xx and μ\mu given by L(x,μ)=f(x)+μh(x).L(x,\mu)=f(x)+\mu\cdot h(x) .

Its partial gradients are: xL(x,μ)=f(x)+Dh(x)μ,μL(x,μ)=h(x).\nabla_{x}L(x,\mu)=\nabla f(x)+\mathrm{D}h(x)^{\top}\mu , \qquad \nabla_{\mu}L(x,\mu)=h(x) . Consequently, the critical points of LL are exactly the pairs (x,μ)(x,\mu) that satisfy the first-order condition and the feasibility requirement. Note also that the Lagrangian is not being maximized: a constrained maximizer is a critical point of L(,μ*)L(\,\cdot\,,\mu^{*}), and can thus be a maximum, a minimum, or a saddle point of the Lagrangian.

Example 2.8 (Solving directly and with a Lagrangian). Consider maxx1x2\max\,x_{1}x_{2} subject to x1+x2=2x_{1}+x_{2}=2.

Direct solution. The constraint gives x2=2x1x_{2}=2-x_{1}, so the problem reduces to maxx1x1(2x1)=maxx1[1(x11)2].\max_{x_{1}\in\mathbb{R}}\ x_{1}(2-x_{1}) =\max_{x_{1}\in\mathbb{R}}\left[1-(x_{1}-1)^{2}\right]. The unique global maximizer is x1*=1x_{1}^{*}=1, and the constraint then gives x2*=1x_{2}^{*}=1. Thus x*=(1,1)x^{*}=(1,1)^{\top}.

Lagrangian solution. Write the constraint as h(x)=2x1x2=0h(x)=2-x_{1}-x_{2}=0. Since h(x)=(1,1)0\nabla h(x)=(-1,-1)^{\top}\neq0, LICQ holds. The Lagrangian is L(x,μ)=x1x2+μ(2x1x2),L(x,\mu)=x_{1}x_{2}+\mu\,(2-x_{1}-x_{2}) , so every constrained optimum must be among the solutions to Lx1=x2μ=0,Lx2=x1μ=0,Lμ=2x1x2=0.\frac{\partial L}{\partial x_{1}}=x_{2}-\mu=0, \qquad \frac{\partial L}{\partial x_{2}}=x_{1}-\mu=0, \qquad \frac{\partial L}{\partial \mu}=2-x_{1}-x_{2}=0. The first two equations give x1=x2=μx_{1}=x_{2}=\mu. Substituting into the third gives μ*=1\mu^{*}=1 and hence x*=(1,1)x^{*}=(1,1)^{\top}, the same point found above. The direct solution established that this point is the global maximizer; the Lagrangian equations by themselves identified it only as a candidate.

In particular, we did not maximize the Lagrangian. As a function of xx with μ=μ*\mu=\mu^{*} fixed, L(x,μ*)=x1x2+2x1x2has Hessian(0110),L(x,\mu^{*})=x_{1}x_{2}+2-x_{1}-x_{2} \qquad\text{has Hessian}\qquad \begin{pmatrix}0&1\\1&0\end{pmatrix}, whose characteristic equation λ21=0\lambda^{2}-1=0 gives eigenvalues 11 and 1-1. The Hessian is indefinite, so by the second-order classification of Lecture 6 the point x*x^{*} is a saddle point of L(,μ*)L(\,\cdot\,,\mu^{*}). On the feasible set, h(x)=0h(x)=0 makes L(x,μ*)=f(x)L(x,\mu^{*})=f(x), so x*x^{*} does maximize the Lagrangian among feasible points. The Lagrangian collects the first-order conditions of the constrained problem; it does not turn the problem into an unconstrained maximization of LL.

3 Inequalities and the KKT conditions

3.1 Standard form and active sets

We fix one convention for inequality constraints. Every inequality is written as gi(x)0,g_{i}(x)\geq0 , so a(x)ba(x)\leq b becomes ba(x)0b-a(x)\geq0.

The optimization problem is maxxUf(x)subject toh(x)=0,g(x)0,\max_{x\in U}\ f(x) \qquad\text{subject to}\qquad h(x)=0, \quad g(x)\geq0 , where h:Ukh:U\to\mathbb{R}^{k} and g:Ug:U\to\mathbb{R}^{\ell}. Its Lagrangian is L(x,μ,λ)=f(x)+μh(x)+λg(x),μk,λ0.L(x,\mu,\lambda) =f(x)+\mu\cdot h(x)+\lambda\cdot g(x), \qquad \mu\in\mathbb{R}^{k}, \quad \lambda\geq0 . The requirement λ0\lambda\geq0 is forced by the convention g0g\geq0, and the one-dimensional calculation after Theorem 3.2 shows why.

For inequality constraints, we will use the following classification.

Definition 3.1 (Active and slack constraints, mixed LICQ). At a feasible point xx, the active set is I(x)={i:gi(x)=0},I(x)=\{i:g_{i}(x)=0\} , and a constraint with gi(x)>0g_{i}(x)>0 is slack. LICQ holds at xx for the mixed problem if the vectors {hj(x):j=1,,k}{gi(x):iI(x)}\{\nabla h_{j}(x):j=1,\dots,k\} \cup \{\nabla g_{i}(x):i\in I(x)\} are linearly independent.

A slack constraint stays satisfied throughout a neighborhood of xx (by continuity of gig_{i}), so it places no restriction on local movement and its gradient does not enter the constraint qualification.

3.2 The KKT theorem

Theorem 3.2 (Karush–Kuhn–Tucker). Let ff, hh, and gg be C1C^{1}, let x*x^{*} be a local maximizer subject to h(x)=0h(x)=0 and g(x)0g(x)\geq0, and let LICQ hold at x*x^{*}. Then there are μ*k\mu^{*}\in\mathbb{R}^{k} and λ*\lambda^{*}\in\mathbb{R}^{\ell} such that f(x*)+Dh(x*)μ*+Dg(x*)λ*=0(stationarity)h(x*)=0,g(x*)0(feasibility)λ*0(multiplier signs)λi*gi(x*)=0(i=1,,)(complementary slackness)\begin{aligned} \nabla f(x^{*})+\mathrm{D}h(x^{*})^{\top}\mu^{*} +\mathrm{D}g(x^{*})^{\top}\lambda^{*}&=0 &&\text{(stationarity)}\\ h(x^{*})=0, \qquad g(x^{*})&\geq0 &&\text{(feasibility)}\\ \lambda^{*}&\geq0 &&\text{(multiplier signs)}\\ \lambda_{i}^{*}\,g_{i}(x^{*})&=0 \quad(i=1,\dots,\ell) &&\text{(complementary slackness)} \end{aligned}

We use this result without proof.

Complementary slackness forces λi*=0\lambda_{i}^{*}=0 whenever gi(x*)>0g_{i}(x^{*})>0, and permits λi*>0\lambda_{i}^{*}>0 only where gi(x*)=0g_{i}(x^{*})=0: slack constraints have zero multipliers. The converse implication fails: an active constraint can also have a zero multiplier (as in Example 3.3 below).

The sign restriction λ0\lambda\geq0 can be read off a one-dimensional picture. Suppose n==1n=\ell=1, the constraint g(x*)=0g(x^{*})=0 is active, and g(x*)>0g'(x^{*})>0, so g(x*+t)>0g(x^{*}+t)>0 for every small t>0t>0 and v=1v=1 is a feasible direction. If x*x^{*} is a local maximizer, the objective cannot increase into the feasible side, which is (FOC) with v=1v=1: f(x*)0f'(x^{*})\leq0. Stationarity reads f(x*)+λ*g(x*)=0f'(x^{*})+\lambda^{*}g'(x^{*})=0, so λ*=f(x*)g(x*)0.\lambda^{*} =-\frac{f'(x^{*})}{g'(x^{*})} \geq0 . With the constraint written as g0g\leq0 instead, the same calculation would produce the opposite sign, so the convention must be fixed once and recorded.

Like every first-order condition in this course, the KKT conditions generate candidates but do not certify them. On maxx0x3\max_{x\geq0}x^{3}, the point x*=0x^{*}=0 with λ*=0\lambda^{*}=0 satisfies every condition of Theorem 3.2, yet 00 is not even a local maximizer, since x3>0x^{3}>0 for every x>0x>0. Existence and certification remain separate steps, and here existence in fact fails.

3.3 Active-set reasoning in a capacity problem

With \ell inequalities, the practical method is to reason/guess about which constraints bind. Each guess of an active set of constraints turns the KKT conditions into equalities that can be solved. The remaining KKT conditions — feasibility and multiplier signs — then confirm that the guess is a solution, or reject it.

Example 3.3 (KKT by guess-and-verify). Let a>0a>0 and K>0K>0, and consider maxqaq12q2subject toq0,Kq0.\max_{q}\ aq-\tfrac12 q^{2} \qquad\text{subject to}\qquad q\geq0, \quad K-q\geq0 . The feasible set [0,K][0,K] is nonempty and compact and the objective is continuous, so a maximizer exists by Weierstrass. With g1(q)=qg_{1}(q)=q and g2(q)=Kqg_{2}(q)=K-q, the Lagrangian is L(q,λ)=aq12q2+λ1q+λ2(Kq),L(q,\lambda)=aq-\tfrac12 q^{2}+\lambda_{1}q+\lambda_{2}(K-q), and the KKT conditions are aq+λ1λ2=0,0qK,λ1,λ20,λ1q=0,λ2(Kq)=0.a-q+\lambda_{1}-\lambda_{2}=0, \qquad 0\leq q\leq K, \qquad \lambda_{1},\lambda_{2}\geq0, \qquad \lambda_{1}q=0, \quad \lambda_{2}(K-q)=0 . There are four cases to check.

  1. λ1=λ2=0\lambda_{1}=\lambda_{2}=0. Then stationarity gives q=aq=a. To satisfy the second constraint, we must have Kq0KaK-q \geq 0 \iff K \geq a.

  2. λ1=0\lambda_{1}=0, Kq=0K-q=0. Then stationarity gives λ2=aK\lambda_{2}=a-K, and λ20\lambda_2 \geq 0 is satisfied if and only if KaK \leq a.

  3. λ2=0\lambda_{2}=0, q=0q=0. Then stationarity gives λ1=a<0\lambda_{1}=-a<0, which violates the sign restriction; this guess is rejected for every a>0a>0.

  4. λ1,λ2>0\lambda_1,\lambda_2 > 0. This case is impossible because we cannot have q=0q = 0 and q=Kq=K for K>0K>0.

The solution is thus q*(a,K)=min{a,K},λ2*(a,K)=max{aK,0}.q^{*}(a,K)=\min\{a,K\}, \qquad \lambda_{2}^{*}(a,K)=\max\{a-K,\,0\}. Note that when a=Ka=K, the solution is q*=Kq^{*}=K and the multiplier is λ2*=0\lambda_2^* = 0, meaning that the capacity constraint is active and the multiplier is zero.

To certify that q*q^* is a global maximizer, observe that the objective can be rewritten as follows: aq12q2=12(qa)2+12a2,aq-\tfrac12 q^{2} = -\tfrac12 (q-a)^2 + \tfrac12 a^2, which shows that the objective is maximized by the point q*q^* that minimizes (qa)2(q-a)^2, i.e., the point closest to aa. Since the point of [0,K][0,K] closest to aa is min{a,K}=q*\min\{a,K\}=q^{*}, it is indeed a global maximizer.

4 Global certification

4.1 Concave programs

In Lecture 6, if the objective function ff is concave on a convex set, then the first-order condition is sufficient for a global maximum. The same logic extends to the following class of constrained problems.

Definition 4.1 (Concave program). Let UnU\subseteq\mathbb{R}^{n} be convex. The problem maxxUf(x)subject toh(x)=0,g(x)0,\max_{x\in U}\ f(x) \qquad\text{subject to}\qquad h(x)=0, \quad g(x)\geq0, is a concave program if ff and every gig_i are concave on UU and hh is affine.

The sufficiency proof again relies on the tangent inequality from Lecture 5, f(y)f(x)+f(x)(yx)f(y)\leq f(x)+\nabla f(x)\cdot (y-x).

Theorem 4.2 (Sufficiency in a concave program). Consider a concave program on an open convex set UU, and suppose that ff and every gig_i are differentiable. If a feasible x*x^{*} and multipliers (μ*,λ*)(\mu^{*},\lambda^{*}) satisfy the KKT conditions of Theorem 3.2, then x*x^{*} is a global maximizer.

Proof (optional). Let yy be feasible and put v=yx*v=y-x^{*}. Concavity of ff gives f(y)f(x*)f(x*)v,f(y)-f(x^{*})\leq\nabla f(x^{*})\cdot v , and stationarity rewrites the right-hand side as f(x*)v=μ*Dh(x*)vλ*Dg(x*)v.\nabla f(x^{*})\cdot v =-\mu^{*}\cdot \mathrm{D}h(x^{*})v -\lambda^{*}\cdot \mathrm{D}g(x^{*})v . Because hh is affine and both points are feasible, h(y)h(x*)=Dh(x*)v=0h(y)-h(x^{*})=\mathrm{D}h(x^{*})v=0, so the μ*\mu^{*} term vanishes. For each ii, concavity of gig_{i} gives gi(x*)vgi(y)gi(x*)\nabla g_{i}(x^{*})\cdot v\geq g_{i}(y)-g_{i}(x^{*}), and since λ*0\lambda^{*}\geq0, λ*Dg(x*)vλ*(g(y)g(x*))=λ*g(x*)λ*g(y)0,-\lambda^{*}\cdot \mathrm{D}g(x^{*})v \leq-\lambda^{*}\cdot \left(g(y)-g(x^{*})\right) =\lambda^{*}\cdot g(x^{*})-\lambda^{*}\cdot g(y) \leq0 , where the final step uses complementary slackness, λ*g(x*)=0\lambda^{*}\cdot g(x^{*})=0, and then λ*0\lambda^{*}\geq0 with g(y)0g(y)\geq0. Chaining the displays gives f(y)f(x*)f(y)\leq f(x^{*}). ◻

Recall from Lecture 6 that the set of maximizers of a strictly concave function on a convex set contains at most one point (see Theorem 3.1, part 3 in Lecture 6). The constraints of a concave program define a convex feasible set (possibly empty): it is the intersection of superlevel sets of concave functions and an affine equality set, each convex (see Lecture 5). Thus, if ff is strictly concave, the program has at most one maximizer.

The following condition requires the set of strictly feasible points (points that satisfy the equality constraints and satisfy every inequality strictly) to be nonempty. In a concave program, it makes the KKT conditions necessary; they are already sufficient by Theorem 4.2.

Definition 4.3 (Slater’s condition). A concave program with affine equalities satisfies Slater’s condition if there is xU\bar x\in U with h(x)=0andgi(x)>0for every i.h(\bar x)=0 \qquad\text{and}\qquad g_{i}(\bar x)>0 \quad\text{for every }i .

Theorem 4.4 (Necessity under Slater’s condition). Consider a concave program on an open convex set UU, and suppose that ff and every gig_i are differentiable. If Slater’s condition holds, then every global maximizer satisfies the KKT conditions with some multipliers (μ*,λ*)(\mu^*,\lambda^*).

Slater and LICQ are both constraint qualifications, but they are different: LICQ is local and point-specific, while Slater is global and specific to concave programs. However, both are sufficient to guarantee the existence of Lagrange multipliers.

Here is another example of what goes wrong when a constraint qualification fails.

Example 4.5 (A concave program with no multipliers). Consider max(x1,x2)2x2subject tog1(x)=x10,g2(x)=x1x220.\max_{(x_1,x_2)\in\mathbb{R}^2} x_2 \qquad\text{subject to}\qquad g_1(x)=x_1\geq0, \quad g_2(x)=-x_1-x_2^2\geq0. This is a concave program: the objective and g1g_1 are affine, and g2g_2 is concave. Feasibility requires 0x1x2200\leq x_1\leq-x_2^2\leq0, so the feasible set is {(0,0)}\{(0,0)\} and x*=(0,0)x^*=(0,0) is the global maximizer. Slater’s condition fails because g1(x)>0g_1(x)>0 requires x1>0x_1>0, whereas g2(x)>0g_2(x)>0 requires x1<x220x_1<-x_2^2\leq0.

At x*x^*, stationarity would require (01)+λ1(10)+λ2(10)=0,\begin{pmatrix}0\\1\end{pmatrix} +\lambda_1\begin{pmatrix}1\\0\end{pmatrix} +\lambda_2\begin{pmatrix}-1\\0\end{pmatrix} =0, which is impossible for any multipliers because the second component is always 11. Thus the global maximizer has no KKT multipliers. Yet, the global maximizer exists and is unique — it is the only feasible point (0,0)(0,0).

4.2 Second-order conditions on the tangent space

For equality-constrained problems there is also a second-order local test. The relevant matrix is the Hessian of the Lagrangian, not of the objective: curvature only matters along the tangent directions, and along those directions both the objective and the constraints curve. The multiplier terms in LL account for the curvature of the constraints.

Theorem 4.6 (Second-order conditions on the tangent space). Let ff and hh be C2C^{2}, let x*x^{*} be feasible with LICQ, and let μ*\mu^{*} satisfy the stationarity condition from the Lagrange multiplier Theorem 2.5: f(x*)+Dh(x*)μ*=0.\nabla f(x^*)+\mathrm{D}h(x^*)^\top\mu^*=0. Write T=N(Dh(x*)),H=Hf(x*)+j=1kμj*Hhj(x*),T=N(\mathrm{D}h(x^{*})), \qquad H=H_{f}(x^{*})+\sum_{j=1}^{k}\mu_{j}^{*}H_{h_{j}}(x^{*}) , so HH is the Hessian of L(,μ*)L(\,\cdot\,,\mu^{*}) at x*x^{*}.

  1. If x*x^{*} is a local constrained maximizer, then vHv0v^{\top}Hv\leq0 for every vTv\in T.

  2. If vHv<0v^{\top}Hv<0 for every nonzero vTv\in T, then x*x^{*} is a strict local constrained maximizer.

Example 4.7 (Classifying two candidates on a circle). Consider maxx1+x2\max\,x_{1}+x_{2} subject to h(x)=2x12x22=0h(x)=2-x_{1}^{2}-x_{2}^{2}=0.

Candidates. Since h(x)=(2x1,2x2)0\nabla h(x)=(-2x_{1},-2x_{2})^{\top}\neq0 at every point of the circle, LICQ holds at every feasible point. The stationarity system of L=x1+x2+μ(2x12x22)L=x_{1}+x_{2}+\mu(2-x_{1}^{2}-x_{2}^{2}) is 12μx1=0,12μx2=0,x12+x22=2,1-2\mu x_{1}=0, \qquad 1-2\mu x_{2}=0, \qquad x_{1}^{2}+x_{2}^{2}=2 , with the two solutions (x*,μ*)=((1,1),12)(x^{*},\mu^{*})=\left((1,1)^{\top},\tfrac12\right) and ((1,1),12)\left((-1,-1)^{\top},-\tfrac12\right).

Classification. The objective is linear, so Hf=0H_{f}=0 and the curvature comes entirely from the constraint: H=μ*Hh=2μ*I,H=\mu^{*}H_{h}=-2\mu^{*}I , which is I-I at the first candidate and II at the second. Both tangent spaces are T={v:v1+v2=0}T=\{v:v_{1}+v_{2}=0\}. On TT, the first candidate has v(I)v=v2<0v^{\top}(-I)v=-\lVert v \rVert^{2}<0 for v0v\neq0, a strict local maximum, and the second has vIv>0v^{\top}Iv>0, a strict local minimum. The Hessian of the objective alone is zero at both points, so it cannot distinguish them; the classification comes from the constraint curvature term μ*Hh\mu^{*}H_{h}.

Certification. The circle is compact, so Weierstrass gives a global maximizer and a global minimizer, and by Theorem 2.5 both are among the two candidates. Comparing values, f(1,1)=2f(1,1)=2 and f(1,1)=2f(-1,-1)=-2, so the local classification is also the global one.

There is also a second-order local test for inequality constraints, but it goes beyond the scope of this course due to the fact that the relevant set of directions is a cone rather than a subspace.