Convex Set

RawGraph

Last edited

Fact-checked

In review queue

Sources

23 citations

Revision

v6 · 5,309 words

Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify

A convex set is a set of points in which the line segment connecting any two points of the set lies entirely within the set [1][3]. Formally, a set CC in a real vector space is convex if, for every pair of points x\mathbf{x} and y\mathbf{y} in CC and every scalar λ\lambda with 0λ10 \le \lambda \le 1, the point λx+(1λ)y\lambda\mathbf{x} + (1 - \lambda)\mathbf{y} also belongs to CC [1]. Convex sets are foundational objects in convex optimization, machine learning, and mathematical analysis, because a problem of minimizing a convex function over a convex set has the property that every local minimum is also a global minimum [1].

The practical importance of convexity is captured by a widely quoted remark from R. Tyrrell Rockafellar: "the great watershed in optimization isn't between linearity and nonlinearity, but convexity and nonconvexity" [23]. As Stephen Boyd and Lieven Vandenberghe put it in their standard textbook, "a set C is convex if the line segment between any two points in C lies in C" [1].

The study of convex sets sits at the crossroads of geometry, linear algebra, and analysis. Modern treatments trace back to the work of Hermann Minkowski in the late 19th century, the foundational text Convex Analysis by R. Tyrrell Rockafellar (Princeton, 1970) [2], and the widely used graduate textbook Convex Optimization by Stephen Boyd and Lieven Vandenberghe (Cambridge University Press, 2004) [1]. These references continue to shape how convex sets are taught and applied across mathematics, statistics, control theory, and machine learning.

What is the mathematical definition of a convex set?

A set CC in Rn\mathbb{R}^n is convex if, for every pair of points x\mathbf{x} and y\mathbf{y} in CC and every scalar λ\lambda with 0λ10 \le \lambda \le 1, the point

λx+(1λ)yC\lambda \mathbf{x} + (1 - \lambda)\mathbf{y} \in C

holds [1][3]. In other words, the weighted average of any two points in the set also belongs to the set. The scalar λ\lambda traces out the line segment from y\mathbf{y} (at λ=0\lambda = 0) to x\mathbf{x} (at λ=1\lambda = 1), and the definition requires every point along that segment to remain inside C [1].

This definition extends naturally to convex combinations of more than two points. A point of the form

θ1x1+θ2x2++θkxk,where θ1+θ2++θk=1 and each θi0\theta_1\mathbf{x}_1 + \theta_2\mathbf{x}_2 + \cdots + \theta_k\mathbf{x}_k, \quad \text{where } \theta_1 + \theta_2 + \cdots + \theta_k = 1 \text{ and each } \theta_i \ge 0

is called a convex combination of x₁, ..., x_k [1]. A set is convex if and only if it contains all convex combinations of its points. By induction on k, a two-point definition is enough to imply the general k-point version, which is one of the reasons the original line-segment definition is so compact [1].

The definition is purely algebraic: it depends only on addition and scalar multiplication, not on a metric or inner product. As a result, the concept of convexity carries over to any real or rational vector space and underpins much of convex analysis in infinite-dimensional settings such as Hilbert spaces and locally convex topological vector spaces [2].

What are examples of convex sets?

Convex sets appear throughout mathematics and applied fields. The table below lists the most commonly encountered families [1][7].

Convex SetDefinitionNotes
Hyperplane{xRn:ax=b}\{\mathbf{x} \in \mathbb{R}^n : \mathbf{a}^\top\mathbf{x} = b\}, where a0\mathbf{a} \ne 0A flat surface of dimension n1n - 1; divides Rn\mathbb{R}^n into two half-spaces
Half-space{xRn:axb}\{\mathbf{x} \in \mathbb{R}^n : \mathbf{a}^\top\mathbf{x} \le b\}The region on one side of a hyperplane; always convex and closed
Euclidean ball{xRn:xx02r}\{\mathbf{x} \in \mathbb{R}^n : \lVert \mathbf{x} - \mathbf{x}_0 \rVert_2 \le r\}A sphere and its interior centered at x0\mathbf{x}_0 with radius rr
Ellipsoid{x:(xx0)P1(xx0)1}\{\mathbf{x} : (\mathbf{x} - \mathbf{x}_0)^\top P^{-1} (\mathbf{x} - \mathbf{x}_0) \le 1\}, P symmetric positive definiteA stretched or compressed ball; reduces to a ball when P=r2IP = r^2 I
Polyhedron{x:Axb,Cx=d}\{\mathbf{x} : A\mathbf{x} \le \mathbf{b}, C\mathbf{x} = \mathbf{d}\}Intersection of finitely many half-spaces and hyperplanes; includes polytopes
PolytopeBounded polyhedron, equivalently the convex hull of a finite point setStudied extensively in linear programming and combinatorics
Norm ball{x:xx0r}\{\mathbf{x} : \lVert \mathbf{x} - \mathbf{x}_0 \rVert \le r\} for any norm \lVert \cdot \rVertConvex for every valid norm (L1, L2, L-infinity, etc.)
Probability simplex{xRn:xi0,xi=1}\{\mathbf{x} \in \mathbb{R}^n : x_i \ge 0, \sum x_i = 1\}The set of all discrete probability distributions on n outcomes
Standard simplexconv({0,e1,,en})\operatorname{conv}(\{0, e_1, \ldots, e_n\})Convex hull of the origin and standard basis vectors
Positive semidefinite (PSD) cone{XSn:X0}\{X \in \mathbb{S}^n : X \succeq 0\} (all eigenvalues 0\ge 0)A convex cone in the space of symmetric matrices; central to semidefinite programming
Second-order cone{(x,t)Rn×R:x2t}\{(\mathbf{x}, t) \in \mathbb{R}^n \times \mathbb{R} : \lVert \mathbf{x} \rVert_2 \le t\}Also called the Lorentz cone or ice-cream cone; used in SOCP
Nonnegative orthant{xRn:xi0 for all i}\{\mathbf{x} \in \mathbb{R}^n : x_i \ge 0 \text{ for all } i\}The natural feasible region for nonnegativity constraints
Affine subspace{x:Ax=b}\{\mathbf{x} : A\mathbf{x} = \mathbf{b}\}Solution set of a system of linear equations; a special case of a polyhedron

Several trivial but important cases deserve mention: the empty set, any single point, and the entire space R^n are all convex [1]. Lines, line segments, rays, and any subspace of R^n are also convex [1].

What are examples of non-convex sets?

Recognizing non-convex sets is just as useful as knowing the convex ones. A set is non-convex whenever you can find two points inside it whose connecting line segment passes outside the set [3].

Common non-convex examples include:

  • Annulus (ring shape): the region between two concentric circles. Two points on opposite sides of the inner hole can be connected by a segment that passes through the hole.
  • Star shape (non-convex polygon): a five-pointed star has dents where the line segment between two tips passes outside the star.
  • Union of disjoint intervals: on the real line, the set [0,1][2,3][0, 1] \cup [2, 3] is non-convex because the segment between 0.5 and 2.5 includes points not in the set.
  • Discrete point sets: any finite set of two or more isolated points is non-convex.
  • Crescent (moon shape): the difference of two overlapping disks creates a concavity where segments can escape the set.
  • Punctured disk: a closed ball with a single interior point removed is not convex, because any chord through the missing point exits the set.
  • Graph of a non-convex function (epigraph counterexample): the region above the graph of sin(x)\sin(x) on the real line is non-convex.

What properties do convex sets have?

Is the intersection of convex sets convex?

The intersection of any collection of convex sets (finite or infinite) is itself convex [1][3]. This property is used constantly in optimization: the feasible region of a problem with multiple convex constraints is the intersection of the individual constraint sets, and that intersection is guaranteed to be convex [1].

Note that the union of convex sets is generally not convex. For example, the union of two disjoint line segments is non-convex. A useful exception is when one set is contained in another: if ABA \subseteq B and both are convex, then AB=BA \cup B = B is convex.

Are the closure and interior of a convex set convex?

If C is convex, then both its closure (adding boundary points) and its interior (removing boundary points) are also convex [2]. This is useful in analysis when switching between open and closed formulations of a problem. The relative interior of a convex set, defined as the interior taken inside the affine hull of the set, is also convex and plays a central role in convex analysis when the set has no full-dimensional interior in R^n [2].

How do affine transformations affect convexity?

Convexity is preserved under affine mappings [1]. If C is convex and f(x)=Ax+bf(\mathbf{x}) = A\mathbf{x} + \mathbf{b} is an affine function, then the image f(C)={Ax+b:xC}f(C) = \{A\mathbf{x} + \mathbf{b} : \mathbf{x} \in C\} is convex. Likewise, the preimage f1(C)={x:Ax+bC}f^{-1}(C) = \{\mathbf{x} : A\mathbf{x} + \mathbf{b} \in C\} is convex [1]. Projections, linear transformations, and translations therefore all preserve convexity.

What is the Minkowski sum of convex sets?

The Minkowski sum of two sets S1S_1 and S2S_2 is defined as S1+S2={x1+x2:x1S1,x2S2}S_1 + S_2 = \{\mathbf{x}_1 + \mathbf{x}_2 : \mathbf{x}_1 \in S_1, \mathbf{x}_2 \in S_2\}. If both S1S_1 and S2S_2 are convex, their Minkowski sum is also convex [1]. This operation is used to model uncertainty (where the second set represents a perturbation), to compute reachable sets in control theory, and to define convolution structures in geometry.

How do perspective and linear-fractional maps preserve convexity?

The perspective function P:Rn+1RnP: \mathbb{R}^{n+1} \to \mathbb{R}^n defined by P(z,t)=z/tP(\mathbf{z}, t) = \mathbf{z} / t with domain t>0t > 0 preserves convexity in both directions [1]. As a consequence, linear-fractional functions of the form f(x)=(Ax+b)/(cx+d)f(\mathbf{x}) = (A\mathbf{x} + \mathbf{b}) / (\mathbf{c}^\top\mathbf{x} + d) on the half-space {x:cx+d>0}\{\mathbf{x} : \mathbf{c}^\top\mathbf{x} + d > 0\} also preserve convexity [1]. Boyd and Vandenberghe devote a section of their textbook to these maps because they appear in many engineering applications [1].

Which operations preserve convexity?

A central practical question in convex analysis is: which operations on sets keep them convex? The table below summarizes the most useful operations and the conditions under which they preserve convexity [1].

OperationPreserves Convexity?Notes
IntersectionYes, alwaysWorks for any collection, finite or infinite
UnionNo, in generalException: nested or chained collections
Affine imageYesf(x)=Ax+bf(\mathbf{x}) = A\mathbf{x} + \mathbf{b} maps convex to convex
Affine preimageYesThe preimage of a convex set under an affine map is convex
Cartesian productYesC1×C2C_1 \times C_2 is convex if both C1C_1 and C2C_2 are convex
Minkowski sumYesThe pointwise sum of convex sets stays convex
Scalar multiplicationYesαC={αx:xC}\alpha C = \{\alpha\mathbf{x} : \mathbf{x} \in C\} is convex for any αR\alpha \in \mathbb{R}
ClosureYesThe closure of a convex set is convex
InteriorYesThe interior of a convex set is convex
Perspective mapYesP(z,t)=z/tP(\mathbf{z}, t) = \mathbf{z} / t with t>0t > 0
Linear-fractional mapYes(Ax+b)/(cx+d)(A\mathbf{x} + \mathbf{b}) / (\mathbf{c}^\top\mathbf{x} + d) on its domain
Convex hullYes (always produces a convex set)The smallest convex set containing the input

What is a convex hull?

The convex hull of a set S, denoted conv(S), is the smallest convex set containing S [1][9]. Equivalently, it is the set of all convex combinations of points in S:

conv(S)={θ1x1++θkxk:xiS,θi0,θi=1}\operatorname{conv}(S) = \{\theta_1\mathbf{x}_1 + \cdots + \theta_k\mathbf{x}_k : \mathbf{x}_i \in S, \theta_i \ge 0, \sum \theta_i = 1\}

It can also be described as the intersection of all convex sets that contain S [1].

Geometrically, the convex hull of a finite set of points in 2D is the shape formed by stretching a rubber band around the points and letting it snap tight [9]. In computational geometry, efficient algorithms exist for computing convex hulls [9]:

AlgorithmTime ComplexityDescription
Graham scanO(nlogn)O(n \log n)Sorts points by angle, then processes them in order
Jarvis march (gift wrapping)O(nh)O(nh)Wraps around the point set; hh = number of hull vertices
Divide and conquerO(nlogn)O(n \log n)Splits points, computes hulls recursively, then merges
Chan's algorithmO(nlogh)O(n \log h)Output-sensitive; optimal when hh is small
QuickhullO(nlogn)O(n \log n) averagePractical for higher-dimensional inputs
Kirkpatrick-SeidelO(nlogh)O(n \log h)The first ultimate convex hull algorithm in 2D

The convex hull operation is important in machine learning for tasks such as outlier detection, shape analysis, and feature space visualization. In computational geometry, the convex hull is used in collision detection, path planning, and geographic information systems [9].

What does Caratheodory's theorem say?

Caratheodory's theorem (1907) sharpens the convex hull construction [11]. It states that any point in the convex hull of a set SRnS \subseteq \mathbb{R}^n can be written as a convex combination of at most n+1n + 1 points of SS [11]. Formally, if xconv(S)\mathbf{x} \in \operatorname{conv}(S), then there exist points x1,,xn+1S\mathbf{x}_1, \ldots, \mathbf{x}_{n+1} \in S and weights θi0\theta_i \ge 0 with θi=1\sum \theta_i = 1 such that x=θixi\mathbf{x} = \sum \theta_i \mathbf{x}_i [11].

The bound n + 1 is tight: the simplex with n + 1 affinely independent vertices in R^n requires all n + 1 points to express its barycenter [11]. Caratheodory's theorem is the basic dimensional result of convex geometry. It is what makes the simplex method for linear programming work efficiently in finite dimensions, since vertex solutions can always be described with at most n + 1 active points.

What are extreme points and the Krein-Milman theorem?

A point xC\mathbf{x} \in C is an extreme point of a convex set CC if it cannot be written as a non-trivial convex combination of two distinct points of C [14]. In other words, if x=λy+(1λ)z\mathbf{x} = \lambda\mathbf{y} + (1 - \lambda)\mathbf{z} with y,zC\mathbf{y}, \mathbf{z} \in C and 0<λ<10 < \lambda < 1, then y=z=x\mathbf{y} = \mathbf{z} = \mathbf{x}. Geometrically, extreme points are the corners of the set.

The Krein-Milman theorem (1940) states that any compact convex set in a Hausdorff locally convex topological vector space equals the closed convex hull of its extreme points [14]. In finite dimensions, this means a compact convex set is fully determined by its corners. For polytopes, the extreme points are exactly the vertices, and Krein-Milman recovers the familiar fact that a polytope is the convex hull of its vertices [14].

The Krein-Milman theorem has direct optimization consequences: a continuous linear function attains its maximum and minimum over a compact convex set at extreme points [14]. This is the geometric reason why the simplex method searches only vertices when solving a linear programming problem.

What is the supporting hyperplane theorem?

The supporting hyperplane theorem states that for any convex set C and any point x0\mathbf{x}_0 on the boundary of CC, there exists a hyperplane that passes through x0\mathbf{x}_0 and has the entire set C on one side [5]. Formally, there exists a nonzero vector a\mathbf{a} such that

axax0for all xC\mathbf{a}^\top\mathbf{x} \le \mathbf{a}^\top\mathbf{x}_0 \quad \text{for all } \mathbf{x} \in C

This hyperplane supports the set at x₀, touching it without cutting into it [5]. The theorem guarantees that at every boundary point of a convex set, you can place a flat surface tangent to the set. This result, originally due to Hermann Minkowski, is the geometric basis for duality theory in convex optimization [1][5]. Lagrange multipliers and KKT conditions can be derived as algebraic shadows of supporting hyperplanes at the optimum [23].

What is the separating hyperplane theorem?

The separating hyperplane theorem addresses two disjoint convex sets. If A and B are nonempty convex subsets of Rn\mathbb{R}^n with AB=A \cap B = \emptyset, then there exists a hyperplane that separates them [4]. That is, there exists a nonzero vector v\mathbf{v} and a scalar cc such that

vxcfor all xA,andvycfor all yB\mathbf{v}^\top\mathbf{x} \ge c \quad \text{for all } \mathbf{x} \in A, \quad \text{and} \quad \mathbf{v}^\top\mathbf{y} \le c \quad \text{for all } \mathbf{y} \in B

When additional conditions hold (for instance, both sets are closed and at least one is compact), a strict separating hyperplane exists with a positive gap between the two sets [4].

This theorem has direct practical applications. In support vector machines (SVMs), the goal is to find the maximum-margin separating hyperplane between two classes of data points, each forming a convex set of training examples [10]. The separating hyperplane theorem guarantees that such a separator exists when the classes are linearly separable [4]. When the classes overlap, soft-margin SVMs use a relaxed formulation that still leans on the convex geometry of the underlying feasible set [10].

What do the Helly, Radon, and Tverberg theorems say?

A family of classical results in convex geometry connects intersection patterns and combinatorial structure.

Helly's theorem (1913). Let X1,X2,,XkX_1, X_2, \ldots, X_k be a finite collection of convex sets in Rn\mathbb{R}^n with k>nk > n. If every n+1n + 1 of these sets have a common point, then all kk sets share a common point [12]. The result also extends to infinite collections of compact convex sets. Helly's theorem connects a local property (every n + 1 sets intersect) to a global property (all sets intersect), which is rare in geometry [12]. It plays a key role in convex feasibility analysis: when checking whether finitely many constraints have a feasible solution, it suffices to check intersection patterns on small subsets.

Radon's theorem (1921). Any n+2n + 2 points in Rn\mathbb{R}^n can be partitioned into two sets whose convex hulls intersect [13]. The intersection point is called a Radon point. For example, in the plane (n=2n = 2), any four points can either be split into a triangle that contains the fourth point, or into two pairs whose connecting line segments cross [13]. Radon's theorem is the standard ingredient in one of the cleanest proofs of Helly's theorem [13].

Tverberg's theorem (1966). A generalization of Radon's theorem due to Helge Tverberg states that any (n+1)(r1)+1(n + 1)(r - 1) + 1 points in Rn\mathbb{R}^n can be partitioned into rr subsets whose convex hulls all share a common point. This recovers Radon's theorem when r=2r = 2.

These theorems are central to combinatorial geometry. They also appear in computational learning theory: Radon's theorem can be used to show that the VC dimension of linear classifiers (halfspaces) in Rn\mathbb{R}^n is exactly n+1n + 1 [13].

What is a convex cone?

A convex cone is a set KK in a vector space such that for every x,yK\mathbf{x}, \mathbf{y} \in K and every α,β0\alpha, \beta \ge 0, the point αx+βy\alpha\mathbf{x} + \beta\mathbf{y} belongs to KK [15]. Equivalently, K is a convex cone if it is closed under nonnegative linear combinations. Convex cones are convex sets, but they have additional scaling structure that makes them useful in optimization and duality theory [15].

What are the important named convex cones?

ConeDefinitionRole
Nonnegative orthant R+n\mathbb{R}^n_+{xRn:xi0}\{\mathbf{x} \in \mathbb{R}^n : x_i \ge 0\}Feasible region for nonnegativity constraints in linear programming
Second-order (Lorentz) cone{(x,t):x2t}\{(\mathbf{x}, t) : \lVert \mathbf{x} \rVert_2 \le t\}Feasible region for second-order cone programs (SOCP)
Positive semidefinite cone S+n\mathbb{S}^n_+{XSn:X0}\{X \in \mathbb{S}^n : X \succeq 0\}Feasible region for semidefinite programming
Polyhedral cone{x:Ax0}\{\mathbf{x} : A\mathbf{x} \le 0\}Solution set of homogeneous linear inequalities
Tangent cone TC(x)T_C(\mathbf{x})Closure of all directions feasible from x\mathbf{x} in CUsed in optimality conditions
Normal cone NC(x)N_C(\mathbf{x}){v:v(yx)0 for all yC}\{\mathbf{v} : \mathbf{v}^\top(\mathbf{y} - \mathbf{x}) \le 0 \text{ for all } \mathbf{y} \in C\}Dual object for variational inequalities

The nonnegative orthant, the second-order cone, and the PSD cone are all self-dual under their canonical inner products, which makes the optimization problems built on them especially clean [16].

What is a dual cone?

For a cone KRnK \subseteq \mathbb{R}^n, the dual cone is defined as K={yRn:yx0 for all xK}K^* = \{\mathbf{y} \in \mathbb{R}^n : \mathbf{y}^\top\mathbf{x} \ge 0 \text{ for all } \mathbf{x} \in K\} [1]. The dual cone K* is always closed and convex, even when K is not [1]. If K is a closed convex cone, then K=KK^{**} = K, recovering the original cone by double duality. Dual cones are at the heart of conic duality theory in convex optimization, where the dual of a conic program is itself a conic program over the dual cone [16].

What is a normal cone?

Given a closed convex set C and a point x ∈ C, the normal cone to C at x\mathbf{x} is defined as NC(x)={v:v(yx)0 for all yC}N_C(\mathbf{x}) = \{\mathbf{v} : \mathbf{v}^\top(\mathbf{y} - \mathbf{x}) \le 0 \text{ for all } \mathbf{y} \in C\} [8]. The normal cone collects all directions that point away from C at x. Normal cones characterize first-order optimality conditions: a point x\mathbf{x}^* minimizes a convex function ff over a convex set CC if and only if 0f(x)+NC(x)0 \in \partial f(\mathbf{x}^*) + N_C(\mathbf{x}^*), where f\partial f is the subdifferential of ff [8].

How are convex sets used in optimization?

Convex sets are central to convex optimization, where the goal is to minimize a convex function over a convex feasible region [1]. The key advantages come from the geometry of convex sets:

  1. No local minima traps. In a convex optimization problem, every local minimum is a global minimum [1]. This eliminates the need for global search heuristics.
  2. Feasible region structure. Since the feasible region is an intersection of convex constraint sets, it is itself convex [1]. Algorithms such as interior-point methods and projected gradient descent can exploit this structure to find solutions efficiently.
  3. Strong duality. Under mild conditions (such as Slater's constraint qualification), convex optimization problems satisfy strong duality, meaning the primal and dual optimal values coincide [1]. The supporting hyperplane theorem provides the geometric intuition behind this duality [1].
  4. Polynomial-time solvability. Many classes of convex optimization problems, including linear programming, quadratic programming, and semidefinite programming, can be solved in polynomial time [16].

Common convex feasible regions in optimization include polyhedra (in linear programs), ellipsoids (in robust optimization), the PSD cone (in semidefinite programs), and second-order cones (in SOCP) [1].

What is conic optimization?

Conic optimization is a unifying framework that minimizes a linear objective over the intersection of an affine subspace and a convex cone [16]. It includes linear programming (with the nonnegative orthant), second-order cone programming, and semidefinite programming as special cases [16]. Conic optimization problems can be solved efficiently with interior-point methods, and they form the practical core of many modern solvers such as MOSEK, ECOS, and SCS [16]. Boyd's CVX modeling system, widely used in research and teaching, builds problems by combining convex sets and operations that preserve convexity [21].

What is projection onto a convex set?

Given a closed convex set C and a point zRn\mathbf{z} \in \mathbb{R}^n, the projection of z\mathbf{z} onto C is the unique point PC(z)CP_C(\mathbf{z}) \in C closest to z\mathbf{z} in Euclidean distance [1]. The projection map P_C is well defined, single valued, and non-expansive, meaning PC(x)PC(y)xy\lVert P_C(\mathbf{x}) - P_C(\mathbf{y}) \rVert \le \lVert \mathbf{x} - \mathbf{y} \rVert for all x,y\mathbf{x}, \mathbf{y} [1].

Projection is the key building block of projected gradient descent: at each step, the algorithm takes a gradient step and then projects the iterate back into the feasible set [6]. When projection onto C has a closed-form solution (as for boxes, balls, or the simplex), projected gradient methods are extremely efficient [6][18].

What is the projections onto convex sets (POCS) algorithm?

The projections onto convex sets (POCS) algorithm, also called the alternating projection method, finds a point in the intersection of two or more closed convex sets by repeatedly projecting onto each set in turn [17]. For two convex sets with non-empty intersection, classical results show that POCS converges linearly to a point in the intersection [17]. POCS underlies many practical algorithms for image reconstruction, signal recovery, and constrained learning [17]. Variants such as Dykstra's algorithm modify the iterations so that the limit is the projection of the starting point onto the intersection rather than an arbitrary feasible point [17].

Why do convex sets matter in machine learning?

Convex sets appear throughout machine learning in several roles:

  • Feasible regions for model parameters. In regularization techniques such as Lasso (L1) and Ridge (L2), the constraint set for the parameter vector is a convex norm ball. Lasso constrains parameters to an L1 ball (a diamond shape in 2D), while Ridge uses an L2 ball (a circle in 2D). The corners of the L1 ball encourage sparse solutions, which is the geometric reason Lasso produces models with many zero coefficients.
  • SVM classification. Support vector machines find the optimal separating hyperplane between convex hulls of data points from different classes [10]. The dual SVM formulation is itself a convex quadratic program over a simplex-like polytope [10].
  • Loss function level sets. For convex loss functions such as cross-entropy and squared error, the sublevel sets {x:f(x)α}\{\mathbf{x} : f(\mathbf{x}) \le \alpha\} are convex sets, ensuring well-behaved optimization landscapes [1].
  • Probability simplex constraints. The probability simplex {x:xi0,xi=1}\{\mathbf{x} : x_i \ge 0, \sum x_i = 1\} is the natural feasible set for categorical probabilities, mixture model weights, and discrete policies in reinforcement learning [18]. Methods such as exponentiated gradient descent and entropic mirror descent are tailored to optimization over the simplex [18].
  • Constraint sets in constrained optimization. Many ML formulations add constraints (non-negativity, probability simplex, bounded parameters) that define convex feasible regions.
  • Convex relaxations. When the original problem is non-convex (as in many deep learning settings), researchers often study convex relaxations that replace non-convex constraint sets with their convex hulls to obtain tractable approximations [19]. Linear programming relaxations of integer programs, semidefinite relaxations of MAXCUT, and nuclear-norm relaxations of low-rank matrix recovery are all convex-set replacements for non-convex feasible regions.
  • Online learning. In online convex optimization, the learner repeatedly chooses a point from a convex set while suffering convex losses chosen by an adversary. Algorithms such as online gradient descent and follow-the-regularized-leader exploit convexity of the decision set to obtain regret bounds that grow only like the square root of the number of rounds.

How do convex sets relate to neural network verification?

Deep neural networks built from ReLU activations partition input space into a finite collection of polytopes on which the network acts as an affine map [20]. This polytope structure is itself a convex-set object: each linear region is a convex polyhedron, and the global behavior of the network is determined by how these convex pieces fit together [20]. Researchers in robustness and verification use convex relaxations of ReLU outputs, such as triangle relaxations and zonotope abstractions, to certify that a network's prediction is stable on a convex input region. Recent results from 2024 to 2026 have characterized when ReLU networks are themselves convex [20], mapped out the limits of multi-neuron convex relaxations, and shown that two-layer ReLU networks admit polynomial-time convex training formulations under certain conditions [19].

How do convex sets appear in reinforcement learning?

In reinforcement learning, the set of policies for a fixed Markov decision process can often be described as a convex set, and the set of state-action visitation distributions for a finite MDP forms a polytope. Linear programming formulations of MDPs exploit this polytope structure, and dual variables in these LPs correspond to value functions. The convex geometry of the visitation polytope underpins occupancy-measure methods, dual reinforcement learning, and convex regularization of policies [18].

How do convex sets relate to convex functions?

Convex sets and convex functions are closely linked through three connections:

  1. Epigraph characterization. A function f is convex if and only if its epigraph, defined as {(x,t):f(x)t}\{(\mathbf{x}, t) : f(\mathbf{x}) \le t\}, is a convex set [1]. This allows results about convex sets to be translated into results about convex functions and vice versa.
  2. Sublevel sets. If f is a convex function, then every sublevel set {x:f(x)α}\{\mathbf{x} : f(\mathbf{x}) \le \alpha\} is a convex set [1]. The converse does not hold: a function can have convex sublevel sets without being convex; such functions are called quasiconvex [1].
  3. Domain requirement. By definition, a convex function must have a convex domain [1]. The function's convexity inequality, f(λx+(1λ)y)λf(x)+(1λ)f(y)f(\lambda\mathbf{x} + (1 - \lambda)\mathbf{y}) \le \lambda f(\mathbf{x}) + (1 - \lambda)f(\mathbf{y}), only makes sense when the domain is convex, so that the left-hand side is well-defined [1].

These links explain why textbooks like Boyd and Vandenberghe spend an entire chapter (Chapter 2) on convex sets before introducing convex functions in Chapter 3 [1]. The geometry of the set comes first; the inequality structure of the function follows.

When were convex sets first studied?

The systematic study of convex sets began with Hermann Minkowski in the 1890s [2]. His work on the geometry of numbers led to convex bodies, supporting hyperplanes, and Minkowski sums. Constantin Caratheodory's 1907 paper introduced what is now known as Caratheodory's theorem on convex hulls [11]. Eduard Helly proved his intersection theorem in 1913, with proofs published over the next decade by Radon and others [12][13]. Werner Fenchel's lectures at Princeton in 1951 laid out duality between convex sets and convex functions in a form that influenced Rockafellar's 1970 textbook Convex Analysis [2]. Modern convex optimization, as taught in courses like Stanford's CVX-101 led by Stephen Boyd, brings these classical results into a computational framework grounded in numerical algorithms and software [21].

Explain like I'm 5 (ELI5)

Imagine you have a blob of play-dough on a table. Pick any two spots inside the play-dough and stretch a piece of string between them. If the string always stays inside the play-dough no matter which two spots you pick, then the play-dough shape is a convex set. A circle, a square, and a triangle all work this way.

Now imagine a crescent moon shape. If you pick one tip of the crescent and the other tip, the string between them goes through empty air outside the moon. That means the crescent is not a convex set.

In machine learning, convex sets are helpful because they make finding the best answer to a problem much easier. If the search space where you are looking for an answer is shaped like a nice convex blob, you will never get tricked into thinking you found the best answer when a better one is hiding somewhere else. That is why many ML algorithms are designed so that their search spaces are convex.

See also

References

  1. Boyd, S., & Vandenberghe, L. (2004). *Convex Optimization*. Cambridge University Press. Chapter 2: Convex Sets. https://web.stanford.edu/~boyd/cvxbook/
  2. Rockafellar, R. T. (1970). *Convex Analysis*. Princeton University Press.
  3. "Convex set." *Wikipedia*. https://en.wikipedia.org/wiki/Convex_set
  4. "Hyperplane separation theorem." *Wikipedia*. https://en.wikipedia.org/wiki/Hyperplane_separation_theorem
  5. "Supporting hyperplane." *Wikipedia*. https://en.wikipedia.org/wiki/Supporting_hyperplane
  6. Tibshirani, R. (2013). Convex Optimization, Lecture Notes. Carnegie Mellon University. https://www.stat.cmu.edu/~ryantibs/convexopt-F13/scribes/lec4.pdf
  7. Vandenberghe, L. EE236B Lecture Notes: Convex Sets. UCLA. http://seas.ucla.edu/~vandenbe/ee236b/lectures/sets.pdf
  8. Bertsekas, D. P. (2009). *Convex Optimization Theory*. Athena Scientific.
  9. "Convex hull." *Wikipedia*. https://en.wikipedia.org/wiki/Convex_hull
  10. Cortes, C., & Vapnik, V. (1995). Support-vector networks. *Machine Learning*, 20(3), 273-297.
  11. "Caratheodory's theorem (convex hull)." *Wikipedia*. https://en.wikipedia.org/wiki/Carath%C3%A9odory's_theorem_(convex_hull)
  12. "Helly's theorem." *Wikipedia*. https://en.wikipedia.org/wiki/Helly's_theorem
  13. "Radon's theorem." *Wikipedia*. https://en.wikipedia.org/wiki/Radon's_theorem
  14. "Krein-Milman theorem." *Wikipedia*. https://en.wikipedia.org/wiki/Krein%E2%80%93Milman_theorem
  15. "Convex cone." *Wikipedia*. https://en.wikipedia.org/wiki/Convex_cone
  16. "Conic optimization." *Wikipedia*. https://en.wikipedia.org/wiki/Conic_optimization
  17. "Projections onto convex sets." *Wikipedia*. https://en.wikipedia.org/wiki/Projections_onto_convex_sets
  18. Chok, J., & Vasil, G. M. (2025). Convex optimization over a probability simplex. *Journal of Machine Learning Research*, 26. https://www.jmlr.org/papers/volume26/23-1166/23-1166.pdf
  19. Pilanci, M., & Ergen, T. (2020). Neural networks are convex regularizers: Exact polynomial-time convex optimization formulations for two-layer networks. *International Conference on Machine Learning*. https://arxiv.org/abs/2002.10553
  20. Ferrari-Trecate, G., et al. (2025). Convexity in ReLU neural networks: Beyond ICNNs? *Journal of Mathematical Imaging and Vision*. https://link.springer.com/article/10.1007/s10851-025-01253-x
  21. Boyd, S. CVX-101: Stanford Convex Optimization Course. https://web.stanford.edu/class/ee364a/
  22. MIT OpenCourseWare. 6.253 Convex Analysis and Optimization, Spring 2012. https://ocw.mit.edu/courses/6-253-convex-analysis-and-optimization-spring-2012/
  23. Rockafellar, R. T. (1993). Lagrange multipliers and optimality. *SIAM Review*, 35(2), 183-238. https://epubs.siam.org/doi/10.1137/1035044

Improve this article

Add missing citations, update stale details, or suggest a clearer explanation. Every suggestion is reviewed for sourcing before it goes live.

5 revisions by 1 contributors · full history

Suggest edit