Let $X \subset \mathbb{R}^{n}$ be compact and convex. Moreover, let $f:X \rightarrow \mathbb{R}$ be a differentiable map with $\sup_{x \in X} \|\nabla f(x)\| = K < \infty$, where $\|\cdot\|$ denotes the Euclidean norm and $\nabla f$ the gradient.
Both in this question and in this webpage it is said that the best (minimal) Lipschitz constant of $f$ is $K$. If this is a basic result in real analysis, could someone please point me to a reference?