Convexity characterized by positive semidefinite Hessian

A C^2 function on an open convex set is convex iff its Hessian is positive semidefinite everywhere
Convexity characterized by positive semidefinite Hessian

Theorem. Let f:ΩRf:\Omega\to\mathbb{R} be twice continuously differentiable on a nonempty open convex set ΩRn\Omega\subset\mathbb{R}^n. Then ff is convex on Ω\Omega if and only if for every xΩx\in\Omega its Hessian matrix 2f(x)\nabla^2 f(x) is positive semidefinite (in the sense of ), i.e.,

v,2f(x)v0for all vRn. \langle v,\nabla^2 f(x)\,v\rangle \ge 0 \quad \text{for all } v\in\mathbb{R}^n.

Context. This is the standard multivariable calculus criterion for convexity and underlies many second-order methods in optimization.

Proof sketch. Convexity of ff is equivalent to convexity of every restriction to a line: for fixed xΩx\in\Omega and direction dRnd\in\mathbb{R}^n, consider φ(t)=f(x+td)\varphi(t)=f(x+td) on the maximal interval where x+tdΩx+td\in\Omega. Apply the one-dimensional criterion to φ\varphi, noting that φ(t)=d,2f(x+td)d\varphi''(t)=\langle d,\nabla^2 f(x+td)d\rangle.