Altanis

2.7Continuous Functions

Updated 29 Jun 2026Chapter (PDF)

[2.7.1]Definition(Continuous Function)#

A set-function f:XYf: X \to Y is said to be continuous if, for every open subset VYV \subseteq Y, the preimage f1(V)f^{-1}(V) is an open subset of XX.

Note continuity depends on the topologies endowed on the domain and codomain of the function.

[2.7.2]Remark(Continuity of Basis and Subbasis Elements)#

Suppose the topology on YY has a basis B\mathcal{B}. Then any open subset VYV \subseteq Y can be written as

V=λΛBλ,V = \bigcup_{\lambda \in \Lambda} B_\lambda,

where {Bλ}λΛ\{B_\lambda\}_{\lambda \in \Lambda} is an arbitrary collection of basis elements. Then note

f1(V)=f1(λΛBλ)=λΛf1(Bλ),f^{-1}(V) = f^{-1}\left( \bigcup_{\lambda \in \Lambda} B_\lambda \right) = \bigcup_{\lambda \in \Lambda} f^{-1}(B_\lambda),

so if the preimage of each basis element is open, then the function is continuous on its entire domain. Similarly, note that B\mathcal{B} can have a subbasis S\mathcal{S}, so any BλB_\lambda can be written as

Bλ=k=1nSk,B_\lambda = \bigcap_{k = 1}^n S_k,

where {S1,,Sn}S\{S_1, \dots, S_n\} \subseteq \mathcal{S} is a collection of subbasis elements. Then

f1(Bλ)=f1(k=1nSk)=k=1nf1(Sk),f^{-1}(B_\lambda) = f^{-1}\left( \bigcap_{k = 1}^n S_k \right) = \bigcap_{k = 1}^n f^{-1}(S_k),

so if the preimage of each subbasis element is open, then the function is continuous on its entire domain.

[2.7.3]Example(Continuity of Single-Variable Real Functions)#

Consider some function f:RRf: \bR \to \bR, where the domain and codomain are endowed with the standard topology.

First, suppose ff is continuous with our definition utilizing the preimage of open sets. Fix some x0Rx_0 \in \bR and let ε>0\epsilon > 0 be arbitrary. Then note V=(f(x0)ε,f(x0)+ε)V = (f(x_0) - \epsilon, f(x_0) + \epsilon) is a basis element for R\bR, so it is open in the codomain. Of course, x0f1(V)x_0 \in f^{-1}(V). Since f1(V)f^{-1}(V) is an open subset of R\bR, we can locally refine by some basis element (a,b)(a, b) such that x0(a,b)f1(V)x_0 \in (a, b) \subseteq f^{-1}(V). Thus there is some δ>0\delta > 0 such that (x0δ,x0+δ)f1(V)(x_0 - \delta, x_0 + \delta) \subseteq f^{-1}(V). Indeed, this implies the εδ\epsilon-\delta variant of continuity at x0x_0: for any ε>0\epsilon > 0, there is some δ>0\delta > 0 such that for every x(x0δ,x0+δ)x \in (x_0 - \delta, x_0 + \delta), it is true that f(x)(f(x0)ε,f(x0)+ε)f(x) \in (f(x_0) - \epsilon, f(x_0) + \epsilon).

Now suppose ff is continuous with the εδ\epsilon-\delta definition. That is, for any x0Rx_0 \in \bR and ε>0\epsilon > 0, there is some δ>0\delta > 0 such that

xx0<δ    f(x)f(x0)<ε.|x - x_0| < \delta \implies |f(x) - f(x_0)| < \epsilon.

This can be reformulated into open and closed sets quite easily:

xBδ(x0)    f(x)Bε(f(x0)).x \in B_\delta(x_0) \implies f(x) \in B_\epsilon(f(x_0)).

Thus ff is continuous if every open set containing f(x0)f(x_0) has a preimage that is an open set. Thus these two characterizations are equal.

[2.7.4]Theorem(Characterizations of Continuity)#

Let X,YX, Y be topological spaces, and let f:XYf: X \to Y. Then the following are equivalent.

  1. ff is continuous.

  2. For every subset AXA \subseteq X, it follows that f(A)f(A)f(\bar{A}) \subseteq \bar{f(A)}.

  3. For every closed subset BYB \subseteq Y, the preimage f1(B)Xf^{-1}(B) \subseteq X is closed as well.

  4. For every xXx \in X and for every open neighborhood VYV \subseteq Y of f(x)f(x), there is some open neighborhood UXU \subseteq X of xx where f(U)Vf(U) \subseteq V.

Proof.

We prove (1)(2)(3)(1)(1) \Longrightarrow (2) \Longrightarrow (3) \Longrightarrow (1) and (1)(4)(1)(1) \Longrightarrow (4) \Longrightarrow (1).

(1)(2)(1) \Longrightarrow (2): Suppose ff is continuous. We seek to show that, for any xAx \in \bar{A}, it is true that f(x)f(A)f(x) \in \bar{f(A)}. To get started, consider an open neighborhood VYV \subseteq Y about f(x)f(A)f(x) \in f(\bar{A}). Then note f1(V)Xf^{-1}(V) \subseteq X is open by continuity. Since xAx \in \bar{A}, all open neighborhoods of xx intersect AA. Since xf1(V)x \in f^{-1}(V) and f1(V)f^{-1}(V) is open, it follows that there is some yf1(V)Ay \in f^{-1}(V) \cap A. Then note f(y)Vf(A)f(y) \in V \cap f(A). Thus arbitrary open neighborhoods of f(x)f(x) intersect f(A)f(A), implying f(x)f(x) is in the closure of f(A)f(A). Thus f(x)f(A)f(x) \in \bar{f(A)}, and ultimately f(A)f(A)f(\bar{A}) \subseteq \bar{f(A)}.

(2)(3)(2) \Longrightarrow (3): Suppose that, for every AXA \subseteq X, it is true that f(A)f(A)f(\bar{A}) \subseteq \bar{f(A)}. Let BYB \subseteq Y be closed, and let A=f1(B)A = f^{-1}(B)—we wish to show AA is closed, and we do this by showing A=AA = \bar{A}. Trivially, we note AAA \subseteq \bar{A}, so we show AA\bar{A} \subseteq A. As such, let xAx \in \bar{A}. Then note

f(x)f(A)f(A)=f(f1(B))B=B.f(x) \in f(\bar{A}) \subseteq \bar{f(A)} = \bar{f(f^{-1}(B))} \subseteq \bar{B} = B.

Thus xf1(B)=Ax \in f^{-1}(B) = A, meaning A=AA = \bar{A}, meaning f1(B)f^{-1}(B) is closed.

(3)(1)(3) \Longrightarrow (1): Suppose that, for every closed set BYB \subseteq Y, the preimage f1(B)Xf^{-1}(B) \subseteq X is closed as well. Let OYO \subseteq Y be open. Then note YOY \setminus O is closed in YY, and so f1(YO)f^{-1}(Y \setminus O) is closed in XX. Thus Xf1(YO)=f1(O)X \setminus f^{-1}(Y \setminus O) = f^{-1}(O) is open, meaning ff is continuous.

(1)(4)(1) \Longrightarrow (4): Suppose ff is continuous. Fix xXx \in X, then let VYV \subseteq Y be an open neighborhood of f(x)f(x). Since ff is continuous, U=f1(V)XU = f^{-1}(V) \subseteq X is an open neighborhood of xx. Then note f(U)=f(f1(V))Vf(U) = f(f^{-1}(V)) \subseteq V as desired.

(4)(1)(4) \Longrightarrow (1): Let VYV \subseteq Y be an arbitrary open set. We seek to show f1(V)Xf^{-1}(V) \subseteq X is open. If f1(V)=f^{-1}(V) = \emptyset, then we are done. Otherwise, let xf1(V)x \in f^{-1}(V). Then f(x)Vf(x) \in V, but there is some open neighborhood UxXU_x \subseteq X of xx such that f(Ux)Vf(U_x) \subseteq V. Note then that Uxf1(V)U_x \subseteq f^{-1}(V) for each xf1(V)x \in f^{-1}(V), and so xf1(V)Uxf1(V)\bigcup_{x \in f^{-1}(V)} U_x \subseteq f^{-1}(V). Moreover, {Ux}xf1(V)\{U_x\}_{x \in f^{-1}(V)} covers f1(V)f^{-1}(V), so f1(V)xf1(V)Uxf^{-1}(V) \subseteq \bigcup_{x \in f^{-1}(V)} U_x. Thus,

f1(V)=xf1(V)Ux,f^{-1}(V) = \bigcup_{x \in f^{-1}(V)} U_x,

which is the arbitrary union of open sets, completing the proof.

[2.7.5]Remark(Intuition Behind Characterizations of Continuity)#

The statement in (2)(2), that f(A)f(A)f(\bar{A}) \subseteq \bar{f(A)} for every AXA \subseteq X, can be interpreted locally and globally. In the case of metric spaces, if there is some xAx \in \bar{A}, then there is some sequence (xn)A(x_n) \subseteq A such that xnxx_n \to x. If ff is continuous, then the image sequence f(xn)f(A)f(x_n) \subseteq f(A) is such that f(xn)f(x)f(x_n) \to f(x). Thus elements of AA and limit points of AA are sent to elements of f(A)f(A) and limit points of f(A)f(A). That is, the image of the closure of AA lives in the closure of f(A)f(A), encoding the idea that f(A)f(A)f(\bar{A}) \subseteq \bar{f(A)}. This intuition locally reasons why sequential continuity works, and globally reasons that the continuous image of the closure of AA lives in the closure of the continuous image of AA. The global principle is illustrated in this schematic.

Statement (3)(3) is a statement that is dual to the definition. Since open sets are dual to closed sets under complementation, it makes sense that changing open sets to closed ones in the definition of continuity yields the same characterization, since open subsets of a topological space are in bijective correspondence with closed subsets.

Statement (4)(4) is a local characterization of continuity. In fact, we say a function ff is continuous specifically at some point x0x_0 if, for every open neighborhood VYV \subseteq Y of f(x0)f(x_0), there is some open neighborhood UXU \subseteq X of x0x_0 such that f(U)Vf(U) \subseteq V. If this statement is true for all elements in the domain of ff, then ff is continuous on its domain. This statement is reminiscent of the challenge-response system used in εδ\epsilon-\delta proofs in analysis. For a fixed element of the domain xx and some neighborhood in the codomain about f(x)f(x) (the “challenge”), we seek a neighborhood in the domain about xx whose image lies in the neighborhood in the codomain (the “response”).

[2.7.6]Definition(Homeomorphism, Homeomorphic Spaces)#

Suppose X,YX, Y are topological spaces and f:XYf: X \to Y is a set-function. If ff is bijective, and f:XYf: X \to Y is continuous, and f1:YXf^{-1}: Y \to X is continuous, we say ff is a homeomorphism. Two spaces X,YX, Y are homeomorphic if a homeomorphism exists between them.

[2.7.7]Remark(Equivalent Characterization of Homeomorphism)#

Recall f:XYf: X \to Y is continuous if, for every open set UYU \subseteq Y, f1(U)Xf^{-1}(U) \subseteq X is open. Analogously, f1:YXf^{-1}: Y \to X is open if, for every open set UXU \subseteq X, f(U)Yf(U) \subseteq Y is open. Thus a bijection f:XYf: X \to Y such that f(U)f(U) is open if and only if UU is open is an alternate way to define a homeomorphism.

Note this means open sets between two homeomorphic spaces are in bijective correspondence. This property means homeomorphic spaces are not only identical as sets, but also identical as topological spaces! The structure of the two spaces are the same, and operations involving the topology of each space are analogous in each space. Homeomorphisms are akin to isomorphisms in that homeomorphic/isomorphic spaces are identical in structure and shape, up to labeling of elements.

[2.7.8]Definition(Topological Embedding)#

Suppose f:XYf: X \to Y is an injective, continuous map. Then let f~:Xf(X)\tilde{f}: X \to f(X) be the induced bijection from XX to the image set f(X)f(X). If f~\tilde{f} is a homeomorphism, we say ff is a topological embedding of XX into YY. In other words, ff is a topological embedding if it's an homeomorphism from its domain to its image.

We now list a few common types of continuous functions between topological spaces.

[2.7.9]Theorem(Common Continuous Functions)#

Let X,Y,ZX, Y, Z be topological spaces. Then the following functions are continuous.

  1. Constant Function. If f:XYf: X \to Y maps every element of XX to some y0Yy_0 \in Y, then ff is continuous.

  2. Inclusion Map. If AA is a subspace of XX, the inclusion map ι:AX\iota: A \to X is continuous.

  3. Composition. If f:XYf: X \to Y and g:YZg: Y \to Z are both continuous functions, then gf:XZg \circ f: X \to Z is continuous.

  4. Domain Restriction. If f:XYf: X \to Y is continuous and AA is a subspace of XX, then the restriction fA:AYf|_A: A \to Y is continuous.

  5. Codomain Restriction/Expnasion. If f:XYf: X \to Y is continuous and ZZ is a subspace of YY that contains f(X)f(X), then g:XZg: X \to Z is continuous. Likewise, if ZZ is a superspace of YY, then h:XZh: X \to Z is continuous as well.

  6. Local Continuity. The map f:XYf: X \to Y is continuous if, for every xXx \in X, there is some neighborhood UxXU_x \subseteq X such that fUx:UxYf|_{U_x}: U_x \to Y is continuous.

[2.7.10]Theorem(Pasting Lemma)#

Suppose X=ABX = A \cup B, where A,BA, B are closed subsets of XX. Let f:AYf: A \to Y and g:BYg: B \to Y be continuous functions such that f(x)=g(x)f(x) = g(x) for every xABx \in A \cap B. Define the function

h:XYh(x)={f(x)xA,g(x)xB.h: X \to Y \quad h(x) = \begin{cases} f(x) & x \in A, \\ g(x) & x \in B. \end{cases}

Then hh is continuous.

Proof.

Let OYO \subseteq Y be a closed subset of YY. Then note

h1(O)=f1(O)g1(O).h^{-1}(O) = f^{-1}(O) \cup g^{-1}(O).

By continuity, note f1(O)f^{-1}(O) is closed in AA. By definition, this means f1(O)=CAf^{-1}(O) = C \cap A, where CC is some closed subset of XX. But since AA is also a closed subset of XX, this makes f1(O)f^{-1}(O) a closed subset of XX. An entirely symmetric argument reveals g1(O)g^{-1}(O) is closed as well. Thus h1(O)h^{-1}(O) is closed in XX, completing the proof.

[2.7.11]Theorem(Maps into Cartesian Product)#

Let f:AX×Yf: A \to X \times Y be a function defined by f(x)=(fX(x),fY(x))f(x) = (f_X(x), f_Y(x)). Then ff is continuous if and only if fX:AXf_X: A \to X and fY:AYf_Y: A \to Y are both continuous.

Proof.

()(\Longrightarrow): Suppose ff is continuous. Let UXU \subseteq X be open: we seek to show fX1(U)f_X^{-1}(U) is open as well. Note that fX=πXff_X = \pi_X \circ f, so then fX1=(πXf)1=f1(πX)1f_X^{-1} = (\pi_X \circ f)^{-1} = f^{-1} \circ (\pi_X)^{-1}. Note that πX1(U)=U×Y\pi_X^{-1}(U) = U \times Y, which is an open subset of X×YX \times Y when gifted with the product topology. Then, by continuity of ff, the preimage of U×YU \times Y is open, meaning fX1f_X^{-1} maps open sets to open sets, making fXf_X continuous. An entirely symmetric argument proves fYf_Y is continuous as desired.

()(\Longleftarrow): Suppose fX,fYf_X, f_Y are continuous. Let UX×YU \subseteq X \times Y be an open: we seek to show f1(U)f^{-1}(U) is open. Let U=λΛ(Xλ×Yλ)U = \bigcup_{\lambda \in \Lambda} (X_\lambda \times Y_\lambda), where {Xλ}λΛ\{X_\lambda\}_{\lambda \in \Lambda} is a family of open subsets of XX and {Yλ}λΛ\{Y_\lambda\}_{\lambda \in \Lambda} is a family of open subsets in YY. Now note

f1(U)={xA:f(x)U}={xA:f(x)λΛ(Xλ×Yλ)}=λΛ{xA:fX(x)Xλ,fY(x)Yλ}=λΛ({xA:fX(x)Xλ}{xA:fY(x)Yλ})=λΛ(fX1(Xλ)fY1(Yλ)).\begin{align*} f^{-1}(U) &= \{x \in A: f(x) \in U\} \\ &= \left\{x \in A: f(x) \in \bigcup_{\lambda \in \Lambda} (X_\lambda \times Y_\lambda) \right\} \\ &= \bigcup_{\lambda \in \Lambda} \{x \in A: f_X(x) \in X_\lambda, f_Y(x) \in Y_\lambda\} \\ &= \bigcup_{\lambda \in \Lambda} \Big( \{x \in A: f_X(x) \in X_\lambda\} \cap \{x \in A: f_Y(x) \in Y_\lambda\} \Big) \\ &= \bigcup_{\lambda \in \Lambda} \Big( f_X^{-1}(X_\lambda) \cap f_Y^{-1}(Y_\lambda) \Big). \end{align*}

By continuity of fXf_X and fYf_Y, we note each fX1(Xλ)fY1(Yλ)f_X^{-1}(X_\lambda) \cap f_Y^{-1}(Y_\lambda) is the intersection of two open sets, and is therefore open. Because f1(U)f^{-1}(U) is a union of such open sets, it is also open, meaning ff is continuous.

2.7.1Exercises#

[2.7.12]Problem#

Suppose f:XYf: X \to Y is continuous. Suppose xx is a limit point of the subset AXA \subseteq X. Is it true that f(x)f(x) is a limit point of f(A)f(A)?

Solution.

Suppose xx is a limit point of AA. Let VYV \subseteq Y be some open neighborhood of f(x)f(x). By continuity of ff, note there is some open neighborhood UXU \subseteq X of xx such that f(U)Vf(U) \subseteq V. Then note U(A{x})U \cap (A \setminus \{x\}) \ne \emptyset by the definition of a limit point. If our scenario is such that f(U(A{x}))={f(x)}f(U \cap (A \setminus \{x\})) = \{f(x)\} for every single open neighborhood of xx, then f(x)f(x) is not a limit point of f(A)f(A).

Let U=XU = X. Then f(U(A{x}))=f(A{x})={f(x)}f(U \cap (A \setminus \{x\})) = f(A \setminus \{x\}) = \{f(x)\} would make what we seek false. A candidate for disproof is a constant function. Let f:RRf: \bR \to \bR be defined as f(x)=0f(x) = 0, then let A=[0,1]RA = [0, 1] \subseteq \bR. Of course, 00 is a limit point for AA, but f(A)={0}f(A) = \{0\}, and singletons don't have limit points, completing the disproof.

[2.7.13]Problem#

Let y0Yy_0 \in Y. Define f:XX×Yf: X \to X \times Y by f(x)=(x,y0)f(x) = (x, y_0). Show that ff is a topological embedding.

Solution.

Note f(X)=X×{y0}f(X) = X \times \{y_0\}, so we seek to show f~:XX×{y0}\tilde{f}: X \to X \times \{y_0\} is a homeomorphism, where the codomain is blessed with the subspace topology. f~\tilde{f} is obviously bijective, so we simply show f~\tilde{f} and f~1\tilde{f}^{-1} are continuous.

First, suppose VX×{y0}V \subseteq X \times \{y_0\} is open. Then V=V(X×{y0})V = V' \cap (X \times \{y_0\}), where VX×YV' \subseteq X \times Y is open. Note that

V=λΛ(Xλ×Yλ),V' = \bigcup_{\lambda \in \Lambda} (X_\lambda \times Y_\lambda),

where {Xλ}\{X_\lambda\} and {Yλ}\{Y_\lambda\} are families of open subsets of XX and YY respectively. Then

V=[λΛ(Xλ×Yλ)][X×{y0}]=(λΛ,y0YλXλ):=OX×{y0},V = \Bigg[\bigcup_{\lambda \in \Lambda} (X_\lambda \times Y_\lambda)\Bigg] \cap \Big[ X \times \{y_0\} \Big] = \underbrace{\left(\bigcup_{\lambda \in \Lambda, y_0 \in Y_\lambda} X_\lambda\right)}_{:= O_X} \times \{y_0\},

where OXXO_X \subseteq X is open. Then

f~1(V)={xX:f~(x)OX×{y0}}={x:xOX}=OX,\tilde{f}^{-1}(V) = \{x \in X: \tilde{f}(x) \in O_X \times \{y_0\}\} = \{x: x \in O_X\} = O_X,

an open subset of XX.

Now suppose UXU \subseteq X is open. Then

f~(U)=U×{y0}=(U×Y)open subset of X×Y (X×{y0}),\tilde{f}(U) = U \times \{y_0\} = \underbrace{(U \times Y)}_{\mathclap{\text{open subset of } X \times Y}} \cap ~ (X \times \{y_0\}),

which is an open set in X×{y0}X \times \{y_0\}. Thus f~\tilde{f} is a homeomorphism, making ff an embedding.

[2.7.14]Problem#

Let YY be an ordered set endowed with the order topology. Let f,g:XYf, g: X \to Y be continuous. Show the set A={x:f(x)g(x)}A = \{x: f(x) \le g(x)\} is closed in XX. Then, show h(x)=min{f(x),g(x)}h(x) = \min\{f(x), g(x)\} is continuous.

Solution.

We show A=AA = \bar{A}. Let xAx \in \bar{A} be a limit point of AA. For the sake of contradiction, suppose xAx \notin A, and so f(x)>g(x)f(x) > g(x). If there is some cYc \in Y such that f(x)>c>g(x)f(x) > c > g(x), then let Vg=(,c)V_g = (-\infty, c) and Vf=(c,)V_f = (c, \infty). Otherwise, let Vf=(g(x),)V_f = (g(x), \infty) and Vg=(,f(x))V_g = (-\infty, f(x)). Then Vf,VgYV_f, V_g \subseteq Y are disjoint, open neighborhoods of f(x)f(x) and g(x)g(x), where all elements of VfV_f are strictly greater than all elements of VgV_g. By continuity, there exist open neighborhoods Uf,UgXU_f, U_g \subseteq X of xx such that f(Uf)Vff(U_f) \subseteq V_f and g(Ug)Vgg(U_g) \subseteq V_g. But note UfUgU_f \cap U_g is an open neighborhood of xx. Since xx is a limit point, this implies there is some u(UfUg)(A{x})u \in (U_f \cap U_g) \cap (A \setminus \{x\}). Since uAu \in A, it follows that f(u)g(u)f(u) \le g(u). But also note f(u)Vff(u) \in V_f and g(u)Vgg(u) \in V_g, meaning f(u)>g(u)f(u) > g(u) by how Vf,VgV_f, V_g are defined. BY THE TRICHOTOMY POSTULATE OF ORDERED SETS, this is a contradiction. Thus f(x)g(x)f(x) \le g(x), and so xAx \in A, making AA closed. An entirely symmetric argument shows B={x:f(x)g(x)}B = \{x: f(x) \ge g(x)\} is closed in XX.

Define f~:AY\tilde{f}: A \to Y and g~:BY\tilde{g}: B \to Y. By the pasting lemma, we may paste together these maps to form h:ABYh: A \cup B \to Y such that

h(x)={f(x)xAg(x)xB=min{f(x),g(x)},h(x) = \begin{cases} f(x) & x \in A \\ g(x) & x \in B \end{cases} = \min\{f(x), g(x)\},

which is continuous as desired.

[2.7.15]Problem#

Let {Aα}\{A_\alpha\} be a collection of subsets of XX such that X=αAαX = \bigcup_{\alpha} A_\alpha. Let f:XYf: X \to Y be such that fAαf|_{A_\alpha} for each α\alpha.

  1. Supposing {Aα}\{A_\alpha\} is a finite family of closed sets, show ff is continuous.

  2. Construct an example where {Aα}\{A_\alpha\} is a countable family of closed sets and ff is discontinuous.

Solution.
  • For our base case, suppose there are two sets in the family, A1A_1 and A2A_2. Note fA1f|_{A_1} and fA2f|_{A_2} are continuous and agree on mutual points in their domain, so gluing them together yields a continuous function, which is ff. Now suppose the hypothesis is true for n1n - 1 many sets. Let A=A1A2An1A' = A_1 \cup A_2 \cup \cdots \cup A_{n - 1}, which is closed (since finite unions of closed sets are closed). fAf|_{A'} is continuous by inductive hypothesis. Then note fAnf|_{A_n} is also continuous by the original hypothesis, and fA,fAnf|_{A'}, f|_{A_n} agree on common points of their domain. Thus ff is continuous by the Pasting Lemma.

  • Let X=[0,1]X = [0, 1]. Let {An}nZ0\{A_n\}_{n \in \bZ_{\ge 0}} be defined such that A0={1}A_0 = \{1\}, A1={0}A_1 = \{0\}, and An=An1[0,11/n]A_n = A_{n - 1} \cup [0, 1 - 1/n] for every n2Z+n \ge 2 \in \bZ_+. Then each AnA_n is closed, since the finite union of closed intervals is closed, and [0,1]=nZ0An[0, 1] = \bigcup_{n \in \bZ_{\ge 0}} A_n. Define f:[0,1]Rf: [0, 1] \to \bR by f(x)=0f(x) = 0 for all x[0,1)x \in [0, 1), and f(1)=1f(1) = 1 otherwise. Then note fAnf|_{A_n} is continuous for each nZ+n \in \bZ_+, since ff is constant on this restriction. But ff is not continuous on [0,1][0, 1], since there is a jump discontinuity at x=1x = 1.

[2.7.16]Problem#

Let XX be a topological space, and let AXA \subseteq X. Let f:AYf: A \to Y be a continuous function to some target codomain YY that is Hausdorff. Show that if ff can be uniquely extended to some continuous function g:AYg: \bar{A} \to Y, then gg is uniquely determined by ff.

Solution.

Suppose g1,g2:AYg_1, g_2: \bar{A} \to Y are continuous functions such that f=g1A=g2Af = g_1|_{A} = g_2|_{A}. For the sake of contradiction, suppose g1≢g2g_1 \not \equiv g_2, so there is some xAAx \in \bar{A} \setminus A such that g1(x)g2(x)g_1(x) \ne g_2(x). By Hausdorffness of YY, draw disjoint open neighborhoods V1,V2YV_1, V_2 \subseteq Y of g1(x),g2(x)g_1(x), g_2(x) respectively. By continuity of ff, note g11(V1)g_1^{-1}(V_1) and g21(V2)g_2^{-1}(V_2) are open subsets of XX that contain xx. As such, g11(V1)g21(V2)g_1^{-1}(V_1) \cap g_2^{-1}(V_2) is also an open neighborhood of xx. Since xx is a limit point of AA, there is some x0(g11(V1)g21(V2))(A{x})x_0 \in (g_1^{-1}(V_1) \cap g_2^{-1}(V_2)) \cap (A \setminus \{x\}). Since x0Ax_0 \in A, it follows that f(x0)=g1(x0)=g2(x0)f(x_0) = g_1(x_0) = g_2(x_0). But g1(x0)V1g_1(x_0) \in V_1 and g2(x0)V2g_2(x_0) \in V_2, which is a contradiction. Thus g1g2g_1 \equiv g_2, completing the proof.