Tutorials › Topology (Undergraduate) › Testing Continuity With Convergent Sequences

Countability Axioms and Sequences · Tutorial 373 of 799

Testing Continuity With Convergent Sequences

Use convergent sequences to verify continuity, and see why first countability makes this test complete.

Intermediate 9 min read

What You'll Learn

  • Define convergence of a sequence using open neighborhoods.
  • Prove that continuous maps preserve sequence limits without countability assumptions.
  • Prove the converse when the domain is first countable.
  • Build a decreasing countable neighborhood base to detect failure of continuity.
  • Use explicit examples to distinguish a useful sequence test from an incomplete one.
  • Understand why a sequence in a non-Hausdorff space can have more than one limit.

Continuity and Convergent Sequences

Continuity is defined by asking that inverse images of open sets be open. Sequences offer a more local test: as the terms of a sequence approach a point, do their images approach the image of that point? One direction always holds, in every topological space. The converse needs a countability condition on the domain so that a sequence can record the neighborhoods witnessing a failure of continuity.

Let \((X,\mathcal{T})\) be a topological space. A sequence \((x_n)\) in \(X\) converges to \(x\in X\), written \(x_n\to x\), if every open neighborhood \(U\) of \(x\) contains all but finitely many terms: for some \(N\in\mathbb{N}\), \(x_n\in U\) for every \(n\ge N\). Terms may repeat; in particular, a sequence need not have distinct terms. A map \(f:X\to Y\) is continuous at \(x\) if, for every open neighborhood \(V\) of \(f(x)\), there is an open neighborhood \(U\) of \(x\) such that \(f(U)\subseteq V\). It is continuous if it is continuous at every point of \(X\).

Definition: A countable local base at \(x\) is a finite or countable collection of open neighborhoods of \(x\) such that every open neighborhood of \(x\) contains a member of the collection. A space is first countable if every point has a countable local base.

Continuous Maps Preserve Sequence Limits

Theorem 1: Let \(X\) and \(Y\) be topological spaces, let \(f:X\to Y\) be continuous, and suppose \(x_n\to x\) in \(X\). Then \(f(x_n)\to f(x)\) in \(Y\). No countability or separation assumption on either space is required.

Proof. Let \(V\) be any open neighborhood of \(f(x)\). Continuity at \(x\) gives an open neighborhood \(U\) of \(x\) such that \(f(U)\subseteq V\). Since \(x_n\to x\), there is \(N\in\mathbb{N}\) such that \(x_n\in U\) for every \(n\ge N\). For every such \(n\), \(f(x_n)\in f(U)\subseteq V\). Thus every open neighborhood of \(f(x)\) contains all but finitely many terms of \((f(x_n))\), which is exactly \(f(x_n)\to f(x)\). \(\square\)

Worked Example: Squaring a Convergent Sequence

In \(\mathbb{R}\) with its standard topology, let \(f:\mathbb{R}\to\mathbb{R}\) be \(f(x)=x^2\), and let \(x_n=2+1/n\). Verify directly that \(x_n\to2\) and \(f(x_n)\to f(2)\).

First, \(|x_n-2|=1/n\). Given any \(\varepsilon>0\), choose \(N\in\mathbb{N}\) with \(N>1/\varepsilon\). For \(n\ge N\), \(n>1/\varepsilon\), so \(1/n<\varepsilon\). Therefore \(x_n\to2\).

Now compute each image: \[ f(x_n)=\left(2+\frac1n\right)^2 =4+\frac4n+\frac1{n^2}. \] Since \(f(2)=2^2=4\), the difference is \[ |f(x_n)-f(2)|=\frac4n+\frac1{n^2}\le\frac5n, \] where \(1/n^2\le1/n\) because \(n\ge1\). Given \(\varepsilon>0\), choose \(N>5/\varepsilon\). Then \(n\ge N\) implies \(|f(x_n)-4|\le5/n<\varepsilon\), so \(f(x_n)\to4=f(2)\).

Check: at \(n=1\), \(x_1=3\), and the computed image is \(4+4+1=9=3^2\). This checks the expansion and the value of the sequence at a specific index.

The theorem concerns a sequence and its given limit. In a space that is not Hausdorff, a sequence can have more than one limit. The theorem says that if \(x_n\to x\), then the image sequence converges to \(f(x)\); it does not say that this must be its only limit.

Worked Example: A Sequence with Two Limits

Let \(X=\{a,b\}\) have the topology \(\mathcal{T}=\{\varnothing,\{a\},X\}\). Consider the constant sequence \(x_n=a\) and the identity map \(\operatorname{id}_X:X\to X\).

The sequence converges to \(a\): the open neighborhoods of \(a\) are \(\{a\}\) and \(X\), and every term lies in both. It also converges to \(b\): the only open neighborhood of \(b\) is \(X\), which contains every term. The identity map is continuous because the preimage of each open set is that same open set. Its image sequence is still the constant sequence \(a\), so it converges to both \(\operatorname{id}_X(a)=a\) and \(\operatorname{id}_X(b)=b\), for the respective limits just checked.

This example verifies that sequence convergence need not have a unique limit in an arbitrary topological space. No Hausdorff assumption was needed in Theorem 1.

When Sequences Also Detect Continuity

A sequence that violates the conclusion of Theorem 1 proves that a map is not continuous. But testing one sequence, or even some collection of sequences, is not by itself enough to prove continuity. The converse works when the domain has a countable local base at each point: a failure of continuity can then be converted into one sequence whose images fail to converge.

Theorem 2 (Sequential test for continuity): Let \(X\) be first countable, let \(Y\) be any topological space, and let \(f:X\to Y\). Then \(f\) is continuous if and only if, for every \(x\in X\) and every sequence \(x_n\to x\) in \(X\), the sequence \(f(x_n)\) converges to \(f(x)\) in \(Y\).

Proof. If \(f\) is continuous, Theorem 1 proves the stated sequence property. For the converse, assume that for every \(x\in X\), every sequence converging to \(x\) has its image sequence converging to \(f(x)\). We show that \(f\) is continuous at each \(x\in X\).

Fix \(x\in X\), and suppose, to obtain a contradiction, that \(f\) is not continuous at \(x\). By the definition of continuity at a point, there is an open neighborhood \(V\) of \(f(x)\) such that no open neighborhood \(U\) of \(x\) satisfies \(f(U)\subseteq V\). Choose a countable local base at \(x\), listed as \(B_1,B_2,\ldots\). If the base is finite, repeat its members to make such a list. Define \[ W_n=\bigcap_{i=1}^{n}B_i. \] Each \(W_n\) is an open neighborhood of \(x\), because it is a finite intersection of open neighborhoods. For every \(n\), the failure condition applied to \(W_n\) says \(f(W_n)\nsubseteq V\). Thus we can choose \(x_n\in W_n\) with \(f(x_n)\notin V\).

To verify \(x_n\to x\), let \(O\) be any open neighborhood of \(x\). Since \((B_i)\) is a local base, there is an index \(j\) with \(B_j\subseteq O\). For every \(n\ge j\), \(W_n\subseteq B_j\subseteq O\), so \(x_n\in O\). Hence \(x_n\to x\). But every term \(f(x_n)\) lies outside the open neighborhood \(V\) of \(f(x)\). The image sequence therefore does not converge to \(f(x)\), contradicting the assumed sequence property. So \(f\) is continuous at \(x\). Since \(x\) was arbitrary, \(f\) is continuous. \(\square\)

The construction uses first countability precisely to organize enough neighborhoods of \(x\) into one sequence. The target \(Y\) needs no countability property: the proof uses only the one open neighborhood \(V\) that witnesses failure of continuity.

Worked Example: A Sequence Detects a Discontinuity

Define \(f:\mathbb{R}\to\mathbb{R}\), with both spaces given the standard topology, by \[ f(x)= \begin{cases} 0,&x=0,\\ 1,&x\ne0. \end{cases} \] We show that the sequence \(x_n=1/n\) detects the failure of continuity at \(0\).

For every \(\varepsilon>0\), choose \(N>1/\varepsilon\). If \(n\ge N\), then \(|x_n-0|=1/n<\varepsilon\), so \(x_n\to0\). Since \(1/n\ne0\) for every \(n\in\mathbb{N}\), each image is \(f(x_n)=1\), while \(f(0)=0\).

Take the open neighborhood \(V=(-1/2,1/2)\) of \(f(0)=0\). No term \(f(x_n)=1\) belongs to \(V\), so the image sequence does not converge to \(0\). This is a direct witness to the failure of the necessary condition in Theorem 1. It also verifies discontinuity from the definition: if \(U\) is any open neighborhood of \(0\), it contains some interval \((-\delta,\delta)\) with \(\delta>0\). The nonzero point \(t=\min(\delta/2,1/2)\) lies in \(U\), but \(f(t)=1\notin V\). Thus no such \(U\) satisfies \(f(U)\subseteq V\).

Check: at \(n=2\), \(x_2=1/2\ne0\), so \(f(x_2)=1\), which is indeed outside \((-1/2,1/2)\). The same computation \(f(1/n)=1\) applies for every positive integer \(n\).

A Common Pitfall

Common pitfall. Checking that a function behaves correctly on one convergent sequence does not prove continuity. For the function in the previous example, take the constant sequence \(y_n=0\). It converges to \(0\), and \(f(y_n)=0\) for every \(n\), so its image converges to \(f(0)=0\). Yet the function is not continuous at \(0\), as the neighborhood \(V=(-1/2,1/2)\) and the points \(t\ne0\) show.

The correction is to check every convergent sequence when using Theorem 2, and to ensure the domain is first countable before inferring continuity. For a discontinuous function on a first-countable domain, the proof of Theorem 2 explains how a sequence witnessing failure can be constructed; a favorable calculation for just one sequence does not rule out such a witness.

The distinction between the two directions is useful in practice. If continuity is already known, Theorem 1 immediately transfers limits through the map. If continuity is what must be established, Theorem 2 permits a sequence-based proof only under its first-countability hypothesis. Neither result requires the target to be Hausdorff, and the sequence limit in the conclusion is always the specified point \(f(x)\).

Check Your Understanding

For each question, use the neighborhood definition of convergence and state any countability assumption you need.

  1. Prove directly that a constant sequence with value \(x\) converges to \(x\) in every topological space.
  2. In Theorem 1, identify the open neighborhood chosen first and explain where continuity is used.
  3. Why are the sets \(W_n=\bigcap_{i=1}^{n}B_i\) useful in the converse direction of Theorem 2?
  4. For the function in the discontinuity example, find another sequence converging to \(0\) whose image does not converge to \(f(0)\).
  5. Which space must be first countable in Theorem 2, and does the theorem require the target space to be first countable?