[proofplan]
We argue by contradiction from the negation of [uniform continuity](/pages/1240). This negation gives two [sequences](/pages/1149) in $[a,b]$ whose mutual distance tends to $0$ while their function values remain separated by a fixed positive amount. Compactness of the closed interval, through the [Bolzano-Weierstrass Theorem](/theorems/171), gives a convergent subsequence of one sequence, and the distance estimate forces the paired subsequence to have the same limit. [Continuity](/pages/1199) of $f$ at that common limit then contradicts the fixed separation of the function values.
[/proofplan]
[step:Negate uniform continuity to construct close points with separated images]
Assume, for contradiction, that $f$ is not uniformly continuous on $[a,b]$. By the negation of [uniform continuity](/page/Uniform%20Continuity), there exists $\epsilon_0 > 0$ such that for every $\delta > 0$, there exist $x,y \in [a,b]$ satisfying
\begin{align*}
|x-y| < \delta
\quad \text{and} \quad
|f(x)-f(y)| \geq \epsilon_0.
\end{align*}
For each $n \in \mathbb{N}$, apply this statement with $\delta = 1/n$. This defines sequences
\begin{align*}
x_\bullet: \mathbb{N} &\to [a,b],
&
n &\mapsto x_n,
\\
y_\bullet: \mathbb{N} &\to [a,b],
&
n &\mapsto y_n,
\end{align*}
such that for every $n \in \mathbb{N}$,
\begin{align*}
|x_n-y_n| < \frac{1}{n}
\quad \text{and} \quad
|f(x_n)-f(y_n)| \geq \epsilon_0.
\end{align*}
[guided]
We prove this step by spelling out the logical negation of uniform continuity. Uniform continuity of $f$ on $[a,b]$ means that for every $\epsilon > 0$ there exists $\delta > 0$ such that whenever $x,y \in [a,b]$ and $|x-y| < \delta$, one has $|f(x)-f(y)| < \epsilon$. Therefore, if $f$ is not uniformly continuous, there is one positive tolerance $\epsilon_0 > 0$ that cannot be achieved uniformly: for every $\delta > 0$, there exist $x,y \in [a,b]$ with
\begin{align*}
|x-y| < \delta
\quad \text{and} \quad
|f(x)-f(y)| \geq \epsilon_0.
\end{align*}
Now choose a specific sequence of tolerances tending to $0$, namely $\delta = 1/n$ for $n \in \mathbb{N}$. For each $n$, the failed uniform-continuity condition supplies points $x_n,y_n \in [a,b]$. Thus we obtain sequences
\begin{align*}
x_\bullet: \mathbb{N} &\to [a,b],
&
n &\mapsto x_n,
\\
y_\bullet: \mathbb{N} &\to [a,b],
&
n &\mapsto y_n,
\end{align*}
with
\begin{align*}
|x_n-y_n| < \frac{1}{n}
\quad \text{and} \quad
|f(x_n)-f(y_n)| \geq \epsilon_0
\end{align*}
for every $n \in \mathbb{N}$. The [first inequality](/theorems/2897) says the paired points are forced together; the second says their function values remain separated by at least the fixed amount $\epsilon_0$.
[/guided]
[/step]
[step:Extract a subsequence whose paired points converge to the same limit]
Since $x_n \in [a,b]$ for every $n \in \mathbb{N}$, the sequence $(x_n)$ is bounded in $\mathbb{R}$. By the [Bolzano-Weierstrass Theorem](/theorems/628), there exist a strictly increasing map
\begin{align*}
n_\bullet: \mathbb{N} &\to \mathbb{N},
&
j &\mapsto n_j,
\end{align*}
and a point $c \in \mathbb{R}$ such that $x_{n_j} \to c$. Since each $x_{n_j}$ lies in the closed interval $[a,b]$, the limit satisfies $c \in [a,b]$.
For every $j \in \mathbb{N}$, the triangle inequality gives
\begin{align*}
|y_{n_j}-c|
\leq |y_{n_j}-x_{n_j}| + |x_{n_j}-c|
< \frac{1}{n_j} + |x_{n_j}-c|.
\end{align*}
Because $n_j \to \infty$ and $x_{n_j} \to c$, the right-hand side tends to $0$. Hence $y_{n_j} \to c$.
[guided]
The sequence $(x_n)$ lies in $[a,b]$, so it is bounded in $\mathbb{R}$ because $a \leq x_n \leq b$ for all $n \in \mathbb{N}$. The Bolzano-Weierstrass Theorem applies to bounded real sequences; therefore there is a subsequence indexed by a strictly increasing map
\begin{align*}
n_\bullet: \mathbb{N} &\to \mathbb{N},
&
j &\mapsto n_j,
\end{align*}
and there is a real number $c \in \mathbb{R}$ such that $x_{n_j} \to c$. Since every term $x_{n_j}$ belongs to $[a,b]$ and $[a,b]$ is [closed](/pages/1145) in $\mathbb{R}$, the limit point belongs to the same interval: $c \in [a,b]$.
We now show that the paired subsequence $(y_{n_j})$ converges to the same point. For each $j \in \mathbb{N}$, the triangle inequality in $\mathbb{R}$ gives
\begin{align*}
|y_{n_j}-c|
\leq |y_{n_j}-x_{n_j}| + |x_{n_j}-c|.
\end{align*}
The construction of the sequences gives $|y_{n_j}-x_{n_j}| < 1/n_j$, so
\begin{align*}
|y_{n_j}-c|
< \frac{1}{n_j} + |x_{n_j}-c|.
\end{align*}
Because the indices $n_j$ are strictly increasing, $n_j \to \infty$, and hence $1/n_j \to 0$. Also $x_{n_j} \to c$ by construction. Therefore the upper bound tends to $0$, and the squeeze principle for nonnegative real sequences yields $|y_{n_j}-c| \to 0$. This is exactly $y_{n_j} \to c$.
[/guided]
[/step]
[step:Use continuity at the common limit to contradict the fixed separation]
The point $c$ belongs to $[a,b]$, and $f$ is continuous on $[a,b]$ by hypothesis. Therefore $f$ is continuous at $c$. Since $x_{n_j} \to c$ and $y_{n_j} \to c$ with all terms in the domain $[a,b]$, the [sequential characterisation of continuity](/theorems/179) gives
\begin{align*}
f(x_{n_j}) \to f(c)
\quad \text{and} \quad
f(y_{n_j}) \to f(c).
\end{align*}
By continuity of subtraction and absolute value on $\mathbb{R}$,
\begin{align*}
|f(x_{n_j})-f(y_{n_j})|
\to |f(c)-f(c)|
= 0.
\end{align*}
This contradicts the construction, which gives
\begin{align*}
|f(x_{n_j})-f(y_{n_j})| \geq \epsilon_0
\end{align*}
for every $j \in \mathbb{N}$, with $\epsilon_0 > 0$. The contradiction shows that the assumption that $f$ is not uniformly continuous is false. Hence $f$ is uniformly continuous on $[a,b]$.
[/step]