Convex functions and Jensen's inequality

Database › Mathematics › Applied mathematics › Optimization

OPTM-0003TheoremUndergraduate

A convex function lies below its chords and above its tangents; any local minimum of a convex function is global, a strictly convex one has at most one minimizer, and Jensen's inequality f(E[X]) ≤ E[f(X)] holds.

$$f(\lambda\mathbf x+(1-\lambda)\mathbf y)\le\lambda f(\mathbf x)+(1-\lambda)f(\mathbf y)\iff H=\Big[\frac{\partial^2f}{\partial x_i\partial x_j}\Big]\succeq0;\qquad f(E[X])\le E[f(X)]$$

Explanation

For a differentiable convex $f$, $f(\mathbf y)\ge f(\mathbf x)+\nabla f\cdot(\mathbf y-\mathbf x)$, so a point with $\nabla f=0$ is a global minimum; this is why convex problems (least squares, many variational problems) are reliably solvable by gradient descent or Newton's method. The equivalence with a positive semidefinite Hessian holds for twice-differentiable $f$.

Jensen's inequality, the probabilistic form of the chord condition, gives the AM–GM inequality ($\ln$ is concave), $E[X^2]\ge E[X]^2$, and the Gibbs/Bogoliubov inequalities and positivity of relative entropy in statistical physics.

Example 1

Show that $f=x^2+y^2-xy-3x$ is convex and find its global minimum.

Solution

$H=\begin{pmatrix}2&-1\\-1&2\end{pmatrix}$ has eigenvalues 1 and 3, so $f$ is strictly convex. $2x-y-3=0$, $2y-x=0$ give $(2,1)$, and $f=-3$ is the unique global minimum.

Example 2

Use Jensen's inequality to prove the AM–GM inequality $\frac{a_1+\dots+a_n}n\ge(a_1\cdots a_n)^{1/n}$ for positive $a_i$.

Solution

$\ln$ is concave, so $\ln\big(\frac1n\sum a_i\big)\ge\frac1n\sum\ln a_i=\ln(a_1\cdots a_n)^{1/n}$; exponentiate. Equality iff all $a_i$ are equal.

Related entries