Skip to content

Hessian Test for Convexity and Concavity

Theorem

Let C⊆RnC\subseteq\mathbb{R}^n be convex and open, and let f ⁣:C→Rf\colon C\to\mathbb{R} be twice continuously differentiable.

Then ff is convex on CC if and only if Hf(x)\boldsymbol{H}_f(\boldsymbol{x}) is positive semidefinite for every x∈C\boldsymbol{x}\in C.

The function ff is concave on CC if and only if Hf(x)\boldsymbol{H}_f(\boldsymbol{x}) is negative semidefinite for every x∈C\boldsymbol{x}\in C.

If Hf(x)\boldsymbol{H}_f(\boldsymbol{x}) is positive definite for every x∈C\boldsymbol{x}\in C, then ff is strictly convex. If Hf(x)\boldsymbol{H}_f(\boldsymbol{x}) is negative definite for every x∈C\boldsymbol{x}\in C, then ff is strictly concave.


Interpretation

The Hessian test turns the geometric question of bending upward or downward into a matrix definiteness check at every point of the domain. It extends the one-variable criterion that a twice-differentiable function on an open interval is convex if and only if f′′≥0f''\ge0 there (convexity and concavity).

Three surfaces: an upward bowl (convex, positive semidefinite Hessian), a downward dome (concave, negative semidefinite Hessian) and a saddle (indefinite Hessian, neither).

The bowl x12+x22x_1^2+x_2^2 has Hessian 2I2\boldsymbol{I} at every point, positive definite, so it is strictly convex; the dome −x12−x22-x_1^2-x_2^2 has −2I-2\boldsymbol{I} and is strictly concave. The saddle x12−x22x_1^2-x_2^2 has the indefinite Hessian diag⁡(2,−2)\operatorname{diag}(2,-2): along the x1x_1-axis the graph bends up, along the x2x_2-axis down, so it is neither.

The test reduces to one variable. On the segment from x\boldsymbol{x} to y\boldsymbol{y}, put d=y−x\boldsymbol{d}=\boldsymbol{y}-\boldsymbol{x} and g(t)=f(x+td)g(t)=f(\boldsymbol{x}+t\boldsymbol{d}); the chain rule, applied twice, gives

g′′(t)=d⊤Hf(x+td)d,g''(t)=\boldsymbol{d}^{\top}\boldsymbol{H}_f(\boldsymbol{x}+t\boldsymbol{d})\boldsymbol{d},

and ff is convex exactly when every such gg is. So the condition must hold at every point of CC, and CC must be convex, or segments leave the domain: 1/x21/x^2 has f′′>0f''>0 on R∖{0}\mathbb{R}\setminus\{0\}, but the segment from −1-1 to 11 crosses the gap, so convexity there is not even defined. Definiteness at a general point is checked with Sylvester's criterion: for −x2−xy−y2-x^2-xy-y^2 in the interactive example the leading minors are −2-2 and 33 everywhere.

The strict statement only goes one way: x4+y4x^4+y^4 is strictly convex, but its Hessian diag⁡(12x2,12y2)\operatorname{diag}(12x^2,12y^2) is only positive semidefinite, not positive definite, on the coordinate axes (where x=0x=0 or y=0y=0). The test pays off in optimization, because for a convex function every local minimum is a global minimum.


Key Results

  • Positive semidefinite Hessian everywhere is equivalent to convexity under the stated smoothness and convex-domain assumptions.
  • Negative semidefinite Hessian everywhere is equivalent to concavity under the same assumptions.
  • Positive definiteness everywhere is sufficient for strict convexity, but not necessary in every case.

Examples

  • For f(x,y)=x2+y2f(x,y)=x^2+y^2, Hf=2I\boldsymbol{H}_f=2\boldsymbol{I}, so ff is strictly convex.
  • For f(x,y)=−(x2+y2)f(x,y)=-(x^2+y^2), Hf=−2I\boldsymbol{H}_f=-2\boldsymbol{I}, so ff is strictly concave.

Prerequisites

Sources

Keywords: Hessian convexity test, Hessian concavity test, second derivative convexity test Symbols: element of, real numbers, subset

Last updated: 27 October 2026 11:52