For a differentiable function $f:\mathbb R^d\rightarrow \mathbb R$, show that if $\langle x-y,\nabla f(x)-f(y)\rangle\ge0$, then f is convex.
Can someone explain the steps in the Link in baby language and baby symbols. That is, step 2) in the linked answer.
What does $A=\{x|f(x)\le a\}$ represent and why are are there $x,y\in \partial A$ (what is $\partial A)$ such that $\nabla f(x)\cdot (y-x)>0$ if A is not convex? Is A a convex set, and what's its relationship with a convex function?
Edit: So I see that it represents a "sublevel set" and has to be convex for f to be convex. I still don't know why A being not convex implies that $\nabla f(x)\cdot (y-x)>0,\nabla f(y)\cdot(x-y)>0$ for some "$x,y\in\partial A"$.