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 whenThe 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]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §2.1.4, pp. 23–25: convex sets and finite convex combinations
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.
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!
