Tutorials › Real Analysis › Uniform Continuity Between Metric Spaces

Metric Spaces · Tutorial 679 of 1000

Uniform Continuity Between Metric Spaces

Learn to test uniform continuity across an entire metric space and use it to control sequences of nearby inputs.

Advanced 9 min read

What You'll Learn

  • State the metric-space definition of uniform continuity with its global quantifiers
  • Distinguish a single uniform input tolerance from point-dependent continuity tolerances
  • Prove the sequential criterion using pairs of sequences whose input distances tend to zero
  • Show that uniformly continuous maps send Cauchy sequences to Cauchy sequences
  • Verify uniform continuity in concrete examples and construct a counterexample
  • Recognize how changing the domain metric can change uniform continuity

One Tolerance for the Whole Domain

Continuity controls the behavior of a function near each point. Its input tolerance may depend on the point, so the amount of control available can vary across the domain. Uniform continuity asks for stronger, global control: for a given output tolerance, a single input tolerance must work at every point.

This distinction fits naturally with the epsilon-delta characterization of continuity from “Epsilon-Delta Continuity in Metric Spaces.” There, continuity at a fixed \(x\) compares \(f(x)\) with \(f(y)\), and the permissible input distance may depend on \(x\). For uniform continuity, we compare the images of any two inputs \(x\) and \(y\), with no point fixed in advance. The sequential continuity results from the preceding tutorials provide another way to examine this global requirement, as we will make precise below.

Let \(f:X\to Y\) be a function between metric spaces \((X,d_X)\) and \((Y,d_Y)\). The distinction lies in the order and scope of the quantifiers: the output tolerance is chosen first, and the resulting input tolerance must work for all pairs of points in \(X\).

Definition (Uniform Continuity): The function \(f:X\to Y\) is uniformly continuous on \(X\) if, for every \(\varepsilon>0\), there is a \(\delta>0\) such that for all \(x,y\in X\), $$ d_X(x,y)<\delta\quad\Longrightarrow\quad d_Y(f(x),f(y))<\varepsilon. $$ The number \(\delta\) may depend on \(\varepsilon\) and on \(f\), but it must not depend on \(x\) or \(y\).

If \(f\) is uniformly continuous, then it is continuous at every point: for any fixed \(x\), the same \(\delta\) works when one of the two inputs is \(x\). The converse is not automatic. Pointwise continuity supplies a potentially different tolerance at each point, and these tolerances may become arbitrarily small as the point moves through the domain.

Examples of Uniform Control and Its Failure

Worked Example: The Square-Root Function on the Nonnegative Reals

Define \(f:[0,\infty)\to\mathbb{R}\) by \(f(x)=\sqrt{x}\). For \(x,y\geq0\), assume first that \(x\geq y\). Then

$$ (\sqrt{x}-\sqrt{y})^2 \leq(\sqrt{x}-\sqrt{y})(\sqrt{x}+\sqrt{y}) =x-y. $$

The inequality holds because \(0\leq\sqrt{y}\leq\sqrt{x}\), so \(\sqrt{x}-\sqrt{y}\geq0\) and \(\sqrt{x}+\sqrt{y}\geq\sqrt{x}-\sqrt{y}\). Taking nonnegative square roots gives \(\sqrt{x}-\sqrt{y}\leq\sqrt{x-y}\). If \(y\geq x\), the same argument with \(x\) and \(y\) interchanged gives the corresponding bound. Thus, for all \(x,y\geq0\),

$$ |\sqrt{x}-\sqrt{y}|\leq\sqrt{|x-y|}. $$

Given \(\varepsilon>0\), choose \(\delta=\varepsilon^2\). If \(|x-y|<\delta\), then \(|f(x)-f(y)|\leq\sqrt{|x-y|}<\varepsilon\). This proves uniform continuity on the entire unbounded domain \([0,\infty)\).

Worked Example: Squaring on a Bounded Interval

Let \(f:[-2,2]\to\mathbb{R}\) be \(f(x)=x^2\). For \(x,y\in[-2,2]\), the factorization of a difference of squares gives

$$ |f(x)-f(y)|=|x^2-y^2|=|x-y||x+y|\leq4|x-y|, $$

because \(|x+y|\leq|x|+|y|\leq4\). Given \(\varepsilon>0\), choose \(\delta=\varepsilon/4\). Then \(|x-y|<\delta\) implies

$$ |f(x)-f(y)|\leq4|x-y|<4\delta=\varepsilon. $$

The bound holds uniformly for every pair in the interval. This estimate is one common way to prove uniform continuity: control the output difference by a fixed multiple of the input difference.

Worked Example: Squaring Is Not Uniformly Continuous on the Whole Line

Now take \(f:\mathbb{R}\to\mathbb{R}\) with the same rule \(f(x)=x^2\). Define \(x_n=n\) and \(y_n=n+1/n\) for positive integers \(n\). The input distances tend to zero, since

$$ |x_n-y_n|=\left|n-\left(n+\frac1n\right)\right|=\frac1n\longrightarrow0. $$

But the output distances do not tend to zero:

$$ |f(x_n)-f(y_n)| =\left|n^2-\left(n+\frac1n\right)^2\right| =2+\frac1{n^2}\geq2. $$

Thus nearby inputs can have images separated by at least \(2\). This shows why a proof of uniform continuity cannot rely only on the fact that a function is continuous at each individual point. The same formula is uniformly continuous on \([-2,2]\) but not on \(\mathbb{R}\).

A Sequential Criterion for Uniform Continuity

The preceding counterexample suggests a way to test uniform continuity: look for pairs of inputs whose distances shrink to zero while their images remain separated. The following criterion turns that idea into an equivalence. It is a condition on pairs of sequences, rather than on a single sequence converging to a fixed point.

Theorem (Sequential Criterion for Uniform Continuity): A function \(f:X\to Y\) between metric spaces is uniformly continuous if and only if, for every pair of sequences \((x_n)\) and \((y_n)\) in \(X\) such that \(d_X(x_n,y_n)\to0\), one has \(d_Y(f(x_n),f(y_n))\to0\).

Proof. First suppose \(f\) is uniformly continuous. Let \((x_n)\) and \((y_n)\) be sequences in \(X\) with \(d_X(x_n,y_n)\to0\). Fix \(\varepsilon>0\). By uniform continuity, there is \(\delta>0\) such that \(d_X(x,y)<\delta\) implies \(d_Y(f(x),f(y))<\varepsilon\) for all \(x,y\in X\). Since \(d_X(x_n,y_n)\to0\), there is an index \(N\) such that \(d_X(x_n,y_n)<\delta\) for all \(n\geq N\). Therefore \(d_Y(f(x_n),f(y_n))<\varepsilon\) for all \(n\geq N\). This proves that the output distances tend to zero.

Conversely, suppose \(f\) is not uniformly continuous. Negating the definition, there is an \(\varepsilon_0>0\) such that for every \(\delta>0\), some pair \(x,y\in X\) satisfies

$$ d_X(x,y)<\delta \quad\text{and}\quad d_Y(f(x),f(y))\geq\varepsilon_0. $$

For each positive integer \(n\), apply this statement with \(\delta=1/n\) and choose points \(x_n,y_n\in X\) satisfying those inequalities. Then \(d_X(x_n,y_n)<1/n\), so \(d_X(x_n,y_n)\to0\), whereas \(d_Y(f(x_n),f(y_n))\geq\varepsilon_0\) for every \(n\). The output distances do not tend to zero. This contradicts the stated sequential condition, proving the converse. \(\square\)

The two sequences need not converge individually, and they need not approach any particular point. That is the crucial difference from the Sequential Characterization of Continuity. For the example \(f(x)=x^2\) on \(\mathbb{R}\), the sequences \(x_n=n\) and \(y_n=n+1/n\) violate this criterion directly.

Uniform Continuity Preserves Cauchy Sequences

A Cauchy sequence has terms that become close to one another, even when it has not yet been shown to converge. Uniform continuity transfers that pairwise closeness to the image sequence. No completeness assumption on either metric space is needed for this conclusion.

Theorem (Uniform Continuity Preserves Cauchy Sequences): Let \(f:X\to Y\) be uniformly continuous between metric spaces. If \((x_n)\) is Cauchy in \(X\), then \((f(x_n))\) is Cauchy in \(Y\).

Proof. Let \(\varepsilon>0\). Uniform continuity supplies a \(\delta>0\) such that, for all \(x,y\in X\), \(d_X(x,y)<\delta\) implies \(d_Y(f(x),f(y))<\varepsilon\). Since \((x_n)\) is Cauchy, there is an index \(N\) such that \(d_X(x_m,x_n)<\delta\) whenever \(m,n\geq N\). Applying the uniform continuity condition to \(x_m\) and \(x_n\) gives

$$ d_Y(f(x_m),f(x_n))<\varepsilon \quad\text{whenever }m,n\geq N. $$

This is exactly the Cauchy condition for \((f(x_n))\) in \(Y\). \(\square\)

The theorem guarantees that the image sequence is Cauchy, not that it converges. Convergence follows if the codomain \(Y\) is complete, by the definition of completeness. Without completeness, a Cauchy sequence in \(Y\) may have no limit in \(Y\). Keeping these conclusions separate prevents completeness from being silently assumed.

Worked Example: The Identity Between Two Metric Spaces

Let \(X=\mathbb{R}\) with the discrete metric \(\delta\), where \(\delta(x,y)=0\) if \(x=y\) and \(\delta(x,y)=1\) otherwise. Let \(Y=\mathbb{R}\) with the usual metric, and define \(I:X\to Y\) by \(I(x)=x\). This identity map is uniformly continuous. Given \(\varepsilon>0\), choose \(\eta=1\). If \(\delta(x,y)<1\), then \(\delta(x,y)=0\), so \(x=y\), and consequently \(|I(x)-I(y)|=0<\varepsilon\).

In the reverse direction, the identity map from the usual metric on \(\mathbb{R}\) to the discrete metric is not uniformly continuous. Set \(x_n=0\) and \(y_n=1/n\). Then \(|x_n-y_n|=1/n\to0\), but \(x_n\ne y_n\), so their distance in the discrete metric is always \(1\). The domain and codomain metrics are part of the continuity question: the same rule for a function can be uniformly continuous for one choice of metrics and fail to be uniformly continuous for another.

What the Global Quantifier Changes

Uniform continuity is useful whenever inputs may vary across an entire domain and a single error tolerance is required. The distinction is especially important on unbounded sets. For instance, squaring on \(\mathbb{R}\) is continuous at every point, yet its output changes increasingly rapidly at large inputs, as the sequence example demonstrates. By contrast, the square-root estimate gives uniform control even though its domain is unbounded.

A common pitfall is to prove continuity point by point and then conclude uniform continuity without controlling how the pointwise tolerances vary. Another is to use a sequence test that checks only sequences converging to one fixed point. The Sequential Criterion for Uniform Continuity requires testing every pair of sequences whose mutual input distances tend to zero; the sequences may move through the domain without converging themselves.

1
For a direct proof, choose the output tolerance.
Given \(\varepsilon>0\), find an input tolerance \(\delta\) that is independent of the locations of both inputs.
2
For a sequential disproof, find close pairs.
Construct \(x_n,y_n\) with \(d_X(x_n,y_n)\to0\) while the output distances fail to tend to zero.
3
For Cauchy sequences, use the same tolerance globally.
Apply uniform continuity to every sufficiently late pair of terms, not just to one term and a proposed limit.

These methods distinguish local control at each point from one global control across the domain. They also connect uniform continuity to the behavior of pairs of nearby points and to the preservation of Cauchy sequences, two tools that will recur in the study of maps between metric spaces.

Check Your Understanding

Use the definition and the proved results to answer the following questions.

  1. Which quantifier in the definition of uniform continuity distinguishes it from continuity at a fixed point?
  2. Why do the sequences \(n\) and \(n+1/n\) show that squaring is not uniformly continuous on \(\mathbb{R}\)?
  3. In the Sequential Criterion for Uniform Continuity, must either input sequence converge?
  4. Why does uniform continuity send a Cauchy sequence to a Cauchy sequence without requiring the codomain to be complete?
  5. How does the identity-map example show that uniform continuity depends on the metrics?