1

1

recall function is convex if inequality holds for

f(\theta x + (1-\theta)y) &= max_i (\theta x_i + (1 - \theta) y_i) \\ &\le \theta \max_i x_i + (1 - \theta) \max_i y_i \\ &= \theta f(x) + (1-\theta)f(y) \end{aligned}$$ ### 2 to be convex: Hessian must be positive semidefinite at every point in function's domain for any non-zero vector $z$, condition $z_T H f(x) z \ge 0$ must hold, where $H f(x)$ is the Hessian matrix of $f$ at $x$ [picture] (this is the second order condition in slides) ### 3 $$d_y(x) = (x-y)^T (x-y) = \sum (x_i - y_i)^2$$ find second partial derivation of this function $$d_y(x) = 2(x - y)$$ $$d_y(x) = 2I \succ 0$$ [picture] # 2 ### 1 repeat of first question recall function is convex if inequality holds [picture] ### 2 Let $x, y \in \text{dom} (f \circ g)$ and $\lambda \in [0,1]$ be arbitrary. We simply compute [picture] ### 3 [picture] # 3 ### 1 [picture] ### 2 [picture] # 4 (programming exercise)