Convexity

Definition (convex set) open_in_new

A set $S\subseteq \R^n$ is said to be convex if for every $\v x,\v y\in S$ and $\lambda\in[0,1]$, $$ \begin{align*} \lambda \v x + (1-\lambda) \v y \in S. \end{align*} $$

This means $S$ contains all points on the line segment joined by two points in $S$.

Definition (convex function) open_in_new

A function $f: S\to\R$ is said to be convex if

  • $S$ is convex; and

  • for all $\v x,\v y\in S$ and $\lambda\in(0,1)$, $$ \begin{align*} f\big(\lambda \v x + (1-\lambda)\v y\big) \leq \lambda f(\v x) + (1-\lambda) f(\v y). \tag{*} \end{align*} $$

This means the graph is always under the secant line between two points.

$f$ said to be strictly convex if strict inequality holds in (*).

Notation (definite matrix) open_in_new

An $n\times n$ matrix $A$ is said to be positive semidefinite, denoted as $A\succeq 0$, if $\v x^T A\v x \geq 0$ for all $x\in\R^n$.

We write $A\succeq B$ to mean $A-B\succeq 0$, and $A\preceq B$ to mean $B-A\succeq 0$.

Definition (Hessian) open_in_new

For a twice differentiable function $f:\R^n \to \R$, the Hessian $\nabla^2 f(x)$ is defined to be an $n\times n$ matrix with entrices $$ \begin{align*} \big[\nabla^2 f(x)\big]_{ij} = \frac{\partial^2 f(x)}{\partial x_i x_j}. \end{align*} $$

Theorem (first-order condition of convex functions) open_in_new

A differentiable function $f: \R^n \to \R$ is convex iff for all $\v x,\v y\in\R^n$, $$ \begin{align*} f(\v y) \geq f(\v x) + \nabla f(x)^T (\v y-\v x) \end{align*} $$

Proof

Note that if $\nabla f(x_0) = \v 0$ for some $\v x_0$, then $f(\v y) \geq f(\v x_0)$ for all $\v y$ so $\v x_0$ is a local minimum.

Theorem (convex function iff increasing directional gradient) open_in_new

A differentiable function $f: \R^n \to \R$ is convex iff for all $\v x,\v y\in\R^n$, $$ \begin{align*} (\v y-\v x) \cdot (\nabla f(\v y) - \nabla f(\v x)) \geq 0. \end{align*} $$

Proof

Theorem (second-order condition of convex functions) open_in_new

A twice differentiable function $f: \R^n \to \R$ is convex iff $\nabla^2 f(\v x)$ $\succeq 0$ for all $\v x\in\R^n$.

Proof for sufficiency