A subset C∈Rn is convex if it contains the line segment between any two points in the set.
∀x1,x2∈C,λ∈[0,1],λx1+(1−λ)x2∈C
Convexity can be preserved by some operations.
Theorem 10
If C1,⋯,Cm are convex sets, then their intersection C=⋂i=1,⋯,mCiis also a convex set.
Theorem 11
If a map f:Rn→Rm is affine and C⊂Rn is convex, then f(C)={f(x):x∈C}is convex.
Theorem 10, Theorem 11 are important because they allow us to prove sets are convex using sets that we know are convex. For example, Theorem 11 tells us that a projection of a convex set onto a subspace must also be convex since projection is a linear operator.
Definition 31
A function f:Rn→R is convex if its domain is a convex set and ∀x,y in the domain, λ∈[0,1],
f(λx+(1−λ)y)≤λf(x)+(1−λ)f(y)
Loosely, convexity means that the function is bowl shaped since a line connecting any two points on the function is above the function itself. A concave function is simply one where −f is convex, and these appear like a “hill”. Because convex functions are bowl shaped, they must be ∞ outside their domain.
Theorem 12
A function fis convex if and only if its epigraph is a convex set.
Just like convex sets, some operations preserve convexity for functions.
Theorem 13
If fi:Rn→R are convex functions, then f(x)=∑i=1mαifi(x) where αi≥0is also convex.
A similar property to Theorem 11 exists for convex functions.
Theorem 14
If f:Rn→R is convex, then g(x)=f(Ax+b)is also convex.
We can also look at the first and second order derivatives to determine the convexity of a function.
Theorem 15
If f is differentiable, then f is convex if and only if
∀x,y,f(y)≥f(x)+∇xT(y−x)
Theorem 15 can be understood geometrically by saying the graph of f is bounded below everywhere by its tangent hyperplanes.
Theorem 16
If f is twice differentiable, then f is convex if and only if the Hessian abla2is positive semi-definite everywhere.
Geometrically, the second-order condition says that f looks bowl-shaped.
Theorem 17
A function f is convex if and only if its restriction to any line g(t)=f(x0+tv)is convex.
Theorem 18
If (fα)α∈A is a family of convex functions, then the pointwise maximum f(x)=maxα∈Afα(x)is convex.
Because of the nice geometry that convexity gives, optimization problems which involve convex functions and sets are reliably solveable.
Definition 32
A convex optimization problem in standard form is
p∗=minxf0(x):∀i∈[1,m],fi(x)≤0,Ax=b
where f0,f1,⋯are convex functions and the equality constraints are affine.
Since the constraints form a convex set, Definition 32 is equivalent to minimizing a convex function over a convex set X.
Theorem 19
A locally optimal solution to a convex problem is also globally optimal, and this set Xis convex.
Theorem 19 is why convex problems are nice to solve.
Optimality
When problems are convex, we can define conditions that any optimal solution must satisfy.
Theorem 20
For a convex optimization problem with a differentiable objective function f0(x) and feasible set X,
x is optimal ⇔∀y∈X,∇xf0(x)⊤(y−x)≥0
Since the gradient points in the direction of greatest increase, the dot product of the gradient with the different between any vector and the optimal solution being positive means other solutions will only increase the value of f0(x). For unconstrained problems, we can make this condition even sharper.
Theorem 21
In a convex unconstrained problem with a differentiable objective function f0(x), x is optimal if an only if ablaxf0(x)=0
Conic Programming
Conic programming is the set of optimization problems which deal with variables constrained to a second-order cone.
Definition 33
A n-dimensional second-order cone is the set
Kn={(x,t),x∈Rn,t∈R:∥x∥2≤t}
By Cauchy-Schwartz, ∥x∥2=maxu:∥u∥≤1uTx≤t. This means that second order cones are convex sets since they are the intersection of half-spaces. In spaces 3-dimensions and higher, we can rotate these cones.
Definition 34
A rotated second order cone in Rn+2 is the set
Knr={(x,y,z),x∈Rn,y∈R,z∈R:xTx≤yz,y≥0,z≥0}.
The rotated second-order cone can be interpreted as a rotation because the hyperbolic constraint ∥x∥22≤yz can be expressed equivalently as
[2xy−z]2≤y+z.
Definition 35
The standard Second Order Cone Constraint is
∥Ax+b∥2≤cTx+d.
A SOC constraint will confine x to a second order cone since if we let y=Ax+b∈Rm and t=cTx+d, then (y,t)∈Km.
Definition 36
A second-order cone program in standard inequality form is given by
mincTx such that ∥Aix+bi∥2≤ciTx+di.
An SOC program is a convex problem since its objective is linear, and hence convex, and the SOC constraints are also convex.
Quadratic Programming
A special case of SOCPs are Quadratic Programs. These programs have constraints and an objective function which can be expressed as a quadratic function. In SOCP form, they look like
If the matrix in the objective function of a quadratic program is 0 (and there are no quadratic constraints), then the resulting objective and constraints are affine functions. This is a linear program.
Definition 39
The inequality form of a linear program is given by
minxcTx+d:∀i∈[1,m],aiTx≤bi
Since linear program is a special case of a quadratic program, it can also be expressed as an SOCP.
xmins.t cTx∀i∈[1,m],∥0x+0∥2≤bi−aiTx
Because of the constraints, the feasible set of a linear program is a polyhedron. Thus linear programs are also convex.