I noticed many identical questions on this site relating to equivalent definitions of convexity, see for example 668679, 740938, 318692, 1717542, 1761801, 3019331, 3047518 and there might be more.
So I wanted to create a "big list" of equivalent definitions of convex functions, I will start with some equivalent definitions and post my proofs in my answer below. Feel free to add any other equivalent definitions. This question can then serve as an abstract duplicate.
Claim. Let $n\in\mathbb N$ and $f\in\mathcal C^1(\mathbb R^n)$. Then the following are equivalent:
- $f$ is convex, i.e. $f(\lambda x_1 + (1-\lambda x_2))\le\lambda f(x_1)+(1-\lambda)f(x_2)$ for all $\lambda\in[0,1]$ and $x_1,x_2\in\mathbb R^n$.
- For all $x,y\in\mathbb R^n$, $\langle\nabla f(x)-\nabla f(y),x-y\rangle\geq0$.
- For every $x,y\in\mathbb R^n$, $f(y)\geq f(x)+\langle y-x,\nabla f(x)\rangle$.
(2) some books have "function convexity" inherited from the definition of "set convexity", in the following way: $f$ is said to be convex if the epigraph of $f$ is convex. Then, it is shown that definition actually implies the other ones.
(3) Your first item could be fixed to have minimal assumptions, in that convexity is guaranteed even when $\lambda\in\left]0,1\right[$.
– Zim Jan 23 '21 at 01:44