Continuity Depends on the Space
A function’s continuity is determined not only by its values, but also by the open sets in its domain and codomain. When the domain is a subset \(A\) of a space \(X\), its open sets are traces of open sets of \(X\). Consequently, continuity on \(A\) must be tested with neighborhoods relative to \(A\), not with neighborhoods that must fit entirely inside \(A\) as ambient open sets.
The restriction theorem from “Continuity in Topological Spaces” gives one direction immediately: restricting a continuous map \(g:X\to Y\) to a subset \(A\subseteq X\) gives a continuous map \(g|_A:A\to Y\). Here we develop useful ways to test continuity when a map is given directly on a subspace, and when its values lie in a subspace of the codomain.
The equivalence follows from the open-set characterization of the subspace topology: a subset of \(A\) is open in \(A\) exactly when it is the intersection of \(A\) with an ambient open set. The ambient open set \(O\) can depend on \(V\), and it need not be contained in \(A\).
A Local Test for Continuity on a Subspace
The open-set definition has a pointwise version. For a point \(a\in A\), neighborhoods of \(a\) in \(A\) are sets of the form \(A\cap O\), where \(O\) is an open neighborhood of \(a\) in \(X\). Thus a continuity test at \(a\) asks whether every open neighborhood of \(f(a)\) contains the image of some relative neighborhood of \(a\).
Proof. Suppose first that \(f\) is continuous. Given \(a\in A\) and open \(V\subseteq Y\) containing \(f(a)\), the set \(f^{-1}(V)\) is open in \(A\) and contains \(a\). By the definition of the subspace topology, there is an open \(O\subseteq X\) such that \(f^{-1}(V)=A\cap O\). Hence \(a\in A\cap O\) and \(A\cap O\subseteq f^{-1}(V)\).
Conversely, suppose the stated local condition holds. Let \(V\subseteq Y\) be open. For each \(a\in f^{-1}(V)\), choose an open \(O_a\subseteq X\) as in the condition. Then $$ f^{-1}(V)=\bigcup_{a\in f^{-1}(V)}(A\cap O_a). $$ To verify equality, every set \(A\cap O_a\) on the right is contained in \(f^{-1}(V)\). In the other direction, each \(a\in f^{-1}(V)\) belongs to \(A\cap O_a\), so every point of \(f^{-1}(V)\) belongs to the union. Each \(A\cap O_a\) is open in \(A\), and an arbitrary union of open sets in \(A\) is open in \(A\). If \(f^{-1}(V)=\varnothing\), the empty set is open in \(A\) as well. Therefore \(f^{-1}(V)\) is open in \(A\) for every open \(V\), so \(f\) is continuous. \(\square\)
Worked Example: A Continuous Map on Two Separated Pieces
Let \(A=\{0\}\cup[2,3]\subseteq\mathbb{R}\), with the subspace topology, and define \(f:A\to\mathbb{R}\) by \(f(0)=0\) and \(f(x)=1\) for \(x\in[2,3]\). The two pieces are open in \(A\), since $$ A\cap(-1,1)=\{0\} \qquad\text{and}\qquad A\cap(1,4)=[2,3]. $$ They are also closed in \(A\), because each is the complement in \(A\) of the other.
For any open \(V\subseteq\mathbb{R}\), the preimage \(f^{-1}(V)\) is one of \(\varnothing\), \(\{0\}\), \([2,3]\), or \(A\), according to whether \(V\) contains neither, only \(0\), only \(1\), or both of the values of \(f\). Each possibility is open in \(A\), so \(f\) is continuous. This example uses the topology of the domain: the function takes different values on the two pieces, but each piece is open relative to \(A\).
Maps Whose Values Lie in a Subspace
There is a related question about the codomain. Suppose \(A\subseteq X\) and a map \(f:Z\to A\) is regarded either as taking values in the subspace \(A\) or, using the inclusion \(A\subseteq X\), as taking values in \(X\). These two interpretations give the same continuity test.
Proof. Write \(i:A\to X\) for the inclusion map, \(i(a)=a\). The map into \(X\) is \(i\circ f\). Suppose first that \(f:Z\to A\) is continuous. For every open \(O\subseteq X\), the set \(A\cap O\) is open in \(A\), and $$ (i\circ f)^{-1}(O)=f^{-1}(A\cap O). $$ The equality holds because every value of \(f\) lies in \(A\): such a value belongs to \(O\) exactly when it belongs to \(A\cap O\). The right-hand side is open in \(Z\), so \(i\circ f:Z\to X\) is continuous.
Now suppose \(i\circ f:Z\to X\) is continuous. Let \(U\) be open in \(A\). By the subspace topology, \(U=A\cap O\) for some open \(O\subseteq X\). Since \(f\) takes values in \(A\), $$ f^{-1}(U)=f^{-1}(A\cap O)=(i\circ f)^{-1}(O). $$ The last set is open in \(Z\) by continuity into \(X\). Therefore the preimage of every open subset of \(A\) is open in \(Z\), which proves continuity into \(A\). \(\square\)
Worked Example: Squaring as a Map into the Nonnegative Reals
Define \(f:\mathbb{R}\to[0,\infty)\) by \(f(x)=x^2\), where \([0,\infty)\) has the subspace topology from \(\mathbb{R}\). The corresponding map into \(\mathbb{R}\) is the familiar continuous square function. The theorem therefore shows that \(f:\mathbb{R}\to[0,\infty)\) is continuous.
The preimage calculation makes the role of the target topology explicit. If \(U\) is open in \([0,\infty)\), there is an open \(O\subseteq\mathbb{R}\) such that \(U=[0,\infty)\cap O\). Since \(x^2\geq0\) for all real \(x\), $$ f^{-1}(U)=\{x\in\mathbb{R}:x^2\in[0,\infty)\cap O\} =\{x\in\mathbb{R}:x^2\in O\}. $$ The last set is open because the square function into \(\mathbb{R}\) is continuous. The calculation would be different for a function whose values did not all lie in the proposed subspace.
Relative Continuity Need Not Come from an Extension
The restriction theorem says that a continuous function on a whole space remains continuous when restricted to a subspace. It does not say that every continuous function on a subspace has a continuous extension to the ambient space. Nor does continuity on the subspace require a function to be defined at points outside it. The local criterion concerns only relative neighborhoods, which may be much smaller than ambient neighborhoods.
Worked Example: A Relative Neighborhood at an Endpoint
Let \(A=[0,1]\) and \(f:A\to\mathbb{R}\) be \(f(x)=x\). The identity map on \(\mathbb{R}\) is continuous, and \(f\) is its restriction to \(A\). The restriction theorem therefore gives continuity of \(f\) on \(A\).
At the endpoint \(0\), a relative neighborhood can be obtained by intersecting an ambient open interval with \(A\). For example, $$ A\cap(-1,1/4)=[0,1/4). $$ If an open neighborhood \(V\) of \(f(0)=0\) contains \((-\varepsilon,\varepsilon)\) for some \(\varepsilon>0\), choose \(r=\min(\varepsilon,1/2)\) and take \(O=(-r,r)\). For every \(x\in A\cap O=[0,r)\), we have \(f(x)=x\in(-\varepsilon,\varepsilon)\subseteq V\). Thus the local test works at the endpoint even though an ambient open interval around \(0\) is not contained in \(A\).
Worked Example: A Function That Fails to Be Continuous at a Boundary Point
Let \(A=[0,1]\) and define \(g:A\to\mathbb{R}\) by \(g(0)=1\) and \(g(x)=0\) for \(0<x\leq1\). The set \(V=(1/2,3/2)\) is open in \(\mathbb{R}\), and $$ g^{-1}(V)=\{0\}. $$ But \(\{0\}\) is not open in \(A\). Indeed, every open neighborhood of \(0\) in \(A\) has the form \(A\cap O\) for an ambient open set \(O\) containing \(0\). Such an \(O\) contains \((-\delta,\delta)\) for some \(\delta>0\), so \(A\cap O\) contains positive points as well as \(0\). It cannot equal \(\{0\}\). Therefore \(g\) is not continuous.
The local criterion gives the same conclusion: the neighborhood \(V\) of \(g(0)\) has no relative neighborhood of \(0\) whose points all map into \(V\). Every relative neighborhood of \(0\) contains some \(x>0\), and \(g(x)=0\notin V\). A boundary point can have many nearby points within the subspace, even though it has no points of the subspace on one side.
Choosing the Right Continuity Test
When the domain is a subspace, the preimage of an open target set must be open relative to that domain. When the codomain is a subspace, open sets in the codomain are ambient open sets intersected with that subspace. Keeping these two roles distinct avoids a common error: testing a relative preimage as though it had to be open in the ambient domain, or treating a relative-open target set as though it had to be open in the ambient codomain.
For a map \(f:A\to B\), where \(A\subseteq X\) and \(B\subseteq Y\) both carry subspace topologies, a direct test combines the two descriptions. For every open \(O\subseteq Y\), the set \(B\cap O\) is open in \(B\), and continuity requires $$ f^{-1}(B\cap O) $$ to be open in \(A\). Equivalently, this preimage must be \(A\cap W\) for some open \(W\subseteq X\). The same map can also be viewed as a map \(A\to Y\); the codomain theorem shows that it is continuous into \(B\) exactly when it is continuous into \(Y\). The domain still has to be tested using its relative topology.
In practice, first specify the space in which each open-set claim is being made. Then use the preimage definition, the local criterion, or the codomain theorem as appropriate. These methods express the same underlying principle: continuity preserves openness through preimages, with “open” interpreted in the actual domain and codomain under consideration.
Check Your Understanding
Use the relative-open definition and the results in this tutorial to answer the following questions.
- If \(f:A\to Y\) is continuous, what form can \(f^{-1}(V)\) take when \(V\) is open in \(Y\) and \(A\subseteq X\)?
- State the local criterion for continuity of \(f:A\to Y\) at a point \(a\in A\).
- Why is a map \(f:Z\to A\) continuous into \(A\) exactly when the same map is continuous into \(X\), if \(A\) has the subspace topology from \(X\)?
- Why does restricting a continuous map to a subspace preserve continuity?
- In the discontinuous example on \([0,1]\), why is the preimage \(\{0\}\) not open in the subspace?
- Does the restriction theorem imply that every continuous map defined on a subspace extends continuously to the whole ambient space?