# A function is convex if and only if its gradient is monotone.

Let a convex $U \subset_{op} \mathbb{R^n} , n \geq 2$, with the usual inner product. A function $F: U \rightarrow \mathbb{R^n}$ is monotone if $\langle F(x) - F(y), x-y \rangle \geq 0, \forall x,y \in \mathbb{R^n}.$

Let $f:U \rightarrow \mathbb{R}$ differentiable. Show that $f$ is convex $\iff \nabla f:U \rightarrow \mathbb{R^n}$ is monotone.

My attempt on the right implication: I already proved that if $f$ is convex and 2-differentiable then $f''(x) \geq 0$. But this exercise only says f is 1-differentiable. Then I tried the following: $f$ is convex $\iff \forall x,y \in U$ the function $\varphi:[0,1] \rightarrow \mathbb{R}$, defined by $\varphi(t) = f((1-t)x+ty)$ is convex. Then $\varphi'$ is non-decreasing, then $\nabla \varphi(x) \geq 0$... but I'm stucked here.

My attempt on the left implication:

$|\nabla \varphi (x) - \nabla \varphi (y)|| x-y| \geq | \langle \nabla \varphi (x) - \nabla \varphi (y), x-y \rangle | \geq 0$

And so $|\nabla \varphi (x) - \nabla \varphi (y)| \geq 0$ then $\nabla \varphi$ is non-increasing and then (By an already proved Theorem) it is convex.

Can someone please verify what I did and give me a hint?

Thanks.

• If you define $F$ only on $U$, then it is difficult to verify $\langle F(x) - F(y), x-y \rangle\ge 0$ for every $x,y\in\mathbb R^n$. – user251257 Mar 28 '16 at 19:34
• Did you mean isn't difficult? – user286485 Mar 28 '16 at 20:19
• no. How do you compute $F(x)$ for $x\notin U$? – user251257 Mar 28 '16 at 20:20
• As much as I love the humor in the error, the term is monotone or monotonic, not monotonous :-) Convex functions are anything but monotonous! math.stackexchange.com/q/365717/52878 – Michael Grant Jun 15 '18 at 13:22

1) If $f$ is convex, then $$f(y)\geq f(x) + \nabla f(x)\cdot (y-x)$$
and $$f(x)\geq f(y) + \nabla f(y)\cdot (x-y)$$
so that by adding $$(y-x)\cdot( \nabla f(x) - \nabla f(y)) \leq 0$$
2) Assume that $\nabla f$ is monotone : Define $A =\{ x| f(x)\leq a\}$. If $A$ is not convex, then there are $x,\ y\in \partial A$ s.t. $$\nabla f(x)\cdot (y-x),\ \nabla f(y)\cdot (x-y) >0$$ Hence $$(\nabla f(x) -\nabla f(y))\cdot (y-x) >0$$