Math Camp
Lecture 6: General Optimization
Solving an optimization problem requires three separate steps. First, we show that a solution exists. Second, we find the points that satisfy the necessary conditions for a solution. Third, we determine whether any of those points is a global solution. Setting a derivative equal to zero addresses only the second step.
1 The problem and existence
1.1 The problem and the candidate list
Many optimization problems belong to a family indexed by a parameter. We hold the parameter fixed while solving a single problem, but keep it in the notation so that the solution set and value can later be compared across problems.
Definition 1.1 (Optimization problem). Let be a parameter set, let , and let . For a fixed , the problem has the following parts.
The vector is the choice variable and is the parameter.
The set is the feasible set and is the objective.
The solution set is and when it is nonempty its elements all share one objective value, the value for any .
Example 1.2 (Utility maximization). A consumer with utility faces prices and wealth : Here the bundle is the choice variable, is the parameter, the budget set is the feasible set, demand is the solution set, and indirect utility is the value.
Note that writing instead of presumes that the supremum is attained. A supremum can be finite without being attained, and then is empty and is undefined. Before using the notation, we must establish that a solution exists.
Definition 1.3 (Local and global maximizers). Let and , and let .
is a global maximizer if for every .
is a local maximizer if there is with and a strict local maximizer if that inequality is strict for every such .
is interior if , meaning that for some , and a boundary point if every ball meets both and its complement.
Minimizers are defined by reversing every inequality.
Every global maximizer is a local maximizer, since ; the converse holds under concavity, as we show in Section 3. The interior–boundary distinction determines which first-order condition applies: at an interior point every small perturbation is feasible, so the objective can be compared with in both directions along every line, while at a boundary point some directions leave the feasible set and the comparison is one-sided.
Recall the existence result of Lecture 2, which we use without proof.
Theorem 1.4 (Weierstrass). If is nonempty and compact and is continuous, then attains both a maximum and a minimum on .
In the next example, we first establish existence and then generate candidates.
1.2 Existence on an unbounded set
The following condition is sufficient for existence on an unbounded feasible set.
Definition 1.5 (Coercivity for maximization). Let be unbounded. A function is coercive for maximization on if for every sequence ; equivalently, if for every there is such that whenever and .
Theorem 1.6 (Coercive existence). Let be nonempty, closed, and unbounded. If is continuous and coercive for maximization, then attains a maximum on .
Proof (optional). Choose any . Applying Definition 1.5 with gives , which we may take larger than , such that Put . It contains , so it is nonempty; it is bounded by ; and it is closed, being the intersection of two closed sets. By the Heine–Borel theorem it is therefore compact, so Theorem 1.4 supplies a maximizer of on . Any has and hence , the second inequality because . So for every , which is Definition 1.3. ◻
Notice the structure of the proof: coercivity allows us to replace the unbounded feasible set with a compact one that contains a maximizer, and then apply the Weierstrass theorem. Like compactness, coercivity is sufficient for existence but not necessary.
Example 1.7 (Coercivity is not necessary). On , the function is not coercive for maximization, since rather than ; yet is positive before and negative after , so is the unique global maximizer. On , the function is likewise not coercive, but here there is no maximizer: increases toward the supremum , which it never attains.
2 Necessary local conditions
2.1 The interior first-order condition
Both first-order conditions below are proved the same way: we restrict to a line through the candidate point and apply one-variable arguments to the restriction. We collect the one-variable facts first.
Lemma 2.1 (One-variable optimality). Let and let have a local maximum at .
If is differentiable at , then .
If is twice continuously differentiable, then .
Proof. For part (1), take small enough that . When , dividing by preserves the inequality, so When , dividing by reverses it, so the same quotient is nonnegative and letting gives . The derivative exists, so both one-sided limits equal it, and .
For part (2), part (1) gives . The one-dimensional case of the second-order Taylor expansion from Lecture 5 gives If , then for every sufficiently small nonzero the positive quadratic term dominates the remainder, so . This contradicts the local maximum. Hence . ◻
Theorem 2.2 (Interior first-order condition). Let be open, let , and let be differentiable at . If is a local maximizer or a local minimizer of on , then .
Proof. Fix and put . Since , there is with , so is defined for when . If is a local maximizer of on , then for all small by Definition 1.3, so is a local maximum of . By part (1) of Lemma 2.1 and the chain rule for a line restriction, This holds for every ; taking gives , so . For a local minimizer, apply the same argument to . ◻
Definition 2.3 (Critical point). A point at which is differentiable and is a critical point, or stationary point, of .
Theorem 2.2 is a necessary condition, not a sufficient one. Its converse fails even at a differentiable interior point. Moreover, the condition itself fails if we drop interiority, and it does not apply without differentiability.
Example 2.4 (Three counterexamples).
Criticality does not imply optimality. The origin is critical for on by Definition 2.3, yet for every , so it is neither a local maximizer nor a local minimizer.
Optimality at a non-interior point does not imply criticality. For on , the maximizer is , which is a boundary point of , and .
The condition does not apply without differentiability. The function on has a strict global maximizer at , an interior point, but is not differentiable there, so Theorem 2.2 does not apply.
2.2 Second-order conditions
A critical point can be a local maximizer, a local minimizer, or neither. The Hessian classifies it whenever the associated quadratic form is definite. The tool is the second-order Taylor expansion of Lecture 5: if is on an open set containing , then
and the second derivative of a line restriction is the quadratic form .
Theorem 2.5 (Second-order conditions). Let be on an open set containing .
If is a local maximizer, then is negative semidefinite.
If and is negative definite, then is a strict local maximizer.
If and is indefinite, then is a saddle point, which is neither a local maximizer nor a local minimizer.
For local minimizers, reverse the signs in the first two statements.
Proof (optional). (1) Necessity. Let and put , which has a local maximum at . Part (2) of Lemma 2.1 and the line-restriction formula give . Since was arbitrary, is negative semidefinite.
(2) Sufficiency. The function is continuous and the unit sphere is nonempty and compact, so Theorem 1.4 gives a maximum value on it, and because negative definiteness makes every such value negative. For , applying this to and multiplying by gives Since , there is with whenever . For such , (1) with gives so is a strict local maximizer.
(3) Indefiniteness. Choose and with and . Because the gradient vanishes, substituting into (1) gives for every sufficiently small nonzero : after division by , the remainder tends to zero while the quadratic coefficient is positive. The same argument with makes the difference negative for every sufficiently small nonzero . Thus every ball around contains points with larger and smaller values, so is neither a local maximizer nor a local minimizer.
The minimum statements follow by applying the above to , whose Hessian is . ◻
When the Hessian is semidefinite but not definite, neither part (2) nor part (3) applies, and no conclusion follows. The next example shows that every outcome is possible in that case.
Example 2.6 (A semidefinite Hessian is inconclusive). Each of , , and has , so their first- and second-order data at the origin are identical. Yet the origin is a strict maximizer of the first, a strict minimizer of the second, and neither for the third. A zero Hessian therefore supplies no classification.
In practice, we check definiteness of the Hessian with the tests of Lecture 5 instead of the definition.
Example 2.7 (A saddle point classified). Let . Then and , whose eigenvalues and have opposite signs, so the Hessian is indefinite and part (3) of Theorem 2.5 makes the origin neither a local maximizer nor a local minimizer.
2.3 Boundary first-order conditions
At a boundary maximizer the gradient need not vanish, as Example 2.4 showed. A one-sided statement remains true, and to state it we first name the directions that stay inside the feasible set.
Definition 2.8 (Feasible direction). Let . A vector is a feasible direction from if there is with
If is convex, then is a feasible direction from for every , since Definition 2.8 is satisfied with .
Theorem 2.9 (Boundary first-order condition). Let be open, let , and let be differentiable. If is a local maximizer of on , then In particular, if is convex, then
Proof (optional). Fix a feasible direction and put . By Definition 2.8, this restriction is feasible for all small . Since is a local maximizer, for all sufficiently small , so the difference quotients satisfy Letting and evaluating the derivative of the line restriction by the chain rule, If is convex and , then is feasible, which gives (2). ◻
At an interior point the condition collapses back to Theorem 2.2: for any , both and lie in for small , so (2) gives and , forcing for every .
If is a boundary local maximizer, then the gradient is allowed to not be zero, and if it’s not, then it must point out of the feasible set. To see this, note that means that the angle between the gradient and any feasible direction is at least ninety degrees. That is equivalent to saying that , meaning that moving in the direction decreases the value of relative to . That is, at a boundary point, the function is allowed to increase in some directions (those that point out of the feasible set), but it cannot increase in any direction that points into the feasible set.
On a nonnegative orthant the condition becomes one sign restriction and one complementarity relation per coordinate.
Theorem 2.10 (Componentwise form on the orthant). Let be open with , let be differentiable, and let . Then (2) with holds if and only if
Proof (optional). Necessity. Taking in (2) gives . If in addition , then is also in , and (2) applied to it gives , hence and therefore . So the product vanishes whether is zero or positive.
Sufficiency. Let , so for every . Expanding the inner product and using (3) twice, the second sum vanishing term by term and each remaining term being a product of a nonpositive number with a nonnegative one. ◻
The three conditions in (3) say that increasing any one coordinate cannot raise to first order, that feasibility holds, and that a partial derivative can be strictly negative only where the corresponding coordinate is already zero and cannot be reduced. The last identity is a complementarity relation; in the parameterized example of Section 3.2, it decides between an interior point and a corner.
3 Global certification
3.1 Concavity, globality, and uniqueness
Everything so far has been about local maximizers, and a local maximizer can fail to be a global one. However, if a function is concave, then every local maximizer is also a global maximizer.
Theorem 3.1 (Concave maximization). Let be convex and let be concave.
Every local maximizer of on is a global maximizer.
The set is either empty or convex.
If is strictly concave, then contains at most one point.
Proof (optional). Local implies global. Suppose is a local maximizer that is not global, so some has . By Definition 1.3 there is with for every feasible . The points are feasible by convexity of , and , so once is small enough. For such , concavity gives contradicting local maximality.
Convexity of . Suppose is nonempty and let have common maximum value . For , the point is feasible, and concavity gives Since is the maximum, the value is and the point lies in . So contains the segment joining any two of its points, and is therefore convex.
Strict-concavity uniqueness. If distinct had common value , their midpoint would be feasible and strict concavity would give contradicting maximality. ◻
Under concavity, the necessary condition of Theorem 2.9 is also sufficient, so a single first-order check certifies a global maximizer.
Theorem 3.2 (First-order characterization). Let be convex and let be differentiable and concave on an open convex set containing . A point is a global maximizer of on if and only if
Proof. Necessity. A global maximizer is a local maximizer, so Theorem 2.9 applies.
Sufficiency. For , the tangent inequality from Lecture 5 at and then the hypothesis give so is a global maximizer by Definition 1.3. ◻
Part (3) of Theorem 3.1 bounds the number of maximizers without producing one. The function is strictly concave on , and its supremum is approached as but never attained, so the solution set is empty. Existence remains a separate step. However, if there exists a point satisfying the first-order condition of Theorem 3.2, then existence is guaranteed by Theorem 3.2.
3.2 A complete parameterized problem
We now apply the three steps, in order, to a parameterized problem.
Example 3.3. For , consider Find the solution set and value for every .
Existence. For fixed the objective is continuous, and is nonempty, closed, and unbounded. Since as , the objective is coercive for maximization in the sense of Definition 1.5, so Theorem 1.6 gives a maximizer.
Candidates. Here and By Theorem 2.10 the condition (3) reads If the last equation forces , which is admissible only when ; if the first inequality requires . Thus exactly one point satisfies the condition: .
Globality and uniqueness. Since , the function is strictly concave on the convex set . The first-order condition is therefore sufficient by Theorem 3.2, and uniqueness follows from part (3) of Theorem 3.1. Hence The two regimes are the two ways (3) can hold: at the solution is the corner , whereas at it is the interior point .
Removing the quadratic term separates the roles of concavity, strict concavity, and coercivity.
Example 3.4 (Removing the curvature). For , let on . When , the argument above gives the unique maximizer . When , the objective is the affine function , and the three regimes are At , existence holds but uniqueness fails because the objective is no longer strictly concave. At , existence fails because the affine objective is unbounded above.
Example 3.5 (A non-concave problem in ). Find the solution set and value of
Example 3.6 (A concave problem in ). Find the solution set and value of
3.3 A workflow
The steps below summarize the workflow for solving a parameterized maximization problem.
Specify the objective, its domain, the feasible set, and the parameter, as in Definition 1.1.
Establish existence, by compactness (Theorem 1.4), coercivity (Theorem 1.6), or a direct argument.
Generate every candidate: interior critical points (Theorem 2.2), boundary points satisfying the feasible-direction condition of Theorem 2.9, and points where fails to be differentiable, where no first-order condition applies.
Classify interior candidates locally with Theorem 2.5 when the classification is needed and the Hessian is definite or indefinite. Discard the minimizers and saddle points, and keep the local maximizers and the inconclusive points.
Certify globality, either by concavity (Theorem 3.1 and Theorem 3.2) or by comparing the values of across all remaining candidate points. If is concave, then any critical point in is a global maximizer, and under strict concavity the unique one.
Report and .