Skip to content

Continuity and Homeomorphisms

Definition. Let (X,τX)(X, \tau_X) and (Y,τY)(Y, \tau_Y) be topological spaces. A function f:X→Yf : X \to Y is continuous if the preimage of every open set is open: for all U∈τYU \in \tau_Y, f−1(U)∈τXf^{-1}(U) \in \tau_X.

Equivalently, ff is continuous if the preimage of every closed set is closed.

Proposition 4.1. The following are equivalent for f:X→Yf : X \to Y:

  1. ff is continuous.
  2. f−1(V)f^{-1}(V) is closed in XX for every closed V⊆YV \subseteq Y.
  3. f−1(B)‾⊆f−1(B‾)\overline{f^{-1}(B)} \subseteq f^{-1}(\overline{B}) for every B⊆YB \subseteq Y.
  4. f(A‾)⊆f(A)‾f(\overline{A}) \subseteq \overline{f(A)} for every A⊆XA \subseteq X.

Proof. (1) ⇔\Leftrightarrow (2): for any B⊆YB \subseteq Y, f−1(Y∖B)=X∖f−1(B)f^{-1}(Y \setminus B) = X \setminus f^{-1}(B), so preimages of open sets being open is exactly preimages of closed sets being closed.

(2) ⇒\Rightarrow (3): the closure of BB is the intersection of all closed supersets of BB, and preimages preserve intersections, so

f−1(B‾)=⋂{f−1(C):C closed in Y,  B⊆C}.f^{-1}(\overline{B}) = \bigcap \{ f^{-1}(C) : C \text{ closed in } Y, \; B \subseteq C \}.

By (2) each f−1(C)f^{-1}(C) is closed in XX, and each contains f−1(B)f^{-1}(B). The closure f−1(B)‾\overline{f^{-1}(B)} is the smallest closed set containing f−1(B)f^{-1}(B), so it is contained in every member of the family on the right; in particular in their intersection, f−1(B‾)f^{-1}(\overline{B}).

(3) ⇒\Rightarrow (2): let VV be closed in YY and set B=VB = V. Then f−1(V)‾⊆f−1(V‾)=f−1(V)⊆f−1(V)‾\overline{f^{-1}(V)} \subseteq f^{-1}(\overline{V}) = f^{-1}(V) \subseteq \overline{f^{-1}(V)}, where the last inclusion is extensivity of closure. So f−1(V)f^{-1}(V) equals its closure and is closed.

(1) ⇒\Rightarrow (4): let x∈A‾x \in \overline{A} and let VV be any open neighbourhood of f(x)f(x). By (1), f−1(V)f^{-1}(V) is an open neighbourhood of xx, and x∈A‾x \in \overline{A}, so f−1(V)∩A≠∅f^{-1}(V) \cap A \neq \emptyset. Pick aa in the intersection: then f(a)∈V∩f(A)f(a) \in V \cap f(A), so every open neighbourhood of f(x)f(x) meets f(A)f(A), i.e. f(x)∈f(A)‾f(x) \in \overline{f(A)}.

(4) ⇒\Rightarrow (1): let UU be open in YY; we show f−1(U)f^{-1}(U) is open. Set A=X∖f−1(U)A = X \setminus f^{-1}(U). We claim f−1(U)⊆X∖A‾f^{-1}(U) \subseteq X \setminus \overline{A}: if x∈f−1(U)x \in f^{-1}(U) were in A‾\overline{A}, then by (4) f(x)∈f(A)‾f(x) \in \overline{f(A)}, so the open neighbourhood UU of f(x)f(x) meets f(A)f(A); say f(a)∈Uf(a) \in U for some a∈Aa \in A. But then a∈f−1(U)∩A=∅a \in f^{-1}(U) \cap A = \emptyset, a contradiction. Hence f−1(U)⊆X∖A‾f^{-1}(U) \subseteq X \setminus \overline{A}. Conversely X∖A‾⊆X∖A=f−1(U)X \setminus \overline{A} \subseteq X \setminus A = f^{-1}(U). So f−1(U)=X∖A‾f^{-1}(U) = X \setminus \overline{A}, which is open. ■\blacksquare

Direction (3) is the one to be careful with: the inclusion runs from the closure of the preimage into the preimage of the closure, and it can be strict. For the constant map f:R→Rf : \mathbb{R} \to \mathbb{R}, f≡0f \equiv 0, with B=(0,1)B = (0, 1): f−1(B)‾=∅‾=∅\overline{f^{-1}(B)} = \overline{\emptyset} = \emptyset while f−1(B‾)=f−1([0,1])=Rf^{-1}(\overline{B}) = f^{-1}([0,1]) = \mathbb{R}.

Example 4.1. Every constant function f:X→Yf : X \to Y is continuous.

Example 4.2. The identity map id⁡:X→X\operatorname{id} : X \to X is always continuous.

Example 4.3. If τ1\tau_1 and τ2\tau_2 are topologies on XX with τ1⊆τ2\tau_1 \subseteq \tau_2, then id⁡:(X,τ2)→(X,τ1)\operatorname{id} : (X, \tau_2) \to (X, \tau_1) is continuous, but id⁡:(X,τ1)→(X,τ2)\operatorname{id} : (X, \tau_1) \to (X, \tau_2) need not be.

Proposition 4.2. The composition of continuous functions is continuous: if f:X→Yf : X \to Y and g:Y→Zg : Y \to Z are continuous, then g∘f:X→Zg \circ f : X \to Z is continuous.

Proof. For WW open in ZZ, (g∘f)−1(W)=f−1(g−1(W))(g \circ f)^{-1}(W) = f^{-1}(g^{-1}(W)). The set g−1(W)g^{-1}(W) is open in YY by continuity of gg; its preimage under ff is open in XX by continuity of ff. ■\blacksquare

Continuity at a point. A function f:X→Yf : X \to Y is continuous at x0∈Xx_0 \in X if for every neighbourhood VV of f(x0)f(x_0), there exists a neighbourhood UU of x0x_0 such that f(U)⊆Vf(U) \subseteq V. This local definition coincides with the global definition: ff is continuous iff it is continuous at every point.

Proposition 4.2.1. ff is continuous if and only if it is continuous at every point of XX.

Proof. (⇒\Rightarrow) Let VV be a neighbourhood of f(x0)f(x_0). It contains an open set V∘∋f(x0)V^\circ \ni f(x_0). Then U=f−1(V∘)U = f^{-1}(V^\circ) is an open neighbourhood of x0x_0 with f(U)⊆Vf(U) \subseteq V.

(⇐\Leftarrow) Let WW be open in YY; show f−1(W)f^{-1}(W) is open. If x∈f−1(W)x \in f^{-1}(W), then WW is a neighbourhood of f(x)f(x), so continuity at xx gives a neighbourhood UxU_x of xx with f(Ux)⊆Wf(U_x) \subseteq W. Shrinking UxU_x to its open interior, xx is an interior point of f−1(W)f^{-1}(W). Every point of f−1(W)f^{-1}(W) is interior, so f−1(W)f^{-1}(W) is open. ■\blacksquare

Proposition 4.3 (Pasting Lemma). If X=A∪BX = A \cup B where AA and BB are closed (or open) in XX, and f:A→Yf : A \to Y, g:B→Yg : B \to Y are continuous functions that agree on A∩BA \cap B, then the function h:X→Yh : X \to Y defined by h∣A=fh|_A = f and h∣B=gh|_B = g is continuous.

Proof. Closed case. Let VV be closed in YY. Then h−1(V)=(f−1(V)∪g−1(V))h^{-1}(V) = (f^{-1}(V) \cup g^{-1}(V)): indeed x∈h−1(V)x \in h^{-1}(V) means h(x)∈Vh(x) \in V, and h(x)h(x) is either f(x)f(x) or g(x)g(x). Now f−1(V)f^{-1}(V) is closed in AA (continuity of ff) and AA is closed in XX, so f−1(V)f^{-1}(V) is closed in XX; likewise g−1(V)g^{-1}(V). A finite union of closed sets is closed, so h−1(V)h^{-1}(V) is closed, and hh is continuous by Proposition 4.1(2).

Open case. Dually, let VV be open in YY. Then h−1(V)=f−1(V)∪g−1(V)h^{-1}(V) = f^{-1}(V) \cup g^{-1}(V) as above, each of f−1(V)f^{-1}(V), g−1(V)g^{-1}(V) is open in the open (in XX) subspace AA, resp. BB, hence open in XX, and their union is open. ■\blacksquare

Why the hypotheses matter: if one piece is closed and the other open, the argument breaks down in both cases at once; a set closed in a closed subspace is closed in XX, but a set open in a closed subspace need not be. The classic counterexample: f(x)=0f(x) = 0 on (−∞,0](-\infty, 0] and f(x)=1f(x) = 1 on (0,∞)(0, \infty) is continuous on each piece and the pieces agree on their (empty) intersection, but one piece is closed while the other is merely open; and ff is discontinuous at 00.

Example 4.4 (Piecewise functions). The absolute value function f(x)=∣x∣f(x) = |x| is continuous on R\mathbb{R} by the pasting lemma: on (−∞,0](-\infty, 0] it equals −x-x (continuous), on [0,∞)[0, \infty) it equals xx (continuous), and the two agree at x=0x = 0.

Example 4.5. The function f(x)=sin⁡(1/x)f(x) = \sin(1/x) for x≠0x \neq 0 and f(0)=0f(0) = 0 is not continuous at 00, even though it satisfies the intermediate value property on every neighbourhood.

Definition. A function f:X→Yf : X \to Y is open if the image of every open set is open; it is closed if the image of every closed set is closed. Continuity does not imply openness: the constant function f(x)=cf(x) = c is continuous but not open (the image {c}\{c\} is not open in R\mathbb{R}). The projection π:X×Y→X\pi : X \times Y \to X is open but not necessarily closed.

Proposition 4.4. A bijective continuous function is a homeomorphism iff it is open (equivalently, closed).

Proof. Let f:X→Yf : X \to Y be a continuous bijection. If ff is a homeomorphism, then f−1f^{-1} is continuous, so for open U⊆XU \subseteq X the set (f−1)−1(U)=f(U)(f^{-1})^{-1}(U) = f(U) is open in YY: ff is open. Conversely, if ff is open, then for open U⊆XU \subseteq X, (f−1)−1(U)=f(U)(f^{-1})^{-1}(U) = f(U) is open in YY, which is exactly continuity of f−1f^{-1}; so ff is a homeomorphism.

For the equivalence with closed: given that ff is a bijection, ff maps complements to complements, f(X∖U)=Y∖f(U)f(X \setminus U) = Y \setminus f(U), so ff is open iff ff is closed. ■\blacksquare

Definition. A function f:X→Yf : X \to Y is a homeomorphism if ff is bijective and both ff and f−1f^{-1} are continuous. We write X≅YX \cong Y and say XX and YY are homeomorphic.

A topological property (or topological invariant) is a property preserved by homeomorphisms.

Example 4.6. (0,1)(0, 1) is homeomorphic to R\mathbb{R} via f(x)=tan⁡(πx−π2)f(x) = \tan\left(\pi x - \frac{\pi}{2}\right).

Example 4.7. Any two open intervals (a,b)(a, b) and (c,d)(c, d) in R\mathbb{R} are homeomorphic via an affine map.

Example 4.8 (Coffee cup and donut). A coffee cup (with a handle) is homeomorphic to a torus S1×S1S^1 \times S^1 via a continuous deformation. This illustrates that homeomorphisms permit stretching and bending but not tearing or gluing.

Proposition 4.5. Homeomorphism is an equivalence relation: reflexive, symmetric, and transitive.

Proof. Reflexive: id⁡X\operatorname{id}_X is a bijection and its own continuous inverse. Symmetric: if ff is a homeomorphism then f−1f^{-1} is a bijection with (f−1)−1=f(f^{-1})^{-1} = f continuous, so f−1f^{-1} is a homeomorphism. Transitive: if f:X→Yf : X \to Y and g:Y→Zg : Y \to Z are homeomorphisms, g∘fg \circ f is a bijection with inverse f−1∘g−1f^{-1} \circ g^{-1}, continuous by Proposition 4.2 applied to the continuous maps g−1g^{-1} and f−1f^{-1}. ■\blacksquare

The following are topological invariants (preserved by homeomorphisms):

  • Compactness
  • Connectedness
  • Separation axioms (T0T_0, T1T_1, T2T_2, etc.)
  • Countability axioms (first-countable, second-countable)
  • The fundamental group π1(X)\pi_1(X)

Proposition 4.6. “Boundedness” is not a topological property: (0,1)(0, 1) is bounded but is homeomorphic to the unbounded R\mathbb{R}.

Proof. The map f:(0,1)→Rf : (0, 1) \to \mathbb{R} of Example 4.6, f(x)=tan⁡(πx−π/2)f(x) = \tan(\pi x - \pi/2), is a bijection with inverse f−1(t)=12+1πarctan⁡(t)f^{-1}(t) = \frac{1}{2} + \frac{1}{\pi}\arctan(t); both are continuous as compositions of continuous functions (tan⁡\tan and arctan⁡\arctan are continuous on their domains, which the maps avoid leaving). So (0,1)≅R(0, 1) \cong \mathbb{R}. If boundedness were a topological property, R\mathbb{R} would be bounded; but R\mathbb{R} is not bounded in its standard metric. Hence boundedness is a property of the metric, not of the topology it generates. ■\blacksquare

Definition. An embedding is a homeomorphism onto its image: f:X→Yf : X \to Y such that f:X→f(X)f : X \to f(X) (with the subspace topology) is a homeomorphism.

Definition. A surjective continuous map q:X→Yq : X \to Y is a quotient map if U⊆YU \subseteq Y is open iff q−1(U)q^{-1}(U) is open in XX. Quotient maps are used to construct spaces by gluing: if ∼\sim is an equivalence relation on XX, then X/∼X/{\sim} with the quotient topology is the space of equivalence classes with the finest topology making the projection continuous.

Example 4.9. The unit interval [0,1][0, 1] with endpoints identified yields the circle S1S^1: [0,1]/{0∼1}≅S1[0, 1] / \{0 \sim 1\} \cong S^1. The unit square with opposite edges identified yields the torus.

4.6 Worked Example: Proving Two Spaces are Not Homeomorphic

Section titled “4.6 Worked Example: Proving Two Spaces are Not Homeomorphic”

Problem. Show that (0,1)(0, 1) and [0,1][0, 1] are not homeomorphic.

Solution

Suppose f:[0,1]→(0,1)f : [0, 1] \to (0, 1) is a homeomorphism. Then removing the point 00 from [0,1][0, 1] leaves [0,1]∖{0}=(0,1][0, 1] \setminus \{0\} = (0, 1], which is connected. Removing f(0)f(0) from (0,1)(0, 1) leaves (0,1)∖{f(0)}=(0,f(0))∪(f(0),1)(0, 1) \setminus \{f(0)\} = (0, f(0)) \cup (f(0), 1), which is disconnected. Since connectedness is preserved by homeomorphisms, this is a contradiction.

■\blacksquare

A homeomorphism is the topological version of “the same shape.” Two spaces are homeomorphic if there exists a continuous bijection between them whose inverse is also continuous. Informally, this means you can stretch, bend, and deform one space into the other, but you cannot tear or glue. A coffee cup and a donut are homeomorphic because they both have exactly one hole; a sphere and a torus are not homeomorphic because they have different numbers of holes.

The key insight is that homeomorphisms preserve topological properties such as compactness, connectedness, and the fundamental group. Properties that are not preserved by homeomorphisms, like “boundedness” or “being a subset of R3\mathbb{R}^3,” are geometric rather than topological. The pasting lemma captures a practical criterion for constructing continuous functions: if you define a function separately on two closed (or open) pieces that agree on the overlap, the result is continuous. This is why absolute value, piecewise linear functions, and most “glued together” constructions in analysis turn out to be continuous.

4.8 Worked Example: Continuity of a Piecewise Function

Section titled “4.8 Worked Example: Continuity of a Piecewise Function”

Problem. Determine whether f:R→Rf : \mathbb{R} \to \mathbb{R} defined by f(x)=xsin⁡(1/x)f(x) = x\sin(1/x) for x≠0x \neq 0 and f(0)=0f(0) = 0 is continuous at x=0x = 0.

Solution

For x≠0x \neq 0, ∣f(x)∣=∣xsin⁡(1/x)∣≤∣x∣|f(x)| = |x\sin(1/x)| \leq |x|. Given ε>0\varepsilon > 0, choose δ=ε\delta = \varepsilon. If ∣x−0∣<δ|x - 0| < \delta, then ∣f(x)−f(0)∣=∣xsin⁡(1/x)∣≤∣x∣<ε|f(x) - f(0)| = |x\sin(1/x)| \leq |x| < \varepsilon. Therefore ff is continuous at 00 (and everywhere on R\mathbb{R}). Note that unlike sin⁡(1/x)\sin(1/x), the factor xx forces the oscillation amplitude to decay to zero.

■\blacksquare

Mistake 1: Assuming that a continuous bijection is automatically a homeomorphism. A continuous bijection is not necessarily a homeomorphism. The inverse function must also be continuous. For example, the map f:[0,2π)→S1f: [0, 2\pi) \to S^1 defined by f(t)=(cos⁡t,sin⁡t)f(t) = (\cos t, \sin t) is a continuous bijection, but its inverse is not continuous at (1,0)(1, 0). A bijective continuous map is a homeomorphism if and only if it is open (or equivalently, closed).

Mistake 2: Confusing open maps with continuous maps. A function can be continuous without being open, and vice versa. The constant function f(x)=cf(x) = c is continuous but not open (the image of any open set is {c}\{c\}, which is not open). The projection π:R2→R\pi: \mathbb{R}^2 \to \mathbb{R} is open but not closed (the image of the closed hyperbola {(x,y):xy=1}\{(x, y) : xy = 1\} is R∖{0}\mathbb{R} \setminus \{0\}, which is not closed).

Mistake 3: Forgetting that homeomorphism is an equivalence relation. Homeomorphism is reflexive (the identity map is a homeomorphism), symmetric (the inverse of a homeomorphism is a homeomorphism), and transitive (the composition of homeomorphisms is a homeomorphism). Failing to check any of these can lead to errors when classifying spaces up to homeomorphism.

Mistake 4: Assuming that topological properties are preserved by continuous maps. Only homeomorphisms preserve all topological properties. A continuous map need not preserve compactness, connectedness, or separation axioms in both directions. For example, a continuous bijection from a compact space to a Hausdorff space is a homeomorphism, but this is a special case, not a general rule.

Mistake 5: Misapplying the pasting lemma. The pasting lemma requires that the two pieces agree on their intersection and that both pieces are either both closed or both open. If one piece is closed and the other is open, or if they disagree on the intersection, the resulting function may not be continuous.

  • Topological Spaces: Topological spaces provide the foundation for defining continuity and homeomorphisms.
  • Compactness: Compactness is preserved by continuous functions and characterizes spaces where extreme value theorem holds.
  • Connectedness: Connectedness is a topological invariant preserved by homeomorphisms and continuous images.