Convex Set — Definition, Formula & Examples
A convex set is a set of points where, if you pick any two points in the set, the entire straight-line segment connecting them also lies within the set. Intuitively, a convex set has no "dents" or "holes" — it never curves inward.
A set is convex if for every pair of points and every scalar , the point also belongs to .
Key Formula
Where:
- = The set being tested for convexity
- = Any two points in the set
- = A scalar between 0 and 1, parameterizing the line segment from y to x
How It Works
To test whether a set is convex, take any two points inside the set and check whether every point on the line segment between them remains in the set. If you can find even one pair of points whose connecting segment passes outside the set, the set is not convex. For example, a filled circle is convex because every chord lies inside it, but a crescent shape is not convex because some chords pass through the missing interior region.
Worked Example
Problem: Determine whether the set (a closed disk of radius 3) is convex.
Pick two arbitrary points: Let and , both on the boundary of the disk.
Form the general point on the segment: For any , the point on the segment is:
Check membership in S: Compute the squared distance from the origin and verify it does not exceed 9.
Maximize over λ: The quadratic has its maximum on at the endpoints, where it equals 1. Its minimum is at , giving . So for all .
Answer: Every point on the segment between any two points in the disk stays within the disk. This argument generalizes to any pair of points, so is convex.
Why It Matters
Convexity is a central assumption in optimization: if the feasible region and objective function are both convex, any local minimum is guaranteed to be a global minimum. This property underpins algorithms in machine learning, economics, operations research, and engineering design.
Common Mistakes
Mistake: Confusing a convex set with a convex function. A convex set is a region in space; a convex function is a function whose epigraph (the region above its graph) forms a convex set.
Correction: Keep the two concepts separate. Test sets with the line-segment condition, and test functions with the inequality .
