Module I·Article I·~6 min read
Convex Sets: Properties and Operations
Convex Sets and Functions
Reading tools · save, download, print, audio
Turn this article into a podcast
Pick voices, format, length — AI generates the audio
Why Is Convexity Important?
Imagine you are searching for a path in the mountains. If the terrain is convex (with no depressions or pockets), any trail without dead ends will lead you to the unique lowest point. This very idea underlies convex analysis: optimization problems on convex sets have a unique global minimum, and it can be found using reliable algorithms. All modern optimization — from machine learning to finance — relies on convex structures.
Definition of a Convex Set
A set is called convex if for any two points and any number it holds that:
What does this mean in words? Take any two points in the set. Connect them by a segment. If the entire segment lies inside the set — it is convex. The parameter "runs" from 0 to 1, describing all points between and : at we get , at — , at — the midpoint of the segment.
Geometric test: draw the figure. If there exist two points inside it, connected by a segment that partially goes outside the boundary — the figure is nonconvex. The letter "C" is nonconvex. A circle, square, triangle — are convex.
Classic Examples of Convex Sets
Hyperplane: , where is a fixed vector, is a number. This is an dimensional “plane” in space. Example in : line . Any two points on the line are connected by a segment lying on the line — convexity is obvious.
Halfspace: — one "side" from the hyperplane. In this is a halfplane on one side of a line.
Ball: — all points at distance no more than from the center . Convexity: if two points lie in the ball (distance to ), then any point between them also lies in the ball — this follows from the triangle inequality.
Ellipsoid: , where is a positive definite matrix. This is a “stretched ball” along different axes. Actively used in control theory for describing admissible regions of states.
Second-order cone (SOCP): — "ice cream cone" in space. The surface of the cone is points with , interior — with .
Set of positive semidefinite matrices: . This is a convex cone in the space of symmetric matrices.
Operations Preserving Convexity
One of the key properties: many operations on convex sets yield new convex sets. This allows building complex convex structures from simple building blocks.
Intersection: if and are convex, then is also convex. Proof: if , then segment , and segment , thus segment . Consequence: polyhedron (polytope) — intersection of a finite number of halfspaces — is convex.
Image under linear transformation: — is convex if is convex. Affine transformations "preserve" convexity.
Preimage: if is affine () and is convex, then is convex.
Minkowski sum: — is convex if , are convex.
The Separating Hyperplane Theorem
This is one of the fundamental results of convex analysis, with deep geometric meaning and practical applications.
Theorem: if and are nonempty convex sets with empty intersection (), then there exists a vector and a number such that:
- for all
- for all
Meaning: the hyperplane “separates” the two sets. This is geometrically obvious in : two non-intersecting convex sets on the plane can always be separated by a line.
Supporting hyperplane: at a boundary point of convex there exists a vector such that for all . This is a "tangent" hyperplane to at point , lying "outside".
Projection onto a Convex Set
For a closed convex set , the orthogonal projection of point is defined as:
Existence and uniqueness: such a point always exists and is unique. Uniqueness is a consequence of the strict convexity of the function .
Characterization: if and only if for all . This means that the vector forms an obtuse angle with all directions inside from the point .
Practical importance: projection gradient descent — a fundamental algorithm for optimization with constraints. At each step, take a gradient step, then "project" back onto the admissible set .
Full Analysis of an Example
Problem: find the point closest to in the square .
Solution: Projection onto the square is coordinate-wise cutoff: .
For : , . Answer: — the corner point of the square.
Checking the condition: vector . For any : . Since and , both terms . Condition is satisfied.
Real Applications
Convex sets appear everywhere. In Markowitz portfolio theory, the set of admissible portfolios (with nonnegative weights summing to one) is convex. In machine learning, the domain of neural network weights with an constraint is a ball in parameter space. In control theory, admissible controls are often specified as convex polytopes (constraints on engine power, steering angle). Understanding convexity allows us to guarantee that an optimization algorithm will find the global optimum, rather than getting stuck in a local one.
§ Act · what next