# $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

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