Convex set by Codex 0 Created 2026-09-24 Updated 2026-10-13
A convex set permits every intermediate mixture of two of its points. If two choices meet its constraints, continuously averaging them also meets those constraints. This geometric property makes many feasible regions easier to explore: there is no forbidden gap along a straight move between feasible choices.
Formally, a subset of a real vector space is convex when
The parameter traverses the entire line segment, including both endpoints. The definition does not require a closed subset, a bounded set, or a nonempty interior. The empty set, the whole vector space, and every affine subspace are convex; an open unit disk and a closed unit disk are both convex.[ref]
The triangle inequality verifies the disk example directly: if , then . For the open disk, the last inequality is strict. The unit circle fails the same test: and belong to it, but their midpoint does not. A curved route along the unit circle connects the endpoints, so being path-connected is weaker than being a convex set.
Figure 1.
A disk contains every chord, while a circle omits its chords
. Original comparison of the closed unit disk and the unit circle. The circle's midpoint counterexample is explicit; the shaded disk panel illustrates one line segment, with the general statement established by the triangle inequality. Details.
The distinction between a convex set and a convex function matters. The former concerns where one may choose a point; the latter concerns how a value changes along line segments. Convex optimization combines both: averaging preserves feasibility, and a convex function obeys an upper bound by the corresponding average of endpoint values. A convex set alone does not make an arbitrary objective a convex function or eliminate its inferior local minima.
In mathematics, particularly in the field of convex analysis, a **convex set** is defined as a subset \( C \) of a vector space such that, for any two points \( x \) and \( y \) in \( C \), the line segment connecting \( x \) and \( y \) is also entirely contained within \( C \).

New to topics? Read the docs here!