---
title: Uniform Continuity
module: Limits and Continuity
moduleNumber: 4
lessonNumber: 4
order: 404
summary: >
  Uniform continuity strengthens continuity by demanding one delta that works at
  every point of the domain, not a delta re-chosen at each point. It separates
  x^2 on a compact interval from x^2 on the whole line and from 1/x near zero;
  continuity on a closed bounded interval is automatically uniform; uniformly
  continuous functions preserve Cauchy sequences and extend to endpoints; and
  Lipschitz continuity is the strongest of the three, through its secant-slope
  bound.
topics: [Limits and Continuity]
sources:
  - book: Lebl
    ref: "Ch. 3 — Continuous Functions; §3.4 Uniform continuity"
  - book: Shkoller
    ref: "Ch. 1 — uniform-continuity lemmas used for integrability"
draft: false
---

In the definition of [continuity](/real-analysis/continuity/continuous-functions)
the number $\delta$ depends on both the tolerance $\epsilon$ and the point $c$.
At a point where the graph is steep, $\delta$ must be small; where it is flat,
$\delta$ can be large. Uniform continuity requires a single $\delta$ that works
simultaneously at every point of the domain. Whether one exists depends on the
shape of the domain as much as on the function.

## The definition

> **Definition (Uniform continuity).**[^lebl-def] Let $S \subseteq \mathbb{R}$ and
> $f : S \to \mathbb{R}$. Then $f$ is **uniformly continuous** if for every
> $\epsilon > 0$ there is a $\delta > 0$ such that
> $$
> x, c \in S \text{ and } |x - c| < \delta \implies |f(x) - f(c)| < \epsilon.
> $$

The two definitions differ only in quantifier order. Continuity reads "for each
$c$, for each $\epsilon$, there is a $\delta$": $\delta$ may be chosen after
seeing $c$. Uniform continuity reads "for each $\epsilon$, there is a $\delta$,
good for all $c$": $\delta$ is chosen before any point is named, and $x$ and $c$
enter symmetrically. A uniformly continuous function is continuous; the converse
can fail.

| Condition | Quantifier structure | $\delta$ depends on |
| --- | --- | --- |
| Continuous at $c$ | $\forall c\ \forall \epsilon\ \exists \delta$ | $\epsilon$ and $c$ |
| Uniformly continuous | $\forall \epsilon\ \exists \delta\ \forall c$ | $\epsilon$ only |
| Lipschitz | $\exists K\ \forall x,c$ | a fixed slope bound $K$ |

## Two decisive examples

> **Worked example ($x^2$ on $[0,1]$ is uniformly continuous).** For
> $x, c \in [0,1]$,
> $$
> |x^2 - c^2| = |x + c|\,|x - c| \le (|x| + |c|)\,|x - c| \le 2|x - c|,
> $$
> so $\delta = \epsilon/2$ works everywhere at once, with no dependence on the
> point.

> **Worked example ($x^2$ on $\mathbb{R}$ is not uniformly continuous).** Suppose
> some $\delta$ worked for $\epsilon = 1$. Take $x$ large and $c = x +
> \delta/2$, the witness pair. Then $|x - c| = \delta/2 < \delta$, yet
> $$
> |x^2 - c^2| = |x + c|\,|x - c| = \left(2x + \tfrac{\delta}{2}\right)\tfrac{\delta}{2} \ge \delta x,
> $$
> which exceeds $1$ once $x > 1/\delta$. The slope $|x + c|$ grows without bound,
> so no fixed $\delta$ works; the same output tolerance needs an ever-smaller
> input window as $x$ increases.

$$
% caption: For x-squared on the whole line, a pair a fixed width apart has images
% that spread further the larger x is: the same input gap produces a larger and
% larger output gap, so no single window controls the output everywhere.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\definecolor{wrn}{HTML}{B0672F}
\draw[black, ->] (-0.2,0) -- (5.0,0) node[anchor=north] {$x$};
\draw[black, ->] (0,-0.2) -- (0,4.4) node[anchor=east] {$y$};
\draw[acc, very thick] plot[domain=0:2.05, samples=60] (\x, {0.95*\x*\x});
% near pair
\draw[black] (0.7,0) -- (0.7,0.47); \draw[black] (1.0,0) -- (1.0,0.95);
\draw[<->, black] (0.7,-0.02) -- (1.0,-0.02);
\draw[wrn] (0,0.47) -- (0.7,0.47); \draw[wrn] (0,0.95) -- (1.0,0.95);
\draw[<->, wrn] (-0.12,0.47) -- (-0.12,0.95);
\node[wrn, anchor=east, font=\footnotesize] at (-0.16,0.7) {small};
% far pair, same width
\draw[black] (1.6,0) -- (1.6,2.43); \draw[black] (1.9,0) -- (1.9,3.43);
\draw[<->, black] (1.6,-0.02) -- (1.9,-0.02);
\draw[wrn] (0,2.43) -- (1.6,2.43); \draw[wrn] (0,3.43) -- (1.9,3.43);
\draw[<->, wrn] (-0.12,2.43) -- (-0.12,3.43);
\node[wrn, anchor=east, font=\footnotesize] at (-0.16,2.95) {large};
\node[black, anchor=west, font=\footnotesize] at (2.2,1.3) {same input width};
\end{tikzpicture}
$$

> **Worked example ($1/x$ on $(0,1)$ is not uniformly continuous).** Near $0$ the
> graph steepens without limit. Fixing $\epsilon < 1$ and testing $x$ with
> $y = x + \delta/2$ forces $\delta/2 < x(x + \delta/2)\epsilon < x$ for all
> small $x > 0$, impossible for a positive $\delta$. Points a fixed distance
> $\delta$ apart can have images an arbitrary distance apart when both sit near
> the singularity.

$$
% caption: For a uniformly continuous graph one delta-window (left) keeps the
% output inside the band at every location; for 1/x near zero (right) the same
% output band forces an ever-narrower window as x approaches the axis.
\begin{tikzpicture}[scale=0.95, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\definecolor{wrn}{HTML}{B0672F}
% --- left: uniform, one delta slides ---
\begin{scope}
\draw[black, ->] (-0.2,0) -- (4.4,0) node[anchor=north] {$x$};
\draw[black, ->] (0,-0.2) -- (0,3.4) node[anchor=east] {$y$};
\draw[acc, very thick] (0.2,0.6) .. controls (1.6,1.4) and (2.8,2.0) .. (4.2,2.6);
% same-width windows at two places
\draw[black] (1.0,0) -- (1.0,3.1); \draw[black] (1.7,0) -- (1.7,3.1);
\draw[black] (3.0,0) -- (3.0,3.1); \draw[black] (3.7,0) -- (3.7,3.1);
\draw[<->, acc] (1.0,0.25) -- (1.7,0.25); \node[acc, anchor=south, font=\footnotesize] at (1.35,0.28){one width};
\draw[<->, acc] (3.0,0.25) -- (3.7,0.25); \node[acc, anchor=south, font=\footnotesize] at (3.35,0.28){same width};
\node[anchor=south, font=\footnotesize] at (2.2,3.05) {uniform};
\end{scope}
% --- right: 1/x steepening ---
\begin{scope}[xshift=6.0cm]
\draw[black, ->] (-0.2,0) -- (4.4,0) node[anchor=north] {$x$};
\draw[black, ->] (0,-0.2) -- (0,3.4) node[anchor=east] {$y$};
\draw[wrn, very thick] plot[domain=0.42:4.1, samples=60] (\x, {1.3/\x});
\draw[black] (0.55,0) -- (0.55,3.1); \draw[black] (0.95,0) -- (0.95,3.1);
\draw[black] (2.6,0) -- (2.6,1.4); \draw[black] (3.5,0) -- (3.5,1.4);
\draw[<->, wrn] (2.6,0.25) -- (3.5,0.25); \node[wrn, anchor=south, font=\footnotesize] at (3.05,0.28){wide window ok};
\draw[<->, wrn] (0.55,1.9) -- (0.95,1.9); \node[wrn, anchor=south, font=\footnotesize] at (0.75,1.95){window must shrink};
\node[anchor=south, font=\footnotesize] at (2.2,3.05) {not uniform};
\end{scope}
\end{tikzpicture}
$$

In all three failures the domain is either unbounded or not closed, and the slope
grows without bound toward a missing endpoint or toward infinity. The next theorem
shows that neither can happen on a closed bounded interval.

## Continuity on a compact interval is uniform

> **Theorem (Heine's uniform continuity theorem).** A continuous function
> $f : [a,b] \to \mathbb{R}$ is uniformly continuous.[^lebl-heine]

> **Proof.** Argue by contrapositive: if $f$ is not uniformly continuous, we find
> a point of discontinuity. Negating the definition gives an $\epsilon > 0$ such
> that for every $\delta$ there are points within $\delta$ whose images are
> $\epsilon$ apart. Take $\delta = 1/n$ to get sequences $x_n, y_n \in [a,b]$
> with $|x_n - y_n| < 1/n$ and $|f(x_n) - f(y_n)| \ge \epsilon$. By
> [Bolzano–Weierstrass](/real-analysis/sequences-series/limsup-bolzano-weierstrass)
> a subsequence $x_{n_k} \to c \in [a,b]$, and since $|x_{n_k} - y_{n_k}| \to 0$
> the matching $y_{n_k} \to c$ as well. If $f$ were continuous at $c$, both
> $f(x_{n_k})$ and $f(y_{n_k})$ would tend to $f(c)$, forcing their difference to
> $0$ and contradicting $|f(x_{n_k}) - f(y_{n_k})| \ge \epsilon$. So $f$ is
> discontinuous at $c$.

The proof uses boundedness (to apply Bolzano–Weierstrass) and closedness (to
keep $c$ in the domain), the two properties the failing examples lacked. This is
the uniform-continuity fact that proves the
[integrability of continuous functions](/real-analysis/riemann-integration/darboux-integral).[^shk-int]

## Preserving Cauchy sequences and extending to endpoints

A uniformly continuous function carries
[Cauchy sequences](/real-analysis/sequences-series/cauchy-completeness) to Cauchy
sequences, even when the limit lies outside the domain; a merely continuous
function need not.

> **Lemma (Cauchy preservation).** If $f : S \to \mathbb{R}$ is uniformly
> continuous and $\{x_n\}$ is Cauchy in $S$, then $\{f(x_n)\}$ is Cauchy.[^lebl-ext]

> **Proof.** Given $\epsilon > 0$, take $\delta$ from uniform continuity, then
> $M$ with $|x_n - x_k| < \delta$ for $n, k \ge M$; uniformity gives
> $|f(x_n) - f(x_k)| < \epsilon$ directly.

Ordinary continuity fails this: on $(0,1)$ the Cauchy sequence $1/n$ is sent by
$1/x$ to $n$, which is not Cauchy.

> **Proposition (Continuous extension).** A function $f : (a,b) \to \mathbb{R}$ is
> uniformly continuous if and only if the one-sided limits $\lim_{x\to a^+} f$ and
> $\lim_{x\to b^-} f$ exist and the extension of $f$ to $[a,b]$ using those
> endpoint values is continuous.[^lebl-ext]

> **Proof.** One direction is immediate: a continuous function on $[a,b]$ is
> uniformly continuous by the theorem, and a restriction of a uniformly
> continuous function stays uniformly continuous. For the other, any $x_n \to a$
> is Cauchy, so $\{f(x_n)\}$ is Cauchy, hence convergent by completeness; a short
> three-$\epsilon$ argument shows all such sequences share one limit, which is
> $\lim_{x\to a^+} f$. Filling the endpoints in produces a continuous function on
> the closed interval.

## Lipschitz continuity

The most convenient sufficient condition for uniform continuity is a bound on the
secant slopes.

> **Definition (Lipschitz continuity).** $f : S \to \mathbb{R}$ is **Lipschitz
> continuous** with constant $K$ if $|f(x) - f(y)| \le K|x - y|$ for all
> $x, y \in S$.[^lebl-lip]

> **Proposition.** A Lipschitz continuous function is uniformly continuous.

> **Proof.** Take $\delta = \epsilon/K$: then $|x - y| < \delta$ gives
> $|f(x) - f(y)| \le K|x - y| < \epsilon$.

Rearranged for $x \neq y$, the definition says

$$
\left|\frac{f(x) - f(y)}{x - y}\right| \le K,
$$

so every secant line through two points of the graph has slope at most $K$ in
absolute value. Equivalently, the graph lies inside a **cone** of slope
$\pm K$ anchored at each of its points.

$$
% caption: A K-Lipschitz graph stays inside a cone of slope plus-or-minus K
% anchored at any of its points; no secant is steeper than the cone's sides.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\definecolor{wrn}{HTML}{B0672F}
\draw[black, ->] (-0.2,0) -- (6.6,0) node[anchor=north] {$x$};
\draw[black, ->] (0,-0.2) -- (0,3.9) node[anchor=east] {$y$};
% graph
\draw[acc, very thick] (0.3,0.8) .. controls (1.8,1.6) and (3.0,1.2) .. (4.2,2.2)
  .. controls (5.0,2.9) and (5.6,2.7) .. (6.3,3.2);
% anchor point and cone
\coordinate (P) at (2.4,1.35);
\fill[acc] (P) circle (1.7pt); \node[acc, anchor=north] at (2.4,1.25) {$P$};
\fill[wrn!12] (P) -- ++(3.4,2.38) -- ++(0,-4.76) -- cycle;
\draw[wrn] (P) -- ++(3.4,2.38); \draw[wrn] (P) -- ++(3.4,-2.38);
\draw[wrn] (P) -- ++(-2.1,1.47); \draw[wrn] (P) -- ++(-2.1,-1.47);
\node[wrn, anchor=west, font=\footnotesize] at (5.7,2.6) {max slope $K$};
\end{tikzpicture}
$$

$\sin$ and $\cos$ are Lipschitz with $K = 1$, from the bounds
$|\sin x - \sin y| \le |x - y|$ and $|\cos x - \cos y| \le |x - y|$. The square
root separates the classes.

> **Worked example ($\sqrt{x}$ on $[1,\infty)$ is Lipschitz).** For
> $x, y \ge 1$, rationalize the difference:
> $$
> |\sqrt{x} - \sqrt{y}| = \frac{|x - y|}{\sqrt{x} + \sqrt{y}} \le \frac{|x - y|}{1 + 1} = \tfrac{1}{2}|x - y|,
> $$
> so $K = \tfrac{1}{2}$ works, and $\sqrt{x}$ is uniformly continuous there with
> $\delta = 2\epsilon$.

> **Worked example ($\sqrt{x}$ on $[0,\infty)$: uniformly continuous, not
> Lipschitz).** Not Lipschitz: the secant from the origin to $(x, \sqrt{x})$ has
> slope $\sqrt{x}/x = 1/\sqrt{x} \to \infty$ as $x \to 0^+$, so no constant $K$
> bounds all secants. Still uniformly continuous: on $[0,2]$ the function is
> continuous on a closed bounded interval, hence uniformly continuous by the
> theorem; on $[1,\infty)$ it is Lipschitz by the previous example. Given
> $\epsilon > 0$, take $\delta$ as the smaller of the two deltas and of $1$; any
> pair with $|x - y| < \delta$ then lies entirely in $[0,2]$ or entirely in
> $[1,\infty)$, and either case gives $|\sqrt{x} - \sqrt{y}| < \epsilon$.

These two examples separate the three conditions cleanly: on $[0,\infty)$,
$\sqrt{x}$ is uniformly continuous but not Lipschitz, and on $\mathbb{R}$, $x^2$
is continuous but not uniformly continuous. The implications run one way only.

$$
% caption: The three conditions nest strictly: Lipschitz is the strongest,
% uniform continuity sits between, and plain continuity is the weakest.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
\fill[acc!6] (0,0) ellipse (4.1 and 2.5);
\fill[acc!12] (-0.5,0) ellipse (2.9 and 1.75);
\fill[acc!20] (-1.1,0) ellipse (1.6 and 1.0);
\draw[acc!55] (0,0) ellipse (4.1 and 2.5);
\draw[acc!55] (-0.5,0) ellipse (2.9 and 1.75);
\draw[acc!55] (-1.1,0) ellipse (1.6 and 1.0);
\node[acc] at (-1.1,0) {Lipschitz};
\node[acc] at (1.4,0.9) {uniformly cont.};
\node[acc] at (2.5,1.85) {merely cont.};
\node[black, font=\footnotesize, anchor=west] at (-1.1,-0.5) {$\sin$, $\cos$};
\node[black, font=\footnotesize] at (2.0,0.1) {$x^{\frac{1}{2}}$};
\node[black, font=\footnotesize] at (2.7,-1.4) {$x^2$ on $\mathbb{R}$};
\end{tikzpicture}
$$

The definitions of continuity and uniform continuity used only the distances
$|x - c|$ and $|f(x) - f(c)|$, so they transfer verbatim once "distance" is
axiomatized, to
[maps between metric spaces](/real-analysis/continuity/continuity-metric-spaces);
the extreme value theorem, the uniform-continuity theorem, and the open-preimage
characterization all hold there in general form.

[^lebl-def]: **Lebl**, _Basic Analysis I_, §3.4 — Definition 3.4.1 (uniform continuity) and Examples 3.4.2–3.4.3.
[^lebl-heine]: **Lebl**, _Basic Analysis I_, §3.4 — Theorem 3.4.4 (continuity on a closed bounded interval implies uniform continuity).
[^shk-int]: **Shkoller**, _MAT125B Lecture Notes_, Ch. 1 — uniform continuity of a continuous function on a compact interval is the lemma used to prove such functions are Riemann integrable.
[^lebl-ext]: **Lebl**, _Basic Analysis I_, §3.4 — Lemma 3.4.5 (uniform continuity preserves Cauchy sequences) and Proposition 3.4.6 (continuous extension to endpoints).
[^lebl-lip]: **Lebl**, _Basic Analysis I_, §3.4 — Definition 3.4.7, Proposition 3.4.8, and Examples 3.4.9–3.4.10 (Lipschitz continuity and its secant-slope interpretation).
