Convex Sets, Convex Functions, and Convexity-Preserving Operations
Anchor (Master): Rockafellar 1970 Convex Analysis (Princeton) §4-§9, §16, §19; Hiriart-Urruty & Lemaréchal 2001 Fundamentals of Convex Analysis (Springer) Ch. A-C; Boyd & Vandenberghe 2004 Convex Optimization (Cambridge) §2-§3
Intuition Beginner
A set of points is convex when, for any two points you pick inside it, the entire straight line segment joining them also stays inside. A filled disk is convex; a crescent moon is not, because you can find two points in the crescent whose connecting segment pokes out into the empty bite. This one rule — no shortcuts leave the set — is the whole idea, and almost everything in optimization is built to keep it true.
A convex function is the matching idea for a curve or surface. Picture a bowl. If you mark two points on the bowl and stretch a straight string between them, the string never dips below the bowl's surface; it always rides on or above it. Functions whose graphs cup upward like a bowl are convex. The squared-distance function, the absolute value, and the exponential all cup this way.
Why does this matter so much? Because for a bowl-shaped landscape, every valley is the valley. There are no false bottoms, no side pockets where you could get stuck thinking you have found the lowest point. If you keep walking downhill, you reach the global minimum. That single guarantee is why convex problems are the ones we can actually solve, reliably and at scale, while general problems hide traps everywhere.
The catch is recognizing convexity in the wild. A real modeling problem arrives as a tangle of sums, maximums, and compositions, not as a tidy bowl. So the practical skill is a bookkeeping one: you learn a short list of building blocks that are convex, plus a list of operations — adding, taking maximums, certain rescalings — that turn convex pieces into convex wholes. Then you assemble your model from safe parts and certify the whole thing is convex without ever drawing it.
This unit is that toolkit. It defines the sets and functions precisely, gives the tests for spotting them, and catalogs the operations that preserve convexity, so the rest of optimization can stand on top.
Visual Beginner
Figure: on the left, two regions. A filled ellipse is marked "convex" with a segment drawn between two interior points lying wholly inside. A crescent is marked "not convex" with a segment between its two horns cutting through the empty notch. On the right, a bowl-shaped curve with a chord drawn between two points on it; the chord sits entirely above the curve, illustrating that the function value at any in-between point is below the straight-line average of the endpoint values.
CONVEX SET NOT CONVEX CONVEX FUNCTION
.-''''-. _.-. .-._ | chord lies
/ *--* \ / \ X / \ | above the curve
| / \ | | \ / | | *. .*
| *----* | | X | | '. .' <- chord
\ / \ / \ / | '..'
'-....-' '--' '--' +----------------- x
segment stays segment cuts f(avg) <= avg of f's
inside outside
Worked example Beginner
Take the function and check the bowl property at two specific points, then read off the consequence.
Step 1. Pick two points. Use and . Their function values are and .
Step 2. Find the midpoint of the segment. The midpoint of and is . The straight-line (chord) height above is the average of the endpoint heights: .
Step 3. Compare with the actual curve. The curve's own value at is . Since is below , the curve dips beneath the chord exactly as a bowl should.
Step 4. Try an off-center point too. Take the point one quarter of the way from to : . The chord height there is . The curve value is , again below the chord's .
What this tells us. At every test point the parabola sits on or below the straight line connecting its endpoints. That is the defining inequality of a convex function, checked by hand. Because passes this test for every pair of points, its single lowest point at is the one and only minimum — no other dip can exist.
Check your understanding Beginner
Formal definition Intermediate+
Throughout, the ambient space is with the standard inner product and Euclidean norm .
Definition (convex set). A set is convex if for all and all the point lies in . The point is a convex combination of and ; more generally a convex combination of is with and . A set is convex if and only if it contains every convex combination of finitely many of its points [Rockafellar §2].
Definition (basic convex sets). A hyperplane is a set for , ; a halfspace is (see 01.01.18). Hyperplanes and halfspaces are convex. A polyhedron is a finite intersection of halfspaces. The convex hull of a set is the smallest convex set containing , equivalently the set of all convex combinations of points of . A set is a cone if and imply ; it is a convex cone if additionally it is closed under addition, i.e. .
Definition (convex function). A function is convex if its effective domain is convex and, for all and ,
It is strictly convex if the inequality is strict for and , and concave if is convex. The epigraph is , and the -sublevel set is .
Definition (quasiconvex, log-convex). A function is quasiconvex if every sublevel set is convex; equivalently . A positive function is log-convex if is convex, and log-concave if is concave [Boyd & Vandenberghe §3.4-§3.5].
The epigraph is the load-bearing object: is convex if and only if is a convex subset of . This converts every statement about convex functions into a statement about convex sets, and it is why the two halves of the theory are one theory.
Counterexamples to common slips
- Convex sublevel sets do not force a convex function. The function has sublevel sets , all convex intervals, so is quasiconvex; but is not convex, since its graph bulges above the chord near . Quasiconvexity is strictly weaker than convexity.
- A nonconvex domain breaks the definition before the inequality does. A function defined only on cannot be called convex regardless of its formula, because the annular domain is not convex; the convex-combination may leave the domain entirely.
- Pointwise minimum is not convexity-preserving. With and , both convex, the pointwise minimum has a nonconvex double-well graph. Maxima preserve convexity; minima generally do not.
Key theorem with proof Intermediate+
The central Intermediate result packages the three working characterizations of convexity for differentiable functions, then proves the second-order (Hessian) test that drives every modeling check downstream.
Theorem (characterizations of convexity). Let with convex open domain .
(i) (Zeroth order — epigraph.) is convex if and only if is a convex set.
(ii) (First order.) If is differentiable, is convex if and only if for all ,
(iii) (Second order.) If is twice differentiable, is convex if and only if its Hessian is positive semidefinite (PSD) for every .
Proof of (i). Suppose is convex and take , so , . For , convexity gives , so ; the epigraph is convex. Conversely, if is convex, apply convexity of the set to the points and to recover the defining inequality.
Proof of (ii). Assume convexity. Fix and . The convexity inequality rearranges to
Letting , the left side tends to the directional derivative (this is the definition of the gradient applied along , valid because is open; see 02.05.05), giving , which is the claimed supporting-line inequality. Conversely, assume the first-order inequality holds everywhere. Fix , set , and apply the inequality twice, at toward and toward :
Multiply the first by , the second by , and add. The gradient terms combine to , leaving , which is convexity.
Proof of (iii). Assume everywhere. By the second-order Taylor expansion with integral remainder (from 02.05.05), for ,
The integrand is nonnegative because each Hessian is PSD (the quadratic form ; see 01.01.15), so , and by part (ii) is convex. Conversely, suppose is convex and fix and a direction . The scalar function is convex on an open interval about , so (a convex function of one variable has nonnegative second derivative). As was arbitrary, is PSD by the quadratic-form sign criterion of 01.01.15 and the spectral characterization of PSD matrices in 01.01.13.
Bridge. This theorem builds toward the entire convexity-detection workflow of optimization and appears again in the optimality conditions of 44.02.01, where the first-order inequality becomes the statement that a stationary point is a global minimizer. This is exactly the bridge between calculus and convex geometry: the analytic PSD-Hessian test of 02.05.05 is dual to the geometric epigraph condition, with the first-order inequality as the supporting hyperplane that links them. The foundational reason convex problems have no spurious local minima is part (ii): a zero gradient forces for all , so a critical point is automatically global. Putting these together, the PSD criterion of 01.01.13 and 01.01.15 gives a mechanical certificate of convexity for any smooth model, which the operation calculus below extends to nonsmooth and composite functions, and which generalises to the subgradient inequality once differentiability is dropped.
Exercises Intermediate+
Advanced results Master
Carathéodory, Minkowski, and the extreme-point structure of convex hulls
The convex hull in is finitely generated pointwise. Carathéodory's theorem states that every point of is a convex combination of at most points of [Rockafellar §17]. For a compact convex set , the Krein-Milman theorem in finite dimensions sharpens to the Minkowski theorem: is the convex hull of its extreme points, where is extreme if it is not the midpoint of any nondegenerate segment in . The interplay of these two — a compact convex set is generated by finitely many extreme points per point, and equals the hull of all of them — underlies the vertex enumeration of polyhedra and the fundamental theorem of linear programming, that a linear objective attains its optimum at an extreme point.
Supporting hyperplanes and the dual description of convex sets
A closed convex set has two equivalent descriptions: as the convex hull of its extreme points (inner, generative) and as the intersection of all halfspaces containing it (outer, dual). The bridge is the supporting-hyperplane theorem: at every boundary point of a convex set with nonempty interior there is with for all . Equivalently, the support function — convex, positively homogeneous, and the conjugate of the indicator — encodes completely, with when is closed convex. This dual description is the modeling content the conjugacy machinery of large-deviations rate functions 37.07.03 consumes, and the separation theorem it rests on is the geometric Hahn-Banach result of 02.11.02, here specialized to finite dimensions where it requires no choice principle.
Cones, the recession cone, and the dual cone
For a convex set , the recession cone records the directions of unbounded escape; is bounded iff , and a closed convex set is compact iff its recession cone reduces to the zero vector. For a convex cone , the dual cone is convex and closed, with . Self-dual cones — the nonnegative orthant , the second-order (Lorentz) cone , and the positive-semidefinite cone under the trace inner product — are the three pillars on which conic programming 44.05.01 is built, the PSD case resting directly on the spectral characterization of 01.01.13.
Operation-preserving calculus as a disciplined modeling atom library
The operations established in the exercises — nonnegative weighted sums, pointwise suprema, affine precomposition, perspective, partial minimization, monotone-convex composition — form a closed calculus. The vector composition rule generalizes Exercise 8: for with convex, is convex provided that, for each coordinate , either is nondecreasing in argument and is convex, or is nonincreasing in argument and is concave (with affine voiding the monotonicity requirement). This rule, applied recursively to an expression tree of certified atoms, is exactly the disciplined convex programming ruleset of modeling languages; a model is certified convex when its parse tree is built from convex/concave atoms combined by these sign-and-monotonicity-respecting operations, with no appeal to drawing the function or checking a Hessian.
Synthesis. The epigraph identity is exactly the device that generalises every set-level convexity statement to a function-level one and back: intersection of epigraphs is the pointwise supremum, projection of an epigraph is partial minimization, and the linear image of an epigraph is the perspective. The central insight of this unit is that convexity is compositional — a small library of convex atoms closed under a fixed list of operations certifies convexity of arbitrarily complex models, which is dual to the dual-cone and support-function descriptions that certify the same sets from the outside. The foundational reason this matters is that convexity is precisely the property making local optimality global, so the calculus is a correctness certificate for the solvability of the whole optimization-control section; putting these together, the PSD-Hessian test of 01.01.13 and 02.05.05 seeds the leaf atoms, the operation rules propagate convexity up the tree, and the supporting-hyperplane and dual-cone structure appears again in the duality and KKT theory of 44.02.01 and the conic programs of 44.05.01. The bridge is the epigraph: it is the single object through which the geometry of convex sets and the analysis of convex functions are one subject.
Full proof set Master
Proposition 1 (sublevel sets of a convex function are convex; the converse fails). If is convex then every sublevel set is convex. The converse does not hold: convex sublevel sets characterize quasiconvexity, a strictly weaker property.
Proof. Let and . Then , so . For the failure of the converse, has every sublevel set equal to the interval (convex), yet is not convex since while , and although here the inequality happens to hold, taking , gives , violating convexity. Convex sublevel sets are equivalent to the quasiconvexity inequality .
Proposition 2 (Jensen's inequality). Let be convex and an integrable -valued random vector with . Then .
Proof. Assume first differentiable. The first-order condition at gives pointwise. Taking expectations, , since . For general convex , replace the gradient by any subgradient , which exists at the interior point by the supporting-hyperplane theorem applied to at ; the same expectation argument gives . The finite-average case with probabilities recovers , the discrete form due to Jensen [Jensen 1906].
Proposition 3 (the PSD cone is a self-dual convex cone). The set of symmetric positive-semidefinite matrices is a closed convex cone, and under the trace inner product it is self-dual: .
Proof. Closure under nonnegative scaling is immediate, and for and , , so ; thus is a convex cone. It is closed because iff for all , an intersection of closed halfspaces in matrix space. For self-duality, first let and . By the spectral theorem 01.01.13 write with ; then , so . Conversely, suppose satisfies for all . Testing against the rank-one matrices gives for all , so (after symmetrizing , since the trace form pairs symmetric matrices). Hence , and the two coincide.
Proposition 4 (log-convexity is closed under products and is stronger than convexity). If are log-convex then is log-convex, and any sum of log-convex functions is log-convex. Every log-convex function is convex.
Proof. Log-convexity of means is convex. For the product, is a sum of convex functions, hence convex, so is log-convex. For the sum : by the weighted arithmetic-geometric / Hölder inequality, for ,
the last step being Hölder's inequality applied to the two-term sums; taking logarithms gives convexity of . Finally, if is convex then is the composition of the convex nondecreasing with the convex , hence convex by the composition rule (Exercise 8). The converse fails: on is convex but is concave, so is not log-convex.
Connections Master
The Legendre-Fenchel transform and convex duality of
37.07.03take the epigraph and support-function structure built here as their domain: the conjugate is the support function of read off slope-by-slope, and the biconjugation theorem is precisely the outer dual description (intersection of supporting halfspaces) of the convex epigraph specialized to functions.The geometric Hahn-Banach separation theorem of
02.11.02is the infinite-dimensional source of the supporting-hyperplane and separating-hyperplane theorems used throughout this unit; in those theorems need no choice principle, but the supporting-hyperplane existence that gives subgradients in Proposition 2 and the dual-cone identity in Proposition 3 are the finite-dimensional shadow of that result.The PSD-Hessian convexity test rests on the spectral theorem and the positive-semidefinite criterion of
01.01.13and the quadratic-form sign analysis of01.01.15; a smooth model is certified convex exactly when its Hessian lies in the self-dual cone at every point, tying convex modeling to the eigenvalue structure of symmetric matrices.The convex-duality and KKT optimality theory of
44.02.01consumes the first-order characterization (a critical point of a convex function is a global minimizer) and the supporting-hyperplane structure as the foundation of Lagrangian duality, while the conic and semidefinite programs of44.05.01specialize the cone and dual-cone material to the orthant, Lorentz, and PSD cones.
Historical & philosophical context Master
Systematic convexity entered analysis through the work on inequalities at the turn of the twentieth century. Johan Jensen's 1906 paper in Acta Mathematica [Jensen 1906] (volume 30, 175-193) isolated the midpoint inequality as the defining feature of a class of functions and derived from it the chain of mean inequalities, giving convex functions their first dedicated treatment and the inequality that now bears his name. The geometry of convex bodies was developed in parallel by Hermann Minkowski [Minkowski 1896] in Geometrie der Zahlen, where the support function, the gauge (Minkowski functional), and the supporting-hyperplane theorem were introduced as tools in the geometry of numbers, alongside the mixed-volume theory that later seeded the Brunn-Minkowski inequality.
The synthesis into a self-contained discipline is due to R. Tyrrell Rockafellar, whose Convex Analysis [Rockafellar §1-§19] (Princeton, 1970) organized convex sets, convex functions, conjugacy, and subdifferentials around the epigraph and the duality of inner (generative) and outer (separating-halfspace) descriptions, building on Fenchel's 1949 conjugate-function duality and Moreau's infinite-dimensional extensions. The translation of this analytic theory into a computational and modeling discipline came with the interior-point revolution of the 1980s and 1990s and was codified for practitioners by Boyd and Vandenberghe [Boyd & Vandenberghe §2-§3] (Cambridge, 2004), whose operation-preserving calculus is the disciplined-convex-programming ruleset that automated convexity verification in modern modeling languages.
Bibliography Master
@book{boyd2004convex,
author = {Boyd, Stephen and Vandenberghe, Lieven},
title = {Convex Optimization},
publisher = {Cambridge University Press},
year = {2004}
}
@book{rockafellar1970convex,
author = {Rockafellar, R. Tyrrell},
title = {Convex Analysis},
series = {Princeton Mathematical Series},
number = {28},
publisher = {Princeton University Press},
year = {1970}
}
@book{hiriarturruty2001fundamentals,
author = {Hiriart-Urruty, Jean-Baptiste and Lemar\'echal, Claude},
title = {Fundamentals of Convex Analysis},
series = {Grundlehren Text Editions},
publisher = {Springer},
year = {2001}
}
@article{jensen1906convexes,
author = {Jensen, Johan L. W. V.},
title = {Sur les fonctions convexes et les in\'egalit\'es entre les valeurs moyennes},
journal = {Acta Mathematica},
volume = {30},
pages = {175--193},
year = {1906}
}
@book{minkowski1910geometrie,
author = {Minkowski, Hermann},
title = {Geometrie der Zahlen},
publisher = {Teubner},
address = {Leipzig},
year = {1910}
}
@book{hiriarturruty1993convex,
author = {Hiriart-Urruty, Jean-Baptiste and Lemar\'echal, Claude},
title = {Convex Analysis and Minimization Algorithms I},
series = {Grundlehren der mathematischen Wissenschaften},
number = {305},
publisher = {Springer},
year = {1993}
}