Professional Documents
Culture Documents
Lecture3 ConvexSetsFuns PDF
Lecture3 ConvexSetsFuns PDF
Techniques and
Applications
Convex sets & convex functions
Courtesy of K. Ma at HKCU
CONVEX SETS
Convex Sets
A set C ⊆ Rn is said to be convex if, for any x, y ∈ C,
θx + (1 − θ)y ∈ C
for any 0 ≤ θ ≤ 1.
x
θx + (1 − θ)y
convex non-convex
Halfspace:
C = {x | aT x ≤ b}
aT x ≤ b
aT x = b
Polyhedron:
C = {x | Ax ≼ b, Cx = d}
C
a3
a5
a4
W.-K. Ma 3
Convex hull of a set of points {x1 , x2, . . . , xk }:
(a) Convex hull where only some of (b) Convex hull where all x1 , . . . , xk
the x1, x2, . . . , xk are vertices. are vertices.
!k
• x ∈ C is an extreme point or vertex of C if x ̸
= i=1 θixi for any θ1 +. . .+θk =
1, θ1, . . . , θk ≥ 0, θi ̸
= 1 for any i.
Euclidean ball:
B(xc, r) = {x | ∥x − xc∥2 ≤ r}
#
! " $& '
"$ n
= x "" % (xi − xc,i )2 ≤ r
i=1
xc
Ellipsoid:
λ1
λ2
xc
Symmetric eigendecomposition of P :
P = QΛQT
θ1 x + θ2 y ∈ C
0 y
K = {(x, t) | ∥x∥2 ≤ t}
0.8
0.6
t
0.4
0.2
0
1
0.5 1
0.5
0
0
−0.5
−0.5
−1
x2 −1
x1
Positive semidefinite (PSD) cone:
Sn+ = {X ∈ Sn | X ≽ 0}
z T Xz ≥ 0, for all z ∈ Rn
Sn++ = {X ∈ Sn | X ≻ 0}
Example: n = 2 0.8
! " 0.6
x1 x2
≽0
x3
x2 x3 0.4
x1 ≥ 0, x3 ≥ 0 0
1
0.5 1
0.8
0 0.6
−0.5 0.4
0.2
−1 0
x2 x1
are smaller (e.g., E3 ). E3 is not minimal for the same reason. The ellipsoid
E2 is minimal, since no other ellipsoid (centered at the origin) contains the
points and is contained in E2 .
Key properties of convex sets
D
C
C ✓ {x : aT x b}
D ✓ {x : aT x b}
• Supporting hyperplane theorem: a boundary point of a convex
set has a supporting hyperplane passing through it
C ✓ {x : aT x aT x0 }
Operations preserving convexity
• Intersection: the intersection of convex sets is convex
aC + b = {ax + b : x 2 C}
is convex
Example: linear matrix inequality solution set
Given A1 , . . . Ak , B 2 Sn , a linear matrix inequality is of the form
x1 A1 + x2 A2 + . . . + xk Ak B
⇣ k
X ⌘
vT B (txi + (1 t)yi )Ai v 0
i=1
Pk
Approach 2: let f : Rk ! Sn ,
f (x) = B i=1 xi Ai . Note that
C = f 1 (Sn+ ), affine preimage of convex set
More operations preserving convexity
• Perspective images and preimages: the perspective function is
P : Rn ⇥ R++ ! Rn (where R++ denotes positive reals),
P (x, z) = x/z
H(ω) (dB)
−15
U (ω)
n
! −20
i=−n −30
n
! −35
= h0 + 2 hi cos(ωi) −40
0 0.5 1 1.5 2 2.5 3
ω
i=1
• The set
" #
n+1 #
$
H = (h0, . . . , hn) ∈ R |H(ω)| ≤ U (ω), ω1 ≤ ω ≤ ω2
(y, f (y))
(x, f (x))
• f is strictly convex if f (θx + (1 − θ)y) < θf (x) + (1 − θ)f (y) for all 0 < θ < 1
and for all x =
̸ y.
• f is concave if −f is convex.
strictly convex
convex non-convex
(and of course convex)
1st and 2nd Order Conditions
! "T
∂f (x) ∂f (x)
∇f (x) = ,..., ∈ Rn
∂x1 ∂xn
2 ∂ 2f (x)
[∇ f (x)]ij =
∂xi∂xj
• Taylor series:
f (x)
f (x0 ) + ∇f (x0 )T (x − x0 )
x
x0
∇2 f (x) ≽ 0, ∀x ∈ domf
Restriction of a Convex Function to a Line
• |x| is convex.
• eαx is convex.
1.5
0.5
f (x)
−0.5
−1
−1.5
−2
1
0.5
1
0 0.5
0
−0.5
−0.5
−1
x2 −1
x1
W.-K. Ma 6
Quadratic function
n !
! n n
!
f (x) = xT P x + 2q T x + r = Pij xixj + 2 qixi + r
i=1 j=1 i=1
20
10
15
f (x)
5
10
f (x)
0
−5
0 1
1
−10 0.5
0.5 1 1
0.5 0.5 0
0
0 0
−0.5 −0.5
−0.5 −0.5
x2 −1 −1
x1 x2 −1 −1
x1
(a) P ≽ 0. (b) P ! 0.
p-norm
! n
# p1
"
f (x) = ∥x∥p = |xi|p
i=1
is convex for p ≥ 1.
1
p=∞ 0.8
p = 0.5
0.8 p=2 p = 0.3
0.6
p=1
0.6
p = 0.1
0.4
0.4
0.2
0.2
0 0
−0.2
−0.2
−0.4
−0.4
−0.6
−0.6
−0.8
−0.8
−1
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Log-sum-exp.
Examples " n
#
$
f (x) = log exi
i=1
is convex on Rn. (Log-sum-exp. can be used as an approx. to max xi)
i=1,...,n
16/10/19 Lecture 3: Convex Functions 14
Epigraph
The epigraph of f is
A powerful property:
f convex ⇐⇒ epif convex
e.g., some convexity preserving properties can be proven quite easily by epigraph.
t f (x)
epif
x
))
Sublevel Sets
The α-sublevel set of f
Sα = {x ∈ domf | f (x) ≤ α}
f (x) f (x)
α α
x x
Sα Sα
Figure 3.6
Jensen’s Inequality
• The basic inequality for convex f
• It can be extended to
! k # k
" "
f θk xk ≤ θk f (xk )
i=1 i=1
$k
where θ1, . . . , θk ≥ 0, and i=1 θk = 1; and to
%& ' &
f p(x)xdx ≤ p(x)f (x)dx
S S
(
where p(x) ≥ 0 on S ⊆ domf , and S
p(x)dx = 1.
Inequalities derived from Jensen’s inequality:
√
• Arithmetic-geometric inequality: ab ≤ (a + b)/2 for a, b ≥ 0
!n n
• Hadamard inequality: det X ≤ i=1 X ii for X ∈ S+
• Hölder inequality:
xT y ≤ ∥x∥p∥x∥
yq
where 1/p + 1/q = 1, p > 1.
Operations that Preserve Convexity
• Practical methods for establishing convexity of a function
Convexity Preserving Operations
Affine transformation of the domain:
f (x) = ∥y − Ax∥2
Example:
f (x) = ∥y − Ax∥22
is convex by composition, where g(x) = ∥y − Ax∥2 , h(x) = max{0, x2}.
Non-negative weighted sum:
m
f1, . . . , fm convex !
=⇒ wifi convex
w1, . . . , wm ≥ 0
i=1
is convex for γ ≥ 0.
is concave on Sn+.
Pointwise maximum:
Pointwise supremum:
• Examples:
Approaches to prove convexity of
functions
• First, domain of function f is proved to be convex
• 1. Whether definition is satisfied, i.e.,
( ) () ()
f α x + (1− α ) y ≤ α f x + (1− α ) f y
• 2. Restriction to a convex function to a line is
convex (necessary and sufficient condition)
g(t) = f (x + tv) dom g = {t | x + tv ∈ dom f } is convex (in t)
– For any x ∈ dom f ,υ ∈ ℜ n
• 3. Epigraph is convex.
• 4. Hessian is positive semidefinite.