On the real line, continuity is a property of [functions](/page/Function) between subsets of $\mathbb{R}$ — a single, familiar metric space. But many of the most important objects in analysis are not real numbers: they are *functions*, *[sequences](/page/Sequence)*, or *operators*, living in spaces where "distance" has a very different meaning. The space $C([0,1])$ of continuous functions on $[0,1]$, equipped with the supremum metric $d(f, g) = \sup_{x \in [0,1]} |f(x) - g(x)|$, is the natural habitat of approximation theory and differential equations. The space $\ell^2$ of square-summable sequences, with metric $d(x, y) = (\sum |x_n - y_n|^2)^{1/2}$, underpins Fourier analysis and quantum mechanics. In these spaces, the $\varepsilon$-$\delta$ definition of continuity carries over verbatim from [Continuity (Real Analysis)](/page/Continuity%20(Real%20Analysis)) — one simply replaces the absolute value $|x - a|$ with the metric $d_X(x, a)$ — but the *consequences* of continuity change dramatically because the geometry of the spaces is fundamentally different.
This page develops continuity for functions $f: (X, d_X) \to (Y, d_Y)$ between metric spaces. The key themes are: the sequential characterisation and why it works (first countability), the equivalence with the [topological](/page/Topology) definition (preimages of [open sets](/page/Open%20Set)), uniform continuity as a metric concept, Lipschitz continuity and its role in fixed-point theory, and the interaction between continuity and completeness. The fully general topological treatment is on the parent page [Continuity](/page/Continuity).
## The $\varepsilon$-$\delta$ Definition in Metric Spaces
[definition:Continuous Map Between Metric Spaces]
Let $(X, d_X)$ and $(Y, d_Y)$ be [metric spaces](/page/Metric%20Space). A function $f: X \to Y$ is **continuous at** $a \in X$ if for every $\varepsilon > 0$ there exists $\delta > 0$ such that
\begin{align*}
d_X(x, a) < \delta \implies d_Y(f(x), f(a)) < \varepsilon.
\end{align*}
The function $f$ is **continuous** if it is continuous at every point of $X$.
[/definition]
This is identical in form to the definition on $\mathbb{R}$, but the metrics $d_X$ and $d_Y$ may be very different from the absolute value. The same function can be continuous with respect to one metric on $X$ and discontinuous with respect to another — continuity is a property of $f$ *together with* the metrics on domain and codomain.
[example:Continuity Depends On The Metric]
Consider the identity function $\operatorname{id}: (\mathbb{R}, d_{\text{disc}}) \to (\mathbb{R}, d_{\text{Eucl}})$, where $d_{\text{disc}}(x, y) = 0$ if $x = y$ and $1$ otherwise (the discrete metric), and $d_{\text{Eucl}}(x, y) = |x - y|$. This map is continuous: for any $a$ and any $\varepsilon > 0$, take $\delta = 1/2$; then $d_{\text{disc}}(x, a) < 1/2$ forces $x = a$, so $d_{\text{Eucl}}(f(x), f(a)) = 0 < \varepsilon$. In the discrete metric, every function is continuous — every point is isolated.
The reverse map $\operatorname{id}: (\mathbb{R}, d_{\text{Eucl}}) \to (\mathbb{R}, d_{\text{disc}})$ is *not* continuous at any point: for $\varepsilon = 1/2$, any $\delta > 0$ allows $x \neq a$ with $|x - a| < \delta$, giving $d_{\text{disc}}(x, a) = 1 \geq \varepsilon$.
This pair shows that continuity is not a property of the underlying function alone — it depends essentially on the metrics.
[/example]
## The Sequential Characterisation
In any metric space, continuity is equivalent to preservation of convergent sequences. This is the same characterisation as on $\mathbb{R}$, and it works for the same reason: metric spaces are *first-countable* (every point has a countable neighbourhood base — the balls $B(a, 1/n)$).
A function $f: X \to Y$ between metric spaces is continuous at $a$ if and only if $f(x_n) \to f(a)$ whenever $x_n \to a$.
The forward direction is the same as on $\mathbb{R}$. The reverse direction constructs the "bad sequence" $x_n$ with $d_X(x_n, a) < 1/n$ but $d_Y(f(x_n), f(a)) \geq \varepsilon_0$, using the fact that the countable family $B(a, 1/n)$ exhausts all neighbourhoods of $a$.
This characterisation *fails* in general topological spaces that are not first-countable. In the uncountable product $\mathbb{R}^{\mathbb{R}}$ with the product topology, sequential continuity is strictly weaker than continuity. This failure is one reason why the topological definition (preimages of open sets) is needed for full generality — see the parent page [Continuity](/page/Continuity).
## Equivalence with the Topological Definition
A function $f: X \to Y$ between metric spaces is continuous if and only if $f^{-1}(V)$ is open in $X$ for every open $V \subseteq Y$.
The proof is a two-line translation between balls and open sets. Forward: if $V \subseteq Y$ is open and $x \in f^{-1}(V)$, then $f(x) \in V$, so there exists $\varepsilon > 0$ with $B_Y(f(x), \varepsilon) \subseteq V$. By $\varepsilon$-$\delta$ continuity, there exists $\delta > 0$ with $f(B_X(x, \delta)) \subseteq B_Y(f(x), \varepsilon) \subseteq V$, so $B_X(x, \delta) \subseteq f^{-1}(V)$, proving $f^{-1}(V)$ is open. Reverse: for any $a$ and $\varepsilon > 0$, the ball $B_Y(f(a), \varepsilon)$ is open in $Y$, so $f^{-1}(B_Y(f(a), \varepsilon))$ is open in $X$ and contains $a$, hence contains some ball $B_X(a, \delta)$.
This equivalence is the bridge between the analytic ($\varepsilon$-$\delta$) and topological (open preimage) perspectives. The closed-set dual — $f$ is continuous iff $f^{-1}(F)$ is closed for every closed $F$ — is equally useful, especially for showing that zero [sets](/page/Set), sublevel sets, and level sets of continuous functions are closed.
[example:Closed Sets Via Continuity]
In any metric space $(X, d)$, the closed ball $\overline{B}(a, r) = \{x \in X : d(x, a) \leq r\}$ is closed, because it equals $f^{-1}((-\infty, r])$ where $f(x) = d(x, a)$ is continuous (in fact 1-Lipschitz). The sphere $S(a, r) = \{x : d(x, a) = r\}$ is closed as $f^{-1}(\{r\})$. More generally, for any nonempty $A \subseteq X$, the distance function $d_A(x) = \inf_{a \in A} d(x, a)$ is 1-Lipschitz (hence continuous), and the "closed $r$-neighbourhood" $\{x : d_A(x) \leq r\}$ is closed for every $r \geq 0$.
[/example]
## Continuity in Function Spaces
The most important new examples at the metric space level are function spaces, where convergence in the metric corresponds to a specific mode of convergence for functions.
[example:The Supremum Metric And Uniform Convergence]
On the space $C([a, b])$ of continuous functions $f: [a, b] \to \mathbb{R}$, the supremum metric $d_\infty(f, g) = \sup_{x \in [a,b]} |f(x) - g(x)| = \|f - g\|_\infty$ turns convergence in the metric into *[uniform convergence](/page/Uniform%20Convergence)*: $f_n \to f$ in $d_\infty$ means $\sup_x |f_n(x) - f(x)| \to 0$, which is exactly uniform convergence on $[a, b]$.
A key consequence: the **evaluation functional** $\operatorname{ev}_t: C([a, b]) \to \mathbb{R}$ defined by $\operatorname{ev}_t(f) = f(t)$ is continuous (in fact 1-Lipschitz), since $|\operatorname{ev}_t(f) - \operatorname{ev}_t(g)| = |f(t) - g(t)| \leq \|f - g\|_\infty$. The **integral functional** $I: C([a, b]) \to \mathbb{R}$ defined by $I(f) = \int_a^b f(x) \, dx$ is also continuous: $|I(f) - I(g)| \leq (b - a)\|f - g\|_\infty$, so $I$ is $(b-a)$-Lipschitz.
The [uniform limit theorem](/theorems/258) — the uniform limit of continuous functions is continuous — is equivalent to saying that $C([a, b])$ is a *closed subset* of the space of all bounded functions $B([a, b])$ under the supremum metric. Completeness of $C([a, b])$ (every Cauchy sequence of continuous functions converges uniformly to a continuous function) is the statement that $C([a, b])$ is a complete metric space — a [Banach space](/page/Banach%20Space).
[/example]
[example:The $L^p$ Metric And Convergence In Mean]
On [integrable](/page/Integral) functions, the $L^p$ metric $d_p(f, g) = (\int |f - g|^p)^{1/p}$ captures convergence in $p$-th mean. This is a weaker notion than uniform convergence: $f_n \to f$ in $L^p$ allows pointwise discrepancies on sets of small measure, as long as the integrated $p$-th power of the difference tends to zero.
The identity map $\operatorname{id}: (C([a,b]), d_\infty) \to (C([a,b]), d_p)$ is continuous (uniform convergence implies $L^p$ convergence), but the reverse map is not: a sequence can converge in $L^p$ without converging uniformly. The choice of metric on the same underlying set of functions fundamentally changes which operations are continuous.
[/example]
## Uniform Continuity in Metric Spaces
[definition:Uniformly Continuous Map Between Metric Spaces]
A function $f: (X, d_X) \to (Y, d_Y)$ is **uniformly continuous** if for every $\varepsilon > 0$ there exists $\delta > 0$ such that
\begin{align*}
d_X(x, y) < \delta \implies d_Y(f(x), f(y)) < \varepsilon \quad \text{for all } x, y \in X.
\end{align*}
[/definition]
The Heine-Cantor theorem generalises from $[a, b]$ to any compact metric space: a continuous function from a compact metric space to any metric space is uniformly continuous. The proof is identical — cover the domain with $\delta_x/2$-balls, extract a finite subcover by compactness, take $\delta$ as the minimum radius.
Uniform continuity has a clean characterisation in terms of the *modulus of continuity*: define $\omega_f(\delta) = \sup\{d_Y(f(x), f(y)) : d_X(x, y) \leq \delta\}$. Then $f$ is uniformly continuous if and only if $\omega_f(\delta) \to 0$ as $\delta \to 0$. The function $\omega_f$ is itself subadditive ($\omega_f(\delta_1 + \delta_2) \leq \omega_f(\delta_1) + \omega_f(\delta_2)$) and non-decreasing. For Lipschitz functions, $\omega_f(\delta) \leq L\delta$; for Hölder continuous functions, $\omega_f(\delta) \leq C\delta^\alpha$; for general uniformly continuous functions, the decay rate can be arbitrarily slow.
Uniform continuity plays a crucial role in extending functions from dense subsets. If $f: D \to Y$ is uniformly continuous and $D$ is dense in $X$ with $Y$ complete, then $f$ extends uniquely to a uniformly continuous function $\tilde{f}: X \to Y$. This extension theorem is used to define the [Riemann integral](/page/Riemann%20Integral) as a continuous extension, to complete metric spaces, and to extend isometries.
## Lipschitz Continuity and Contraction Mappings
[definition:Lipschitz Map Between Metric Spaces]
A function $f: (X, d_X) \to (Y, d_Y)$ is **Lipschitz continuous** with constant $L \geq 0$ if
\begin{align*}
d_Y(f(x), f(y)) \leq L \cdot d_X(x, y) \quad \text{for all } x, y \in X.
\end{align*}
An **isometry** is a map with $L = 1$ and equality: $d_Y(f(x), f(y)) = d_X(x, y)$. A **contraction** is a Lipschitz map with $L < 1$.
[/definition]
The regularity hierarchy — Lipschitz $\implies$ uniformly continuous $\implies$ continuous — holds in any metric space, with the same proofs as on $\mathbb{R}$. The distance function $d_A(x) = \inf_{a \in A} d(x, a)$ remains the canonical example of a 1-Lipschitz function.
The most powerful application of Lipschitz maps in metric spaces is the Banach fixed-point theorem, which converts the metric structure into an existence-and-uniqueness result.
[quotetheorem:270]
The theorem is the workhorse of existence theory: the [Picard-Lindelöf theorem](/theorems/69) for ODEs, the [implicit function theorem](/page/Implicit%20Function%20Theorem), and many iterative numerical methods are all proved by exhibiting a contraction on an appropriate complete metric space and invoking Banach's theorem. The completeness hypothesis is essential — a contraction on an incomplete space may have no fixed point (consider $f(x) = x/2$ on $(0, 1)$ with the usual metric; the unique candidate fixed point $0$ is missing from the space). The key idea: starting from any $x_0$, the iterates $x_0, T(x_0), T^2(x_0), \ldots$ form a [Cauchy sequence](/page/Cauchy%20Sequence) (because $d(T^n x, T^{n+1} x) \leq \lambda^n d(x, Tx)$ with $\lambda < 1$), and completeness guarantees a limit.
[example:Picard Iteration For ODEs]
The Picard-Lindelöf theorem proves existence and uniqueness for $y' = f(t, y)$, $y(t_0) = y_0$ by defining the integral operator
\begin{align*}
T(\phi)(t) = y_0 + \int_{t_0}^t f(s, \phi(s)) \, ds
\end{align*}
on the complete metric space $C([t_0 - h, t_0 + h])$ with the supremum metric. If $f$ is Lipschitz in $y$ with constant $L$, then $T$ is a contraction for $h$ small enough (specifically $hL < 1$): the Lipschitz condition on $f$ transfers through the integral to give $\|T(\phi) - T(\psi)\|_\infty \leq hL \|\phi - \psi\|_\infty$. The [Banach Fixed-Point Theorem](/theorems/270) then produces a unique fixed point $\phi^*$ of $T$, which is exactly a solution to the ODE.
This example illustrates why metric space continuity matters in practice: the "points" of the space are *functions*, the metric is the sup-norm, and the contraction condition comes from the Lipschitz constant of the right-hand side $f$. Working in $(C, d_\infty)$ rather than $\mathbb{R}$ is essential — the fixed point is a *function*, not a number.
[/example]
## Continuity and Completeness
The interaction between continuity and completeness produces several results that have no analogue in the purely topological setting (since completeness is a metric concept, not a topological one).
**Uniform [limits](/page/Limit) preserve continuity.** If $f_n: X \to Y$ are continuous and $f_n \to f$ uniformly (i.e., $\sup_{x \in X} d_Y(f_n(x), f(x)) \to 0$), then $f$ is continuous. The proof uses the $\varepsilon/3$ trick: $d_Y(f(x), f(a)) \leq d_Y(f(x), f_n(x)) + d_Y(f_n(x), f_n(a)) + d_Y(f_n(a), f(a))$, with the first and third terms controlled by uniform convergence and the middle term by continuity of $f_n$. This result is a cornerstone of approximation theory — it guarantees that the [Weierstrass approximation theorem](/theorems/480), which produces uniform polynomial approximants, preserves continuity.
**Continuous maps need not preserve Cauchy sequences.** A continuous function $f: X \to Y$ maps convergent sequences to convergent sequences, but it may map Cauchy sequences to non-Cauchy sequences if the spaces are not complete. For instance, $f(x) = 1/x$ on $(0, 1)$ sends the Cauchy sequence $x_n = 1/n$ to the divergent sequence $f(x_n) = n$. Uniform continuity *does* preserve Cauchy sequences: if $d_X(x_n, x_m) < \delta$ for large $n, m$, then $d_Y(f(x_n), f(x_m)) < \varepsilon$. This is why uniform continuity is the natural condition for extending functions to completions.
**The [Baire Category Theorem](/theorems/630).** In a complete metric space, the intersection of countably many dense open sets is dense. This topological consequence of completeness has remarkable applications to continuity: it implies that if $f_n: X \to \mathbb{R}$ are continuous and $f(x) = \lim f_n(x)$ exists pointwise everywhere, then the set of continuity points of $f$ is a dense $G_\delta$ set. The pointwise limit of continuous functions can be discontinuous (as with $f_n(x) = x^n$ on $[0, 1]$), but it cannot be discontinuous "everywhere" — there must be a dense set of continuity points. This is a far cry from the Dirichlet function (discontinuous everywhere), which is not the pointwise limit of any sequence of continuous functions.
## Equivalent Metrics and Topological Invariants
Two metrics $d$ and $d'$ on the same set $X$ are **topologically equivalent** if they induce the same open sets — equivalently, if the identity map $\operatorname{id}: (X, d) \to (X, d')$ is a homeomorphism (continuous with continuous inverse). They are **Lipschitz equivalent** if $\operatorname{id}$ is bi-Lipschitz: there exist constants $c, C > 0$ with $cd(x,y) \leq d'(x,y) \leq Cd(x,y)$ for all $x, y$.
Lipschitz equivalence preserves uniform continuity and Lipschitz continuity. Topological equivalence preserves only continuity. The distinction matters: on $\mathbb{R}^n$, the Euclidean metric $d_2$, the taxicab metric $d_1$, and the maximum metric $d_\infty$ are all Lipschitz equivalent ($d_\infty \leq d_2 \leq d_1 \leq n \cdot d_\infty$), so all three metrics give the same notions of continuity, uniform continuity, and Lipschitz continuity. But the metric $d'(x, y) = \min(d(x,y), 1)$ is topologically equivalent to $d$ without being Lipschitz equivalent — it preserves continuity but not uniform continuity of functions on unbounded domains.
[example:All Norms On Finite-Dimensional Spaces Are Equivalent]
On $\mathbb{R}^n$, any two norms $\|\cdot\|$ and $\|\cdot\|'$ are Lipschitz equivalent. This is a non-trivial result: the proof uses compactness of the unit sphere $\{x : \|x\| = 1\}$ and continuity of $\|\cdot\|'$ restricted to this sphere. The consequence is that continuity, uniform continuity, and completeness are the same for all norms on $\mathbb{R}^n$ — they are properties of the topology, not of the specific norm.
This fails in infinite dimensions. On $C([0, 1])$, the supremum norm $\|f\|_\infty$ and the $L^1$ norm $\|f\|_1 = \int_0^1 |f|$ induce different topologies: the sequence $f_n(x) = x^n$ converges to $0$ in $L^1$ but not in $\|\cdot\|_\infty$ (since $f_n(1) = 1$ for all $n$). The equivalence of norms is a finite-dimensional phenomenon.
[/example]