# $f$ is convex function iff Hessian matrix is nonnegative-definite.

Let $f: \mathbb{R}^2 \rightarrow \mathbb{R}$, $f \in C^2$. Show that $f$ is convex function iff Hessian matrix is nonnegative-definite.

$f(x,y)$ is convex if $f( \lambda x + (1-\lambda )y) \le \lambda f(x) + (1- \lambda)f(y)$ for any $x,y \in \mathbb{R}^2$.

Hessian matrix is nonnegative-definite if $f_{xx}'' x^2 + f_{x,y}(x+y) + f_{yy}''y^2 \ge 0$

I know the definition but I have no idea how prove the If and only if condition or first and second implication?

• Hint: use Taylor's theorem. – Paul Siegel Mar 20 '14 at 20:07

## 1 Answer

I would use restrictions to lines: $\phi_{a,b}(t) = f(a+tb)$ where $t\in\mathbb R$ and $a,b\in\mathbb R^2$ and $b\ne 0$. The key points are:

1. $f$ is convex if and only if $\phi_{a,b}$ is convex for every $a,b$. This follows from the fact that definition of convexity involves points on the same line.

2. The Hessian of $f$ is nonnegative definite (aka positive semidefinite) if and only if $\phi_{a,b}''\ge 0$ for all $a,b$. Indeed, Hessian is a symmetric matrix and for such matrices being nonnegative is equivalent to $b^THb\ge 0$ for all $b\in\mathbb R^2$. By the multivariable chain rule, $b^THb$ gives $\phi_{a,b}''$.

• How do you get from part 1 and 2 that $f(\lambda x +(1-\lambda)y)\leq (1-\lambda)f(x) + \lambda f(y)$? How do you extract this 'line manipulating inequality' from the second derivative being non negative? – user162520 Aug 13 '14 at 4:42
• @user162520 I took the one-dimensional result as known: a function on real line is convex if and only if its second derivative is nonnegative. See math.stackexchange.com/q/279750 – user147263 Aug 13 '14 at 4:45
• Cool, thanks brother! – user162520 Aug 13 '14 at 4:51