Convex Sets and Functions - Lecture Notes
Convex Sets
A set is convex if, for any two points , the line segment joining and is contained in .
Mathematically, this means for any , the set is a subset of .
Convex Sets in R
In the real number line , convex sets are intervals. Examples include:
Norm Balls
A norm ball with center and radius is defined as the set .
Euclidean norm ball:
-norm ball:
-norm ball:
Norm Balls - Ellipsoids
An ellipsoid is a set of the form , where is a symmetric positive definite matrix.
Affine Sets
Lines in : , where is the normal to the line.
Planes in : , where is the normal to the plane.
Lines in (as the intersection of two planes): , where
.
The rows of are the normals to the planes.
The solution set of underdetermined linear equations: .
The set of solutions of linear equations is of the form , which are vector spaces shifted by adding a constant vector .
Convex Cones
A convex cone is a set that is closed under positive linear combinations. If , then for any .
Given a set of vectors , the convex cone generated by is the set .
Convex Combination and Convex Hull
A convex combination of is any point of the form with , and .
The convex hull of a set is the set of all convex combinations of points in .
Hyperplanes and Half-Spaces
A hyperplane is a set of the form , where .
A half-space is a set of the form , where .
In both cases, is the normal vector.
Polytope
A polytope is a set of the form , where .
The notation represents component-wise inequality: , where is the -th row of .
A polytope is an intersection of half-spaces.
Operations That Preserve Convexity
The intersection of any number of convex sets is convex.
If is an affine function (i.e., it can be written as with ), then:
If is convex, then is a convex set.
If is convex, then is a convex set.
To verify if a set is convex, express it in terms of simpler known convex sets using operations that preserve convexity.
Convex Functions
A function is convex if , for any two points , and .
is concave if is convex.
A function is strictly convex if f (tx + (1 − t)y) < tf (x) + (1 − t)f (y), for any two points and any .
Examples of Convex and Concave Functions on R
Convex functions:
Quadratic functions: on .
Exponential: is convex on , for any .
Powers: for x > 0 and or .
Powers of absolute value: on , for .
Negative entropy: for x > 0.
Affine functions: on , for any .
Concave functions:
Affine functions: on , for any (Convex and concave!).
Powers: for x > 0 and .
Logarithm: for x > 0.
Examples of Convex Functions on Rn
Affine functions: .
Norms: Every norm on is convex. In particular, any norm, is convex.
Max function: .
Quadratic-over-linear function: , with x_2 > 0.
Epigraph, Sublevel and Superlevel Sets
-sublevel set of : .
Sublevel sets of convex functions are convex.
Superlevel sets of concave functions are convex.
Functions with all their sub-level sets convex are not necessarily convex. These broader class of functions are called quasi-convex.
Epigraph of : .
is a convex function if and only if its epigraph is a convex set.
Sufficient and Necessary Condition for Convexity
A function is convex if and only if the function , is convex for any .
Using this property the problem is reduced to check the convexity of function of one variable.
First Order Condition for Convexity
Let be a differentiable function and let be a convex subset of . Then:
The first order Taylor approximation of is a global underestimator.
Moreover, is strictly convex if and only if:
f (y) > f (x) + ⟨∇f (x), y − x⟩, ∀x, y ∈ C.
Second Order Condition for Convexity
Let be a twice differentiable function and let be a convex subset of .
Is a Quadratic Function a Convex Function?
Let , with a symmetric matrix.
Then, and .
is convex if the matrix is positive semi-definite.
A special case: .
Then, and .
is convex for any matrix because is symmetric and positive semidefinite.
Establishing the Convexity of a Function
In practice, for a general function , we either:
Show that is obtained from simple convex functions and operations that preserve convexity.
Verify the definition (restricted to a line).
If the function is twice differentiable, show that is positive semidefinite.
Verify the definition.
Operations That Preserve Convexity
Nonnegative multiple: is convex if is convex and \alpha > 0.
Sum: is convex if are convex. This is also true for infinite sums and for integrals.
Composition with affine function: Let be a convex function, . Then, is a convex function.
Example: any norm of an affine function is convex.
Pointwise maximum: If are convex, then is convex.
Pointwise supremum: If is convex in for all , and is an arbitrary set, then is convex.
Pointwise infimum: If is convex in and is a convex set, then is convex.
Extended-value extension: Let , be a convex function defined on . We denote by its extended-value extension such that
The is convex. (Concave functions are extended with to preserve concavity.)
Scalar composition: Let and and their composition . (That is, ).
is convex if is convex and nondecreasing, and is convex.
is convex if is convex and nonincreasing, and is concave.
is concave if is concave and nondecreasing, and is concave.
is concave if is concave and nonincreasing, and is convex.
Convex Problems You Have Already Seen
An image denoising energy: Given a noisy image, recover as the solution of
is a matrix that computes the discretized gradient with finite differences.
The second term is: . Quadratic function with Hessian , which is positive definite. Thus it is strictly convex.
The first term is: . Quadratic function with Hessian , which is positive semi-definite. Thus first term is convex.
Sum of convex and strictly convex functions is strictly convex.
Non-Differentiable Functions
Total variation for image denoising (Rudin-Osher-Fatemi): Given a noisy image, recover as the solution of
Second term is strictly positive.
First term is: , where and . is convex (norms are convex functions) and is affine. Composition of convex with affine is convex.
Sum of convex and strictly convex functions is strictly convex.