I would like to prove that if $S$ is a non-empty convex subset, and $f:S \xrightarrow{} R $ is a convex and differentiable function, that the following holds true: $ |f(x)-f(y)| \le L\|x-y \|_{2} \Longleftrightarrow \| \nabla f(x) \|_{2} \le L $
I already have $\rightarrow$, but I am unfinished with $\leftarrow$. The following is what I currently have: From convexity: $f(x) - f(y) \le \nabla f(x)^T(x-y) $
According to Cauchy-Schwartz, the following also holds true:
$ |\nabla f(x)^T(x-y)| \le \|\nabla f(x)\|_{2} \|x-y\|_{2}$
It is given that $\| \nabla f(x) \|_{2} \le L$, so the following is true:
$ |\nabla f(x)^T(x-y)| \le L \|x-y\|_{2} $
Hence, because $\forall a: |a| \ge a$, we have:
$ \nabla f(x)^T(x-y) \le |\nabla f(x)^T(x-y)| \le L \|x-y\|_{2}$
So far I have proven the following: $ f(x)-f(y) \le L\|x-y \|_{2} $
But I am missing the absolute value, I have made some attempts but they all involve making fallacies with inequality signs... Does anyone have an idea?
Hint
Convexity of $f$ is not necessary here. Since $S$ is convex, by mean value theorem, there is $c_{x,y}\in (x,y)=\{x+t(y-x)\mid t\in (0,1)\}$ s.t. $$f(x)-f(y)=\nabla f(c_{x,y})\cdot (y-x).$$