[step:Apply the Mean Value Inequality along line segments in the convex domain]Fix $f \in \mathcal{F}$ and two points $x, y \in U$. Since $U$ is convex, the line segment
\begin{align*}
[x, y] := \{x + t(y - x) : t \in [0,1]\}
\end{align*}
lies entirely in $U$. Define the auxiliary function
\begin{align*}
g_{x,y}: [0,1] &\to \mathbb{R} \\
t &\mapsto f(x + t(y - x)).
\end{align*}
Since $f \in C^1(U; \mathbb{R})$ and $[x, y] \subset U$, the function $g_{x,y}$ is continuously differentiable on $[0,1]$ by the chain rule, with
\begin{align*}
g_{x,y}'(t) = \nabla f(x + t(y - x)) \cdot (y - x).
\end{align*}
By the [Fundamental Theorem of Calculus](/theorems/632) applied to $g_{x,y}$ on $[0,1]$,
\begin{align*}
f(y) - f(x) = g_{x,y}(1) - g_{x,y}(0) = \int_0^1 g_{x,y}'(t) \, d\mathcal{L}^1(t) = \int_0^1 \nabla f(x + t(y - x)) \cdot (y - x) \, d\mathcal{L}^1(t).
\end{align*}
Taking absolute values and applying the Cauchy--Schwarz inequality on $\mathbb{R}^n$ to the dot product $\nabla f(z) \cdot (y - x)$ with $z = x + t(y - x)$,
\begin{align*}
|f(y) - f(x)| &\le \int_0^1 |\nabla f(x + t(y - x))| \cdot |y - x| \, d\mathcal{L}^1(t) \\
&\le \int_0^1 M \cdot |y - x| \, d\mathcal{L}^1(t) \\
&= M |y - x|,
\end{align*}
where the second inequality uses the hypothesis $|\nabla f(z)| \le M$ for all $z \in U$. Since $f \in \mathcal{F}$ was arbitrary, every member of $\mathcal{F}$ is Lipschitz with the same constant $M$.[/step]