Convexity and subgradients · Definition

Convexity and the Hessian

continuous optimizationconvexity and subgradients

Before you start you need to know

When a function has second derivatives, convexity can be checked without comparing chords. It suffices to examine the curvature at each point through the Hessian.

Definition

Criterion characterizing convexity of a twice differentiable function through positive semidefiniteness of its Hessian matrix \(\nabla^2 f(x)\) at every point of the domain.

\[f \text{ convexa} \iff \nabla^2 f(x) \succeq 0 \ \forall x \in \operatorname{dom} f\]

If \(f\) is twice differentiable and its domain \(\operatorname{dom} f\) is convex, then \(f\) is convex if and only if \(\nabla^2 f(x) \succeq 0\) for all \(x\). If the inequality is strict everywhere, \(f\) is strictly convex, although the converse does not always hold. Semidefiniteness is checked with nonnegative eigenvalues or nonnegative principal minors.

Consider \(f(x,y)=x^2+xy+y^2\). Its second derivatives give \(\nabla^2 f=\begin{pmatrix}2&1\\1&2\end{pmatrix}\), whose eigenvalues are \(1\) and \(3\), both positive. Hence \(f\) is strictly convex on \(\mathbb{R}^2\).

A typical mistake is concluding convexity by looking only at the Hessian entries, for example that they are positive. A matrix with all positive entries can still have a negative eigenvalue, such as \(\begin{pmatrix}1&3\\3&1\end{pmatrix}\), and then it is not positive semidefinite.

Think about it

Can a strictly convex function have a zero Hessian at some point?

Yes. For example, \(f(x)=x^4\) is strictly convex and \(f''(0)=0\), so strict positivity of the Hessian is not necessary.

Exercises 10

References

  • Stephen Boyd, Lieven Vandenberghe, Convex Optimization, 1st edition, Cambridge University Press, 2004.
  • Jorge Nocedal, Stephen J. Wright, Numerical Optimization, 2nd edition, Springer, 2006.