Math Camp
Lecture 5: Curvature, Convexity, and Separation
Lecture 4 used a linear map to approximate a differentiable function near a point. In the one-variable case, we saw that
In this lecture we are interested in the curvature of a function, which is described by a second-order approximation. In the one-variable case, if is twice continuously differentiable near , the second-order Taylor approximation adds a quadratic term: When , the linear term vanishes, so first-order information does not tell us whether the graph bends upward or downward. The sign of does. In several variables, the Hessian generalizes , and the quadratic term becomes .
1 Second-order approximation and curvature
1.1 Hessians and local quadratic models
Definition 1.1 ( function). Let be open. A function is on , or twice continuously differentiable on , if each first partial derivative is on . Equivalently, all second partial derivatives of exist and are continuous on .
Definition 1.2 (Hessian). Let be open and let be differentiable. If the gradient is differentiable at , the Hessian of at is the Jacobian of its gradient, It is the matrix whose entry is
Example 1.3 (Computing a Hessian). Let be given by In Lecture 4 we computed The Hessian is the Jacobian of the gradient, so
Theorem 1.4 (Equality of mixed partials). Let be open and let be . Then for every and every . Thus is symmetric.
We use this result without proof. Importantly, it requires continuity of the second partial derivatives.
Theorem 1.5 (Second-order Taylor expansion). Let be open, let be , and let . For changes such that for every ,
We use this result without proof. It has exactly the form of the linear approximation in Lecture 4, with one additional term. The expression is the quadratic approximation to . The first-order approximation stops after the linear term and has a remainder negligible relative to . The second-order approximation keeps the quadratic term and has a remainder negligible relative to .
1.2 Quadratic forms and their shapes
The quadratic term of the Taylor approximation has the form . We next study expressions of this form, called quadratic forms. They are essentially quadratic polynomials in several variables. Like quadratic functions in one dimension, quadratic forms have a constant Hessian. That allows us to characterize all possible types of curvature in terms of the sign of the quadratic form.
Definition 1.6 (Quadratic form).
Let be a symmetric matrix. The function is the quadratic form associated with .
The restriction to symmetric matrices is without loss of generality. That is, if a quadratic form is associated with a nonsymmetric matrix , then the same quadratic form is associated with a symmetric matrix .
Next, the Hessian of equals . To see this, observe that so, using the symmetry , the th component of the gradient and the second partial are In matrix form, and which indeed does not depend on .
The sign of (which is a scalar) describes the possible shapes of the curvature of the quadratic form in .
Definition 1.7 (Definiteness). Let be a symmetric matrix. The matrix is indefinite if its quadratic form takes both positive and negative values.
To read the pictures, fix a direction and move through the origin along the line . Along this line, the quadratic form becomes the one-variable function , a parabola through the origin with second derivative The sign of therefore tells us whether this slice bends upward, bends downward, or is flat. Thus definiteness describes every one-dimensional slice through the origin. Positive definite means that every nonzero-direction slice bends upward, so the origin is the unique global minimum; negative definite means that every such slice bends downward, so the origin is the unique global maximum. A positive semidefinite form may be flat in some directions, while an indefinite form bends upward in some directions and downward in others, so the origin is neither a maximum nor a minimum. These are exactly the shapes in Figure 1.1.
1.3 Computational tests for definiteness
Checking definiteness of a matrix using the definition in Definition 1.7 requires evaluating for every nonzero ; that is not very practical.
Instead, this section introduces two types of tests that are easier to apply. The first uses eigenvalues, and the second uses determinants of submatrices.
For a diagonal matrix the check is immediate: a sum of squares weighted by the diagonal entries. If every , the sum is positive for every , so is positive definite; if every , the sum is nonnegative, so is positive semidefinite; the negative cases flip the inequalities. If some , then and , so is indefinite. The definiteness of a diagonal matrix is thus decided by the signs of its diagonal entries.
Recall the diagonalization theorem of Lecture 3: a matrix with independent eigenvectors can be written as , where the columns of are the eigenvectors and is the diagonal matrix of the corresponding eigenvalues; we also noted, without proof, that symmetric matrices always have independent eigenvectors. For symmetric matrices slightly more is true: the eigenvectors can be chosen so that — such a is called orthogonal — and the factorization becomes . This refinement is the spectral theorem, which we again use without proof. It reduces any symmetric matrix to the diagonal case: changing variables to turns into , and the diagonal computation above applies. This gives the first test.
Theorem 1.8 (Eigenvalue test). Let be a symmetric matrix. Then The matrix is indefinite if and only if it has eigenvalues of both signs.
Proof (optional). By the spectral theorem, write with and orthogonal, and put . Then Since is orthogonal, , so if and only if , and as ranges over so does . The quantity therefore has the same range of signs as over all . That sum is positive for every exactly when every : the “if” direction is immediate, and taking gives itself, which forces the “only if” direction. The other three cases are the same argument with the inequality changed, and the indefinite case follows by taking for eigenvalues of each sign. ◻
The second test requires no eigenvalues. Instead, it looks at the signs of the determinants of certain submatrices of .
Definition 1.9 (Principal minors). Let be an matrix. For a nonempty index set , let be the square matrix obtained by retaining the rows and columns whose indices belong to . The determinant is a principal minor of order when contains indices. The minors are the leading principal minors of .
In general, a minor of is the determinant of a submatrix obtained by retaining some rows and some columns; a minor is principal when the retained row and column index sets are the same set . For example, for a matrix , the index set retains rows and columns : and is a principal minor of order . Counting nonempty index sets, has principal minors. The three leading ones come from the sets , , and , so they grow from the top-left corner:
Definiteness can be read off the signs of these minors.
Theorem 1.10 (Principal-minor tests). Let be a symmetric matrix, and let be its leading principal minors.
is positive definite if and only if for every .
is negative definite if and only if for every .
is positive semidefinite if and only if every principal minor of is nonnegative.
is negative semidefinite if and only if every principal minor of order has sign satisfying
We use this result without proof. The first two parts are commonly called Sylvester’s criterion. Notice the difference between the definite and semidefinite cases: definite matrices require only the leading principal minors, while semidefinite matrices require all nonempty principal minors.
Example 1.11 (The tests).
Let Its leading principal minors are and , while all of its principal minors are , , and . Therefore For the positive-definite case, the first line can also be seen directly by completing the square (possible whenever ): If and , both coefficients are positive. Conversely, if is positive definite, evaluating at gives , and evaluating at gives .
The next example shows why the semidefinite tests need more than just the leading minors.
Example 1.12 (Weak leading-minor inequalities are insufficient).
Let . Its leading minors satisfy , but the principal minor indexed by is . Thus weak inequalities on the leading minors alone do not establish positive semidefiniteness. The missing principal minor detects the negative direction , along which .
Example 1.13 (A three-variable quadratic form).
Let be given by Its Hessian is whose leading principal minors are Thus equals , , and , respectively, so by Theorem 1.10 is negative definite. This establishes negative definiteness without computing any eigenvalues.
The tests apply equally when the Hessian entries are not constant.
Example 1.14 (A varying Hessian). Let be given by . Differentiating twice, which is diagonal with negative entries and hence negative definite at every , by Theorem 1.8. The Hessian varies with , but its definiteness does not.
In the last example of this section, definiteness depends on a parameter.
Example 1.15 (An interaction term). Fix and , and define by Here is constant. Direct differentiation gives The leading principal minors are and . Therefore Theorem 1.10 shows that is negative definite when . When , its two order-one principal minors are negative and its determinant is zero, so it is negative semidefinite. When , its determinant is negative, so it is indefinite: symmetry makes both eigenvalues real, and their negative product forces them to have opposite signs. The interaction term can therefore preserve, flatten, or overturn the downward curvature of the two squared terms.
At this point two exact tests are available: definiteness can be read off the signs of the eigenvalues (Theorem 1.8) or off the signs of the principal minors (Theorem 1.10). Often a full classification is unnecessary, and a cheaper observation settles the question. Table 1.1 collects these quick checks for the negative case; reversing every sign gives the positive case. A necessary condition can rule the property out but never establishes it.
| Check | Verdict |
|---|---|
| for every | necessary for negative semidefiniteness, not sufficient |
| for every | necessary for negative definiteness, not sufficient |
| for every | necessary for negative semidefiniteness, not sufficient |
| for every | equivalent to negative definiteness |
| some has | counterexample to negative semidefiniteness |
| some has | counterexample to negative definiteness |
| negative semidefinite and | sufficient for negative definiteness |
The diagonal checks follow by evaluating the quadratic form at the coordinate vectors, since . The reverse is not true in the first three rows: for example, passes both diagonal checks yet is indefinite. The last row follows from the eigenvalue test: the eigenvalues are nonpositive and their product is nonzero, so all of them are negative.
2 Convex sets and concave functions
2.1 Convex sets and preservation
The Hessian and Taylor expansion describe a function near one point. Turning their curvature information into a statement about the function everywhere requires moving between arbitrary points along the segment joining them. The domain must contain that segment.
Definition 2.1 (Convex combination and convex set). Let .
A convex combination of and is a point and the set of all of them is the line segment joining and .
A set is convex if
At the combination is and at it is , so a set is convex exactly when the segment joining any two of its points stays inside it. For example, itself, every affine subspace, every halfspace , and the orthants and are convex. The unit circle is not: it contains and but not their midpoint . Figure 2.1 shows the definition in .
Rather than verify Definition 2.1 for each new set, it is usually quicker to build the set out of convex pieces. An affine map has the form for an matrix and a vector .
Theorem 2.2 (Preservation rules). The following constructions preserve convexity.
The intersection of any collection of convex sets is convex.
The Cartesian product of convex sets is convex.
The image of a convex set under an affine map is convex.
The inverse image of a convex set under an affine map is convex.
Proof (optional). Intersections. Let with each convex, and let and . For each both and lie in , so Definition 2.1 puts in . Being in every , it lies in .
Products. Convex combinations in a product are taken coordinate block by coordinate block, so the claim follows by applying Definition 2.1 in each factor.
Affine maps. Let . Expanding, and recombining the two copies of as ,
so carries the segment joining and onto the segment joining and . If is convex, (2) exhibits every point between and as the image of a point of , so is convex. If is convex and , then (2) puts between and , hence in . ◻
A useful consequence of the preservation rules: any finite list of linear equalities and inequalities defines a convex set. The example below shows why.
Example 2.3 (Linear restrictions define a convex set).
Let be , let be , and let and . The set is convex, where the inequality is coordinatewise. Each row of these restrictions has the form or for some and . The set each restriction defines is the inverse image of the convex set or under the affine map . Part (4) of Theorem 2.2 makes each restriction convex, and part (1) makes their intersection convex.
2.2 Concavity and superlevel sets
Convexity of a set says that its line segments stay in the domain. Concavity then compares the height of a function along those same segments.
Definition 2.4 (Concave and convex functions). Let be convex and let .
is concave if
is strictly concave if that inequality is strict whenever and .
is convex if is concave, and strictly convex if is strictly concave.
The right-hand side is the height at of the chord joining the two points and on the graph, so a concave function lies on or above each of its chords. This is the global version of bending downward: it compares any two points, not only nearby ones. Strict concavity additionally forbids the graph from containing a line segment. If and , the affine function satisfies Definition 2.4 with equality, by the computation (2). Thus it is both concave and convex, and neither strictly.
Concavity is a statement about the graph. It also imposes structure on the sets of points at which the function is at least as large as a given level.
Definition 2.5 (Superlevel set). Let , let , and let . The superlevel set of at level is
Theorem 2.6 (Superlevel sets of a concave function). If is convex and is concave, then is convex for every .
Proof. Let and , and put . Convexity of puts in by Definition 2.1, and Definition 2.4 gives the second inequality because and by Definition 2.5. Hence . ◻
2.3 Quasiconcavity
The proof of Theorem 2.6 used concavity only to keep above , never to keep it above the weighted average. Demanding just the conclusion gives a weaker property, and it is the one that many results actually need.
Definition 2.7 (Quasiconcavity). Let be convex. A function is quasiconcave if is convex for every .
In one variable, the convex sets are the intervals, so quasiconcavity requires each superlevel set to be an interval. Figure 2.3 shows a single-peaked function that passes this test and a two-peaked function that fails it.
Quasiconcavity can also be stated as an inequality along segments, parallel to Definition 2.4 but with the minimum in place of the weighted average.
Theorem 2.8 (Minimum characterization). Let be convex. A function is quasiconcave if and only if
Proof. Convex superlevel sets imply the inequality. Let and , and put . Then by Definition 2.5, and that set is convex by Definition 2.7, so , which is the inequality.
The inequality implies convex superlevel sets. Fix and let and . Then by Definition 2.1, and so the point lies in . ◻
Concavity implies quasiconcavity, since a weighted average of and is at least their minimum, so Definition 2.4 gives the inequality of Theorem 2.8. The converse fails.
Example 2.9 (Quasiconcave but not concave). Let be given by . Since is increasing, each superlevel set is the interval , which is convex, so is quasiconcave by Definition 2.7. It is not concave: taking the midpoint of and , which violates Definition 2.4.
What made Example 2.9 work is that is an increasing relabelling of the values of , and quasiconcavity, unlike concavity, survives any such relabelling.
Theorem 2.10 (Increasing transformations). Let be convex, let be quasiconcave, and let be nondecreasing. Then is quasiconcave.
Proof. Let and . Applying to the inequality of Theorem 2.8 preserves it, because is nondecreasing, so the equality because a nondecreasing sends the smaller of two numbers to the smaller of their images. By Theorem 2.8 again, is quasiconcave. ◻
3 Concavity criteria, global optimality, and separation
3.1 Restriction to line segments
To decide whether a function of variables is concave, we reduce the question to one variable. The reduction rests on three results: concavity of is equivalent to concavity of its restriction to every line segment of the domain (Lemma 3.1); such a restriction has second derivative (Theorem 3.2); and a one-variable function is concave exactly when its second derivative is nonpositive (Lemma 3.3).
Lemma 3.1 (Line-segment restriction). Let be convex and let . For let and Then is concave if and only if is concave on for every choice of , and is strictly concave if and only if is strictly concave for every choice of with .
Proof (optional). Concavity of implies concavity of every . Fix and let and . The point is the convex combination of two points of , so Definition 2.4 gives
Concavity of every implies concavity of . Given and , take and above. Since and ,
For the strict statements, note that makes , so distinct values of give distinct points ; both displays above then hold with strict inequalities under the corresponding strict hypothesis. ◻
For a function of one variable, the second derivative tells us whether the graph bends upward or downward. For a function of several variables, the input can move in many directions, and the curvature may depend on the direction. We therefore restrict the function to the line and study it as a function of the single variable . Figure 3.1 shows the construction.
Theorem 3.2 (Directional curvature). Let be open, let be , let , and let . Put for those with . Then
Proof (optional). Define the curve by Its th coordinate is the affine function , whose derivative is . Therefore .
Fix any such that . Because is open, there is such that . If , then whenever . If , then for every . In either case, is defined on an open interval containing . Since , the derivative-along-a-curve formula from Lecture 4 gives
For each , define by Because is , each is and hence differentiable. Applying the same derivative-along-a-curve formula to gives where the second equality follows from the definition of the Hessian. For every in the open interval above, the formula for the first derivative can be written as Since each is constant, differentiating this equality at gives which equals by the definition of matrix multiplication. Since was arbitrary, both formulas hold for every in the domain of . ◻
Thus is the second derivative of along the line through in direction : the Hessian measures curvature one direction at a time, just as the gradient measures slope one direction at a time. We use this result below to relate the signs of across directions to concavity, and in Lecture 6 to derive necessary second-order conditions for a local optimum.
Finally, we state the one-variable second-derivative test.
Lemma 3.3 (One-variable second-derivative test). Let be an interval, and suppose is twice continuously differentiable on an open interval containing . Then is concave on if and only if for every . If for every , then is strictly concave.
We use this result without proof.
The second half of the statement does not reverse: a strictly concave may have somewhere, as does at .
3.2 Tangent and Hessian criteria
The first criterion replaces the chord inequality by a comparison with the tangent plane at one point.
Theorem 3.4 (Tangent characterization). Let be open and convex, and let be differentiable. Then is concave if and only if
Proof (optional). Concavity implies (3). Let and . By Definition 2.4 applied to and , and subtracting and dividing by gives As decreases to zero the left-hand side tends to , where , and the chain rule gives . The inequality passes to the limit, which is (3).
(3) implies concavity. Let , let , and put , which lies in because is convex. Applying (3) at the point to each of and , Multiply the first by and the second by and add. The gradient terms combine into , which is zero by the definition of , leaving . ◻
A differentiable concave function thus lies on or below each of its tangent planes. Note that the right-hand side of (3) uses the value and gradient of at the point only, yet it bounds everywhere. Figure 3.2 shows the inequality in one variable.
The second criterion uses the Hessian. Negative semidefiniteness means that every line restriction bends downward or remains flat.
Theorem 3.5 (Hessian characterization). Let be open and convex, and let be .
is concave if and only if is negative semidefinite for every .
If is negative definite for every , then is strictly concave.
The corresponding statements for convexity reverse every sign.
Proof (optional). Negative semidefinite implies concave. Fix , put , and let as in Lemma 3.1. By openness of , this restriction is on an open interval containing . By Theorem 3.2, , which is at most by Definition 1.7. So is concave by Lemma 3.3, and since and were arbitrary, is concave by Lemma 3.1.
Concave implies negative semidefinite. Fix and . Since is open, for every in some open interval containing . The restriction is concave by Lemma 3.1, so Lemma 3.3 gives . By Theorem 3.2, Since was arbitrary, is negative semidefinite.
Negative definite implies strictly concave. Fix distinct , put , and let . The direction is nonzero, so throughout by Theorem 3.2 and Definition 1.7. Hence Lemma 3.3 makes strictly concave. Since and were arbitrary, Lemma 3.1 makes strictly concave. ◻
Part (2) does not reverse, for the same reason Lemma 3.3 does not: is strictly concave on while . Negative definiteness is sufficient for strict concavity, never necessary.
3.3 Global optimality and uniqueness
For concave functions, a first-order condition at a single point is sufficient for a global maximum.
Corollary 3.6 (First-order sufficiency). Let be open and convex, let be convex, and let be differentiable and concave. If satisfies
then maximizes on . If is strictly concave, then is the only maximizer.
Proof. For , Theorem 3.4 at the point and then (4) give
Uniqueness. Suppose is strictly concave and both maximize on , with common value . Their midpoint lies in by Definition 2.1, and Definition 2.4 gives , contradicting that is the maximum. ◻
In particular, any with satisfies (4). It is therefore a global maximizer of a concave function, and under strict concavity it is the only one. The more general inequality (4) also allows to lie on the boundary of , where the gradient need not vanish.
Example 3.7 (Maximizing a strictly concave quadratic).
Fix and with , and define by Its Hessian has leading principal minors and , so it is negative definite by Theorem 1.10. Hence is strictly concave on by Theorem 3.5. Setting gives By Corollary 3.6, is the unique global maximizer of over . The first-order equations produce the candidate; strict concavity is what makes it the answer.
3.4 Separation
We end with a geometric consequence of convexity. Separating hyperplanes place two convex sets in opposite halfspaces.
Definition 3.8 (Hyperplane). Let and . The hyperplane with normal at level is and its two closed halfspaces are and .
Theorem 3.9 (Separating hyperplane). Let be nonempty, disjoint, and convex. There exist and such that
We use this result without proof.
The two sets lie in opposite closed halfspaces of . The inequalities are weak: the common level may be approached, or even attained, by points of the two sets. Figure 3.3 shows the configuration in .
Example 3.10 (No gap between the sets). Let and , which are nonempty, disjoint, and convex. Taking and gives Thus the sets are separated by the level , but there is no positive gap between their separating levels: points of have second coordinate arbitrarily close to .
A positive gap therefore requires hypotheses beyond disjointness.