Lecture 4 Convex Sets & Convex Functions: MAEG4070 Engineering Optimization
Lecture 4 Convex Sets & Convex Functions: MAEG4070 Engineering Optimization
Yue Chen
MAE, CUHK
email: [email protected]
Sep 16, 2021
1
Content of this course (tentative)
Linear programming
Lecture 2
Linear
Dual Theory – Part I
Lecture 3
Linearization
technique Programming
Lecture 7 Unconstrained optimization Lecture 13
Lecture 5 & 6
Affine set: the set that contains all line through any two distinct points in
the set 𝒞𝒞
∀𝑥𝑥1 , 𝑥𝑥2 ∈ 𝒞𝒞, 𝜃𝜃 ∈ ℝ ⇒ 𝜃𝜃𝑥𝑥1 + (1 − 𝜃𝜃)𝑥𝑥2 ∈ 𝒞𝒞
3
Pictures from Google image
Affine Sets
Proof: Given any two points 𝑥𝑥1 ∈ 𝒳𝒳 and 𝑥𝑥2 ∈ 𝒳𝒳, for any 𝜃𝜃 ∈ ℝ,
then 𝜃𝜃𝑥𝑥1 + (1 − 𝜃𝜃)𝑥𝑥2 represents a point on the line crossing 𝑥𝑥1 and 𝑥𝑥2 .
4
Affine Sets
5
Pictures from Google image
Convex Sets
Convex set: the set that contains all line segment between any two
distinct points in the set 𝒞𝒞 1>=Theta >=0
∀𝑥𝑥1 , 𝑥𝑥2 ∈ 𝒞𝒞, 𝜃𝜃 ∈ [0,1] ⇒ 𝜃𝜃𝑥𝑥1 + (1 − 𝜃𝜃)𝑥𝑥2 ∈ 𝒞𝒞
Points inside Line segment (1>=theta>=0)
Set C area within Set C area
Y
N
Intuitive explanation: in a convex set, you can see everywhere
wherever you stand
Try it yourself: Are the following sets convex?
Y N N
6
Pictures from Google image
Convex Sets
7
Pictures from Google image
Cones
𝜃𝜃1 𝑥𝑥1 ∈ 𝒞𝒞 (cone)
Cone: if for every 𝑥𝑥 ∈ 𝒞𝒞 and 𝜃𝜃 ≥ 0, we have 𝜃𝜃𝑥𝑥 ∈ 𝒞𝒞 𝜃𝜃2 𝑥𝑥2 ∈ 𝒞𝒞 (cone)
∀𝑥𝑥 ∈ 𝒞𝒞, 𝜃𝜃 ≥ 0 ⇒ 𝜃𝜃𝑥𝑥 ∈ 𝒞𝒞 0.5𝜃𝜃1 𝑥𝑥1 + 0.5𝜃𝜃2 𝑥𝑥2 ∈ 𝐶𝐶 (convex)
2(0.5𝜃𝜃1 𝑥𝑥1 + 0.5𝜃𝜃2 𝑥𝑥2 ) ∈ 𝐶𝐶 (cone)
Convex cone: if 𝒞𝒞 is convex and also a cone
∀𝑥𝑥1 , 𝑥𝑥2 ∈ 𝒞𝒞, 𝜃𝜃1 , 𝜃𝜃2 ≥ 0 ⇒ 𝜃𝜃1 𝑥𝑥1 + 𝜃𝜃2 𝑥𝑥2 ∈ 𝒞𝒞
8
Pictures from Google image
Cones
9
Pictures from Google image
Comparison of affine set, convex set, cone
10
Pictures from Google image
Polyhedron
halfspace is convex
11
Pictures from Google image
Polyhedron
12
Pictures from Google image
Polyhedron
Halfspace: set of the form 𝑥𝑥 𝑎𝑎𝑇𝑇 𝑥𝑥 ≤ 𝑏𝑏, 𝑎𝑎 ≠ 0}
halfspace is convex
Proof: Suppose we have two vectors 𝑥𝑥1 , 𝑥𝑥2 , then for any 𝜃𝜃 ∈ [0,1], we have
13
Pictures from Google image
Polyhedron
15
Example - 1 x1 and x2 is similar to x and y coordinates of a point
y (y1, y2) is a point
Prove that the set 𝑆𝑆 = 𝑥𝑥1 , 𝑥𝑥2 𝑥𝑥1 + 𝑥𝑥2 ≤ 6, −𝑥𝑥1 + 2𝑥𝑥2 ≤ 1} is convex.
Proof: Given any 𝑥𝑥 = 𝑥𝑥1 , 𝑥𝑥2 ∈ 𝑆𝑆, 𝑦𝑦 = (𝑦𝑦1 , 𝑦𝑦2 ) ∈ 𝑆𝑆. For any 𝜃𝜃 ∈ [0,1], we have
𝜃𝜃𝑥𝑥 + 1 − 𝜃𝜃 𝑦𝑦 = (𝜃𝜃𝑥𝑥1 + 1 − 𝜃𝜃 𝑦𝑦1 , 𝜃𝜃𝑥𝑥2 + 1 − 𝜃𝜃 𝑦𝑦2 )
Therefore,𝜃𝜃𝑥𝑥 + 1 − 𝜃𝜃 𝑦𝑦 ∈ 𝑆𝑆.
16
Example -2 Positive semidefinite cone
17
Pictures from Google image
Example -2 Positive semidefinite cone
Proof: 1) Convex
18
Example -2 Positive semidefinite cone
Proof: 2) Cone
19
Example – 3 Intersection of two sets
Suppose we have two convex sets 𝒞𝒞 and 𝒮𝒮. Then, let’s prove 𝒞𝒞 ∩ 𝒮𝒮 is a convex set.
Proof:
Given any 𝑥𝑥1 , 𝑥𝑥2 ∈ 𝒞𝒞 ∩ 𝒮𝒮, then we have 𝑥𝑥1 , 𝑥𝑥2 ∈ 𝒞𝒞 and 𝑥𝑥1 , 𝑥𝑥2 ∈ 𝒮𝒮
Since 𝒞𝒞 and 𝒮𝒮 are all convex sets, then given any 𝜃𝜃 ∈ 0,1
We have
𝜃𝜃𝑥𝑥1 + (1 − 𝜃𝜃)𝑥𝑥2 ∈ 𝒞𝒞
𝜃𝜃𝑥𝑥1 + (1 − 𝜃𝜃)𝑥𝑥2 ∈ 𝒮𝒮
Therefore,
𝜃𝜃𝑥𝑥1 + (1 − 𝜃𝜃)𝑥𝑥2 ∈ 𝒞𝒞 ∩ 𝒮𝒮
20
Convex function
21
Pictures from Google image
Convex function
2
Function f is strongly convex if ∃𝛼𝛼 > 0: 𝑓𝑓 𝑥𝑥 − 𝛼𝛼 𝑥𝑥 2 is convex
About Gradient
stronger
22
Convex function
.
.
1. Suppose f is differentiable and ∇𝑓𝑓(𝑥𝑥) exists at each 𝑥𝑥 ∈ 𝑑𝑑𝑑𝑑𝑑𝑑(𝑓𝑓) About Hessian Matrix
d^2f d^2f
2. First-order condition f with convex domain is convex iff dx1^2 … dx1 dxn
d^2f d^2f
…
height of f(y) must be taller dxn dx1 dxn^2
than the tangent height at y
position
height
23
x y Pictures from Google image
Convex function
Simple proof:
24
Convex function
× 𝒕𝒕 p.23
(z, f(z))
× (𝟏𝟏 − 𝒕𝒕)
x y
25
Convex function
26
Example
Convex functions
• Affine: 𝑎𝑎𝑎𝑎 + 𝑏𝑏 on ℝ for any a and b
• Quadratic function: 𝑎𝑎𝑥𝑥 2 + 𝑏𝑏𝑏𝑏 + 𝑐𝑐 on ℝ for any 𝑎𝑎 ≥ 0
• Exponential: 𝑒𝑒 𝑎𝑎𝑎𝑎 on ℝ for any a
• Negative entropy: 𝑥𝑥𝑥𝑥𝑥𝑥𝑥𝑥(𝑥𝑥) on ℝ++
Proof:
𝑓𝑓 ′ 𝑥𝑥 = 2𝑎𝑎𝑎𝑎 + 𝑏𝑏, 𝑓𝑓 ′′ 𝑥𝑥 = 2𝑎𝑎 ≥ 0
According to the second-order condition, it is convex.
27
Epigraph
The graph of a function 𝑓𝑓: ℝ𝑛𝑛 → ℝ is defined as
𝑥𝑥, 𝑓𝑓 𝑥𝑥 𝑥𝑥 ∈ 𝑑𝑑𝑑𝑑𝑑𝑑 𝑓𝑓 } ⊆ ℝ𝑛𝑛+1
28
Pictures from Google image
How to prove a function 𝒇𝒇(𝒙𝒙) is convex?
• Verify definition
• Show that 𝑓𝑓(𝑥𝑥) is obtained from simple convex functions by operations that
preserve convexity, e.g.
Nonnegative weighted sum
Composition with affine function
Pointwise maximum
Composition
Minimization
Perspective
29
Example - 1
Prove that 𝑓𝑓 𝑥𝑥1 , 𝑥𝑥2 = 𝑥𝑥12 − 2𝑥𝑥1 𝑥𝑥2 + 4𝑥𝑥22 + 3𝑥𝑥1 is convex.
Proof: The gradient of 𝑓𝑓 𝑥𝑥1 , 𝑥𝑥2 = 𝑥𝑥12 − 2𝑥𝑥1 𝑥𝑥2 + 4𝑥𝑥22 + 3𝑥𝑥1 is
𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕
= 2𝑥𝑥1 − 2𝑥𝑥2 + 3, = −2𝑥𝑥1 + 8𝑥𝑥2
𝜕𝜕𝑥𝑥1 𝜕𝜕𝑥𝑥2
The Hessian is
2 −2
𝐻𝐻 𝑥𝑥 =
−2 8
𝐻𝐻(𝑥𝑥) is positive semi-definite. Therefore, 𝑓𝑓 𝑥𝑥1 , 𝑥𝑥2 is a convex function.
30
Example – 2 Pointwise maximum of convex functions
31
Example – 3 Minimization
32
Thanks!
33