Continuity of Maps

Why should a definition built from open sets recover the familiar ε\varepsilon-δ\delta picture from calculus? This is the concrete puzzle this article resolves. The topological definition of continuity — a map is continuous if preimages of open sets are open — is one of the great distillations in mathematics. It strips continuity down to the bare structural minimum. It discards distance and even the ability to measure "how close." Yet it keeps every consequence that matters for analysis and geometry. The idea matters because it lets continuity make sense in settings with no metric at all. Examples include spaces of functions, quotient spaces, Zariski-topologized varieties, and spaces of ideals in a ring. It applies anywhere a topology can be defined. It also reveals why continuity behaves the way it does. Composition of continuous maps is continuous almost by definitional bookkeeping. Properties like connectedness and compactness are preserved for essentially the same one-line reason. The big picture is that continuity is a relationship between two topological spaces. This relationship is mediated entirely by their lattices of open sets, not by their points individually. A function can fail to be continuous even though it looks "nice" pointwise. It can also be continuous even when it looks wild. This depends on checking the actual definition against the actual topologies in play. This article builds the formal definition. It proves the equivalence with the metric ε\varepsilon-δ\delta definition and with several other characterizations. It works through examples chosen to expose the places where the definition is subtle rather than routine. By the end you will have the preimage definition stated precisely. You will also have a full proof of its equivalence with limit-point, sequential (in metric spaces), and closed-set formulations. There are two worked examples with genuinely asymmetric data. A counterexample shows exactly what breaks if you swap preimages for images. This sets up Homeomorphisms, The Subspace Topology, and Connected Spaces. All of these lean on continuity as their load-bearing wall.

Key takeaways
  • Continuity is defined purely in terms of open sets: ff is continuous iff f−1(U)f^{-1}(U) is open for every open UU.
  • This definition needs no distance, no metric, no notion of "small" — only the topologies on domain and codomain.
  • It is equivalent to: preimages of closed sets are closed; and (checking on a basis) preimages of basic opens are open.
  • On metric spaces it reduces exactly to the classical ε\varepsilon-δ\delta definition, and to the sequential definition.
  • Composition of continuous maps is continuous, which is what makes continuity behave like a category's morphisms.
  • Key idea: continuity measures how well a map respects the open-set structure, not how it moves individual points.

Where this lives today

The preimage definition of continuity is the load-bearing joint of essentially all of modern geometry and analysis. In Homeomorphisms, two spaces are declared "the same" topologically precisely when a continuous bijection has a continuous inverse — continuity in both directions is the entire content of the definition. In The Subspace Topology, continuity of an inclusion map and of restrictions of continuous functions are handled by exactly the preimage machinery proved here. In Connected Spaces and compactness theory, the single fact that continuous images of connected (or compact) sets are connected (or compact) — itself proved via the preimage definition — underlies the Intermediate Value Theorem and the Extreme Value Theorem in full generality, not just on R\mathbb{R}. Beyond pure topology: in algebraic geometry, morphisms of varieties and schemes are required to be continuous with respect to the Zariski topology, and the preimage definition is the only version available since the Zariski topology is almost never metrizable. In functional analysis, continuity of linear operators between infinite-dimensional spaces (with weak, weak-*, or norm topologies) is checked via preimages of subbasic sets, since these topologies are frequently not first-countable and sequential characterizations can fail. In computer science and domain theory, continuous functions between partially ordered sets equipped with the Scott topology model computable processes, again via the preimage definition. In probability and statistics, measurable functions are defined by an entirely parallel preimage condition (preimages of measurable sets are measurable), a direct structural cousin of topological continuity, and continuous functions on probability spaces underlie weak convergence of measures. In physics, continuity of field configurations and of gauge transformations on manifolds is stated in the same preimage language whenever the underlying spaces are not naturally metric (e.g. moduli spaces of connections).

Ask the tutor: Can you show me why a continuous bijection need not have a continuous inverse, to motivate the extra work in defining homeomorphisms?

DefinitionContinuous map between topological spaces

Let (X,TX)(X,\mathcal{T}_X) and (Y,TY)(Y,\mathcal{T}_Y) be topological spaces, and let f:X→Yf : X \to Y be a function (not assumed injective or surjective). We say ff is continuous if for every open set U⊆YU \subseteq Y (i.e. U∈TYU \in \mathcal{T}_Y), the preimage

f−1(U)={ x∈X:f(x)∈U }f^{-1}(U) = \{\, x \in X : f(x) \in U \,\}

is open in XX (i.e. f−1(U)∈TXf^{-1}(U) \in \mathcal{T}_X). We say ff is continuous at a point x0∈Xx_0 \in X if for every open V⊆YV \subseteq Y containing f(x0)f(x_0), there exists an open U⊆XU \subseteq X containing x0x_0 such that f(U)⊆Vf(U) \subseteq V. (These two notions are related exactly as global and pointwise definitions should be: ff is continuous on XX if and only if it is continuous at every point of XX — this is proved below.)

Intuition

Think of the open sets of a topology as the "test regions" a space provides — the collection of sets that count as neighborhoods of their points. A map f:X→Yf: X \to Y is continuous when it never smuggles a discontinuity into XX that wasn't already visible in YY's open sets: whenever f(x)f(x) lands inside some open region VV of YY, the points of XX near xx must also land inside VV. The definition via preimages captures exactly this, but stated globally and all at once: f−1(U)f^{-1}(U) being open says that the set of points sent into UU is itself an "acceptable neighborhood-shaped" set. The classical ε\varepsilon-δ\delta picture is a special case where X,YX,Y are metric spaces and open sets are unions of open balls. Continuity at x0x_0 demands: for every ε\varepsilon-ball V=B(f(x0),ε)V = B(f(x_0),\varepsilon) around the image, there is a δ\delta-ball U=B(x0,δ)U = B(x_0,\delta) around x0x_0 that maps inside VV. That is precisely the pointwise definition above, specialized to balls. The topological definition simply asks that this control exists relative to every open set, not just balls, and packages it into a single global statement about preimages instead of a point-by-point quantifier chase. A useful mental picture: draw XX and YY side by side. An open set U⊂YU\subset Y is a "blob." Continuity says: whatever the shape of UU, when you pull the blob back through ff, the resulting region in XX has no sharp edges — it is open. If ff tears a continuum into disconnected pieces or collapses an open interval to a single point without care, this pullback openness typically fails.

Figure
Preimage picture: an open set V⊂YV\subset Y pulled back to an open set U⊂XU\subset X
X Y U = f⁻¹(V) V open in Y x₀ f(x₀) f

The central theorem

TheoremEquivalence of formulations of continuity

Let (X,TX)(X,\mathcal{T}_X), (Y,TY)(Y,\mathcal{T}_Y) be topological spaces and f:X→Yf: X \to Y a function. The following are equivalent. 1. (Preimage of opens) f−1(U)f^{-1}(U) is open in XX for every open U⊆YU \subseteq Y. 2. (Local continuity at every point) For every x0∈Xx_0 \in X and every open V⊆YV \subseteq Y with f(x0)∈Vf(x_0) \in V, there is an open U⊆XU \subseteq X with x0∈Ux_0 \in U and f(U)⊆Vf(U) \subseteq V. 3. (Preimage of closed sets) f−1(C)f^{-1}(C) is closed in XX for every closed C⊆YC \subseteq Y. 4. (Basis criterion) There is a basis B\mathcal{B} for TY\mathcal{T}_Y such that f−1(B)f^{-1}(B) is open in XX for every B∈BB \in \mathcal{B}. Moreover, if X,YX, Y are metric spaces with metrics dX,dYd_X, d_Y and the topologies TX,TY\mathcal{T}_X, \mathcal{T}_Y are the metric topologies, these are further equivalent to: 5. (ε\varepsilon–δ\delta) For every x0∈Xx_0 \in X and every ε>0\varepsilon > 0, there exists δ>0\delta > 0 such that dX(x,x0)<δ  ⟹  dY(f(x),f(x0))<εd_X(x,x_0) < \delta \implies d_Y(f(x),f(x_0)) < \varepsilon. 6. (Sequential) For every sequence (xn)(x_n) in XX with xn→x0x_n \to x_0, the sequence f(xn)→f(x0)f(x_n) \to f(x_0) in YY.

Proof

We prove (1)⇔(2)(1) \Leftrightarrow (2), then (1)⇔(3)(1) \Leftrightarrow (3), then (1)⇔(4)(1) \Leftrightarrow (4), and finally, in the metric setting, (1)⇔(5)⇔(6)(1) \Leftrightarrow (5) \Leftrightarrow (6). Each implication is a direct unwinding of definitions and quantifiers; the technique throughout is definition-chasing with correct quantifier order, which is exactly the point of this theorem.

(1)⇒(2)(1) \Rightarrow (2). Assume (1). Fix x0∈Xx_0 \in X and let V⊆YV \subseteq Y be open with f(x0)∈Vf(x_0) \in V. By (1), U:=f−1(V)U := f^{-1}(V) is open in XX. Since f(x0)∈Vf(x_0) \in V, we have x0∈Ux_0 \in U. Finally f(U)⊆Vf(U) \subseteq V because for any x∈U=f−1(V)x \in U = f^{-1}(V), by definition of preimage f(x)∈Vf(x) \in V. So UU is the required open neighborhood; this proves continuity at x0x_0. As x0x_0 was arbitrary, (2) holds.

(2)⇒(1)(2) \Rightarrow (1). Assume (2). Let V⊆YV \subseteq Y be open; we must show f−1(V)f^{-1}(V) is open in XX. Let x0∈f−1(V)x_0 \in f^{-1}(V) be arbitrary; then f(x0)∈Vf(x_0)\in V. By (2) (applied to this x0x_0 and this VV), there is an open Ux0⊆XU_{x_0} \subseteq X with x0∈Ux0x_0 \in U_{x_0} and f(Ux0)⊆Vf(U_{x_0}) \subseteq V. The inclusion f(Ux0)⊆Vf(U_{x_0})\subseteq V means Ux0⊆f−1(V)U_{x_0} \subseteq f^{-1}(V). Thus

f−1(V)=⋃x0∈f−1(V)Ux0,f^{-1}(V) = \bigcup_{x_0 \in f^{-1}(V)} U_{x_0},

since the right side is contained in f−1(V)f^{-1}(V) (each Ux0U_{x_0} is) and contains it (each x0∈f−1(V)x_0 \in f^{-1}(V) lies in its own Ux0U_{x_0}). A union of open sets is open (this is one of the topology axioms), so f−1(V)f^{-1}(V) is open. Since VV was an arbitrary open set, (1) holds.

(1)⇒(3)(1) \Rightarrow (3). Assume (1). Let C⊆YC \subseteq Y be closed, so Y∖CY \setminus C is open. The key algebraic fact about preimages, valid for any function ff and any subset S⊆YS \subseteq Y, is

f−1(Y∖S)=X∖f−1(S).f^{-1}(Y \setminus S) = X \setminus f^{-1}(S).

Indeed, x∈f−1(Y∖S)  ⟺  f(x)∈Y∖S  ⟺  f(x)∉S  ⟺  x∉f−1(S)  ⟺  x∈X∖f−1(S)x \in f^{-1}(Y\setminus S) \iff f(x) \in Y\setminus S \iff f(x)\notin S \iff x \notin f^{-1}(S) \iff x \in X\setminus f^{-1}(S). Applying this with S=CS = C: f−1(Y∖C)=X∖f−1(C)f^{-1}(Y\setminus C) = X \setminus f^{-1}(C). By (1), the left side is open (since Y∖CY\setminus C is open), so X∖f−1(C)X \setminus f^{-1}(C) is open, i.e. f−1(C)f^{-1}(C) is closed. This proves (3).

(3)⇒(1)(3) \Rightarrow (1). Symmetric: let U⊆YU \subseteq Y be open, so Y∖UY\setminus U is closed. By (3), f−1(Y∖U)=X∖f−1(U)f^{-1}(Y\setminus U) = X\setminus f^{-1}(U) is closed, hence f−1(U)f^{-1}(U) is open. This proves (1).

(1)⇒(4)(1) \Rightarrow (4). Immediate: take B=TY\mathcal{B} = \mathcal{T}_Y itself, which is trivially a basis for TY\mathcal{T}_Y (every open set is a union of open sets, itself). Then (1) says exactly that preimages of elements of this B\mathcal{B} are open.

(4)⇒(1)(4) \Rightarrow (1). Assume B\mathcal{B} is a basis for TY\mathcal{T}_Y with f−1(B)f^{-1}(B) open for every B∈BB \in \mathcal{B}. Let U⊆YU \subseteq Y be an arbitrary open set. By the defining property of a basis, there is a subfamily {Bi}i∈I⊆B\{B_i\}_{i \in I} \subseteq \mathcal{B} with

U=⋃i∈IBi.U = \bigcup_{i \in I} B_i.

Preimages distribute over unions for any function ff and any index family: f−1 ⁣(⋃iBi)=⋃if−1(Bi)f^{-1}\!\left(\bigcup_i B_i\right) = \bigcup_i f^{-1}(B_i). (Proof of this set identity: xx is in the left side iff f(x)∈⋃iBif(x) \in \bigcup_i B_i iff f(x)∈Bif(x) \in B_i for some ii iff x∈f−1(Bi)x \in f^{-1}(B_i) for some ii iff xx is in the right side.) Hence

f−1(U)=⋃i∈If−1(Bi).f^{-1}(U) = \bigcup_{i\in I} f^{-1}(B_i).

Each f−1(Bi)f^{-1}(B_i) is open by hypothesis, and a union of open sets is open. So f−1(U)f^{-1}(U) is open. As UU was an arbitrary open set, (1) holds. This completes the proof that (1), (2), (3), (4) are pairwise equivalent (having shown (1)⇔(2)(1)\Leftrightarrow(2), (1)⇔(3)(1)\Leftrightarrow(3), (1)⇔(4)(1)\Leftrightarrow(4), all four are equivalent to each other by transitivity through (1)).

Metric case: (2)⇒(5)(2) \Rightarrow (5). Assume X,YX,Y are metric spaces with the metric topologies and (2) holds; we verify (5) directly, since (5) is just (2) restricted to the basis of open balls, which is legitimate by the already-proven (1)⇔(4)(1)\Leftrightarrow(4) equivalence, but let us argue it explicitly for concreteness. Fix x0∈Xx_0 \in X and ε>0\varepsilon > 0. The ball V=BY(f(x0),ε)V = B_Y(f(x_0), \varepsilon) is open in YY (this is a standard fact about metric topologies: open balls are open sets) and contains f(x0)f(x_0). By (2), there is an open U⊆XU \subseteq X with x0∈Ux_0 \in U and f(U)⊆Vf(U) \subseteq V. Since UU is open in the metric topology and contains x0x_0, there is δ>0\delta>0 with BX(x0,δ)⊆UB_X(x_0,\delta) \subseteq U. Then for any xx with dX(x,x0)<δd_X(x,x_0)<\delta, we have x∈BX(x0,δ)⊆Ux \in B_X(x_0,\delta)\subseteq U, so f(x)∈f(U)⊆V=BY(f(x0),ε)f(x) \in f(U) \subseteq V = B_Y(f(x_0),\varepsilon), i.e. dY(f(x),f(x0))<εd_Y(f(x),f(x_0)) < \varepsilon. This is exactly (5).

(5)⇒(2)(5) \Rightarrow (2). Assume (5). Fix x0∈Xx_0 \in X and an open V⊆YV\subseteq Y with f(x0)∈Vf(x_0)\in V. By definition of the metric topology, there is ε>0\varepsilon>0 with BY(f(x0),ε)⊆VB_Y(f(x_0),\varepsilon) \subseteq V. By (5), there is δ>0\delta>0 such that dX(x,x0)<δ  ⟹  dY(f(x),f(x0))<εd_X(x,x_0)<\delta \implies d_Y(f(x),f(x_0))<\varepsilon; that is, f(BX(x0,δ))⊆BY(f(x0),ε)⊆Vf(B_X(x_0,\delta)) \subseteq B_Y(f(x_0),\varepsilon) \subseteq V. Set U=BX(x0,δ)U = B_X(x_0,\delta), which is open and contains x0x_0, and f(U)⊆Vf(U)\subseteq V. This is (2).

(5)⇒(6)(5) \Rightarrow (6). Assume (5). Let xn→x0x_n \to x_0 in XX, and let ε>0\varepsilon>0. By (5) there is δ>0\delta>0 with dX(x,x0)<δ  ⟹  dY(f(x),f(x0))<εd_X(x,x_0)<\delta \implies d_Y(f(x),f(x_0))<\varepsilon. Since xn→x0x_n \to x_0, there is NN such that n≥N  ⟹  dX(xn,x0)<δn \geq N \implies d_X(x_n,x_0)<\delta. Combining, n≥N  ⟹  dY(f(xn),f(x0))<εn\geq N \implies d_Y(f(x_n),f(x_0)) < \varepsilon. Since ε>0\varepsilon>0 was arbitrary, f(xn)→f(x0)f(x_n)\to f(x_0). This proves (6).

(6)⇒(5)(6) \Rightarrow (5). We argue by contrapositive. Suppose (5) fails at some x0x_0: there is ε0>0\varepsilon_0>0 such that for every δ>0\delta>0 there exists xx with dX(x,x0)<δd_X(x,x_0)<\delta but dY(f(x),f(x0))≥ε0d_Y(f(x),f(x_0)) \geq \varepsilon_0. Apply this with δ=1/n\delta = 1/n for each n∈Nn\in\mathbb{N} to obtain a point xnx_n with dX(xn,x0)<1/nd_X(x_n,x_0) < 1/n and dY(f(xn),f(x0))≥ε0d_Y(f(x_n),f(x_0)) \geq \varepsilon_0. Then xn→x0x_n \to x_0 (since dX(xn,x0)→0d_X(x_n,x_0)\to 0), but f(xn)↛f(x0)f(x_n) \not\to f(x_0) (the images never enter the ball BY(f(x0),ε0)B_Y(f(x_0),\varepsilon_0)). This is a sequence witnessing failure of (6). Contrapositive gives (6)⇒(5)(6)\Rightarrow(5). Having shown (1)⇔(2)(1)\Leftrightarrow(2) in general, and (2)⇔(5)⇔(6)(2)\Leftrightarrow(5)\Leftrightarrow(6) in the metric setting, all six statements are equivalent in the metric case. ■\blacksquare

∎
CorollaryComposition of continuous maps is continuous

If f:X→Yf: X \to Y and g:Y→Zg: Y \to Z are continuous (between topological spaces), then g∘f:X→Zg\circ f : X \to Z is continuous.

Proof

Let U⊆ZU \subseteq Z be open. Set-theoretically, (g∘f)−1(U)=f−1(g−1(U))(g\circ f)^{-1}(U) = f^{-1}(g^{-1}(U)) for any functions f,gf,g and any UU: indeed x∈(g∘f)−1(U)  ⟺  g(f(x))∈U  ⟺  f(x)∈g−1(U)  ⟺  x∈f−1(g−1(U))x \in (g\circ f)^{-1}(U) \iff g(f(x)) \in U \iff f(x) \in g^{-1}(U) \iff x \in f^{-1}(g^{-1}(U)). Since gg is continuous, g−1(U)g^{-1}(U) is open in YY. Since ff is continuous, f−1(g−1(U))f^{-1}(g^{-1}(U)) is open in XX. Hence (g∘f)−1(U)(g\circ f)^{-1}(U) is open in XX. As UU was arbitrary open in ZZ, Definition (1) of continuity applies to g∘fg\circ f, so g∘fg \circ f is continuous. ■\blacksquare

∎

Worked examples

Example 1: a piecewise map on R\mathbb{R} with the standard topology, checked directly by the preimage definition. Let X=Y=RX = Y = \mathbb{R} with the usual (metric/order) topology. Define

f(x)={x2x<13x−2x≥1.f(x) = \begin{cases} x^2 & x < 1 \\ 3x - 2 & x \geq 1. \end{cases}

Note the asymmetry: the two pieces are genuinely different functions (x2x^2 vs. the affine 3x−23x-2), glued at the single point x=1x=1. We check continuity two ways. First, continuity away from x=1x=1. On (−∞,1)(-\infty,1), ff agrees with the polynomial x2x^2, which is continuous everywhere on R\mathbb{R} by standard ε\varepsilon-δ\delta arguments (or: polynomials are continuous by algebra of continuous functions, itself provable from the basis criterion applied to sums/products). Restricting a continuous function to an open subspace keeps it continuous at points of that open set (this follows because for x0<1x_0<1 we can always shrink any neighborhood to lie inside (−∞,1)(-\infty,1), so local behavior only sees the x2x^2 branch). Similarly on (1,∞)(1,\infty), ff agrees with the continuous affine function 3x−23x-2. Second, continuity exactly at x0=1x_0 = 1, via criterion (5) directly. We have f(1)=3(1)−2=1f(1) = 3(1)-2 = 1. Let ε>0\varepsilon>0. We must find δ>0\delta>0 such that ∣x−1∣<δ  ⟹  ∣f(x)−1∣<ε|x-1|<\delta \implies |f(x)-1|<\varepsilon.

  • For x≥1x \geq 1: ∣f(x)−1∣=∣3x−2−1∣=3∣x−1∣|f(x)-1| = |3x-2-1| = 3|x-1|. This is <ε<\varepsilon whenever ∣x−1∣<ε/3|x-1| < \varepsilon/3.
  • For x<1x<1: ∣f(x)−1∣=∣x2−1∣=∣x−1∣ ∣x+1∣|f(x)-1| = |x^2-1| = |x-1|\,|x+1|. Restrict attention to ∣x−1∣<1|x-1|<1 (so 0<x<20<x<2, hence ∣x+1∣<3|x+1|<3); then ∣f(x)−1∣<3∣x−1∣|f(x)-1| < 3|x-1|, which is <ε<\varepsilon whenever ∣x−1∣<ε/3|x-1|<\varepsilon/3.

Taking δ=min⁡(1,ε/3)\delta = \min(1, \varepsilon/3) handles both cases simultaneously: if ∣x−1∣<δ|x-1|<\delta then ∣f(x)−1∣<ε|f(x)-1|<\varepsilon regardless of which branch xx falls in. So ff is continuous at 11, and combined with continuity elsewhere, ff is continuous on all of R\mathbb{R}. The key point the mismatched pieces expose: continuity at a gluing point is not automatic from continuity of each piece separately — it required checking that the two branches agree in value at x=1x=1 (12=1=3(1)−21^2 = 1 = 3(1)-2, a numerical coincidence we should double check: 12=11^2=1 and 3⋅1−2=13\cdot1-2=1, yes they match) and that both one-sided limits equal that common value. Had the affine piece instead been 3x−13x - 1 (giving f(1)=2≠1=lim⁡x→1−x2f(1)=2 \ne 1 = \lim_{x\to 1^-} x^2), the function would have a jump discontinuity at x=1x=1, and f−1((1.5,2.5))f^{-1}\big((1.5,2.5)\big) would fail to be open (it would contain 11 but no interval around 11 from the left, since points just left of 11 map near 11, outside (1.5,2.5)(1.5,2.5)).

Example 2: checking continuity via preimages of a subbasis, on a map between non-metric spaces — the Zariski-flavored finite-complement topology. Let X=RX = \mathbb{R} with the topology TX\mathcal{T}_X where nonempty open sets are exactly the sets whose complement is finite (the cofinite topology), together with ∅\varnothing. Let Y=RY=\mathbb{R} with the standard topology TY\mathcal{T}_Y. This example is deliberately asymmetric: domain and codomain carry different topologies, so no metric ε\varepsilon-δ\delta shortcut applies on the domain side. Consider f:X→Yf: X \to Y, f(x)=x3−3xf(x) = x^3 - 3x (chosen non-monotonic and non-injective, e.g. f(−2)=−8+6=−2f(-2) = -8+6=-2 and f(1)=1−3=−2f(1) = 1-3=-2 also — check: 13−3(1)=1−3=−21^3 - 3(1) = 1-3=-2; indeed f(−2)=f(1)=−2f(-2)=f(1)=-2, a genuine non-injectivity to keep the example honest). Claim: ff is continuous X→YX\to Y. Since TY\mathcal{T}_Y is the standard topology on R\mathbb{R}, generated by the basis of open intervals (a,b)(a,b), by the basis criterion (statement (4) in the theorem) it suffices to show f−1((a,b))f^{-1}((a,b)) is open in TX\mathcal{T}_X for every interval (a,b)(a,b), i.e. that X∖f−1((a,b))X \setminus f^{-1}((a,b)) is finite (or all of XX, or f−1((a,b))=∅f^{-1}((a,b))=\varnothing). Compute X∖f−1((a,b))=f−1(R∖(a,b))=f−1((−∞,a]∪[b,∞))={x:f(x)≤a}∪{x:f(x)≥b}X\setminus f^{-1}((a,b)) = f^{-1}(\mathbb{R}\setminus (a,b)) = f^{-1}\big((-\infty,a] \cup [b,\infty)\big) = \{x : f(x) \leq a\} \cup \{x: f(x)\geq b\}. Since f(x)=x3−3xf(x) = x^3-3x is a nonconstant cubic polynomial, for any real number cc the equation f(x)=cf(x)=c has at most 33 real solutions (a nonzero polynomial of degree 33 has at most 33 roots — a standard algebraic fact). Moreover ff is a continuous real function tending to −∞-\infty as x→−∞x\to-\infty and +∞+\infty as x→+∞x\to+\infty (odd-degree leading behavior), so by the Intermediate Value Theorem applied to f(x)−af(x) - a and f(x)−bf(x)-b, the sets {f(x)≤a}\{f(x) \le a\} and {f(x)≥b}\{f(x)\ge b\} are each unions of finitely many closed rays and intervals determined by the (at most 3) roots of f(x)=af(x)=a and f(x)=bf(x)=b respectively — in particular each such set, when it is not all of R\mathbb{R}, is a finite union of intervals bounded by finitely many points, but this alone doesn't immediately give finiteness. We need a sharper argument, since {f(x)≤a}\{f(x)\le a\} is typically an infinite set (a ray), not a finite one. So instead we verify directly that X∖f−1((a,b))X \setminus f^{-1}((a,b)) is finite by checking it can only fail to be finite if (a,b)(a,b) misses the entire bounded "middle range" of ff improperly — let us redo this correctly. Correct approach: We must show f−1((a,b))f^{-1}((a,b)) is open in the cofinite topology, i.e. either empty or cofinite (complement finite). Equivalently, its complement {x:f(x)∉(a,b)}\{x : f(x) \notin (a,b)\} must be finite whenever f−1((a,b))f^{-1}((a,b)) is nonempty — but this is false for generic (a,b)(a,b): e.g. take (a,b)=(−100,100)(a,b) = (-100, 100); then f−1((−100,100))f^{-1}((-100,100)) is a large but bounded interval-ish set (since f→±∞f\to\pm\infty), and its complement {∣f(x)∣≥100}\{|f(x)|\ge 100\} is two unbounded rays — infinite, not finite, and not cofinite either (it's not all of XX since f−1((−100,100))f^{-1}((-100,100)) is nonempty). This shows ff as defined is not continuous from the cofinite topology to the standard topology — a valuable correction that itself illustrates the theorem's power: the basis criterion gives a quick, honest test, and here the test fails cleanly. Let us instead verify the theorem's mechanism on the map that does work in this pairing, confirming the general principle. Correct positive example: let g:X→Yg: X\to Y (cofinite domain, standard codomain) be any non-constant polynomial map is not continuous by the computation above (the preimage of a bounded interval containing enough of the range is never cofinite). The map that is continuous from (R,cofinite)(\mathbb{R},\text{cofinite}) to (R,standard)(\mathbb{R}, \text{standard}) is exactly a constant map h(x)≡ch(x) \equiv c: for any open V⊆YV\subseteq Y, h−1(V)h^{-1}(V) is either ∅\varnothing (if c∉Vc\notin V) or all of XX (if c∈Vc \in V), and both ∅\varnothing and XX are open in any topology on XX. So hh is continuous, while non-constant continuous real polynomials fail to be continuous when the domain is given the coarser cofinite topology. This corrected example teaches the real lesson: continuity depends on both topologies simultaneously, and a formula that looks "smooth" under the standard topology can fail to be continuous the instant the domain's topology is changed to something coarser like the cofinite topology — because the basis criterion must be checked against the actual open sets of XX, not against intervals that happen to look natural.

Why the hypothesis on preimages (not images) is essential

CounterexampleImages of open sets need not be open — continuity cannot be defined via images

The preimage definition is not an arbitrary convention; using images instead genuinely breaks the theory. Consider f:R→Rf: \mathbb{R} \to \mathbb{R}, both with the standard topology, given by the constant function f(x)=5f(x) = 5. This ff is continuous: for any open U⊆RU\subseteq\mathbb{R}, f−1(U)f^{-1}(U) is either ∅\varnothing (if 5∉U5\notin U) or all of R\mathbb{R} (if 5∈U5\in U), and both are open — matching Example 2's observation about constant maps. But now look at images of open sets instead. Take the open set U=(0,1)⊆RU = (0,1) \subseteq \mathbb{R} (domain). Its image is

f(U)={5},f(U) = \{5\},

a single point, which is not open in R\mathbb{R} with the standard topology (every open set containing 55 must contain an interval around 55, but {5}\{5\} contains no interval). So even for this manifestly continuous map, "image of open is open" fails badly. Had we tried to define continuity by requiring images of open sets to be open, we would have declared every constant map discontinuous — absurd, since constant maps are the simplest continuous maps there are, matching every reasonable intuition (a constant function has no "jumps" whatsoever). The deeper reason preimages work and images don't: preimages respect unions and intersections perfectly for all functions (f−1(⋃Ui)=⋃f−1(Ui)f^{-1}(\bigcup U_i) = \bigcup f^{-1}(U_i) and f−1(⋂Ui)=⋂f−1(Ui)f^{-1}(\bigcap U_i) = \bigcap f^{-1}(U_i), both provable by the same element-chasing used in the theorem's proof), while images only respect unions (f(⋃Ui)=⋃f(Ui)f(\bigcup U_i) = \bigcup f(U_i)) and can shrink under intersections (f(U∩V)f(U\cap V) can be strictly smaller than f(U)∩f(V)f(U)\cap f(V), or images can collapse dimension entirely, as the constant map shows). The topology axioms require closure under arbitrary unions and finite intersections, and only preimages are guaranteed to cooperate with both simultaneously for every function. (The dual notion — maps sending open sets to open sets — exists and is useful; it is called an open map, a genuinely different and strictly weaker-in-general property than continuity, not equivalent to it and not implied by it.)

Scope, edge cases & common traps

SituationWhat to checkCommon error
Domain/codomain topology unspecifiedContinuity is meaningless without both topologies fixedAssuming "the" topology is the Euclidean one by default
Checking on a basis or subbasisBasis criterion (statement 4) suffices, subbasis version also holds (via intersections)Forgetting the basis must generate the codomain's topology, not the domain's
Piecewise-defined functionsCheck agreement of one-sided limits/values at gluing pointsAssuming continuity of each piece implies continuity of the glued function
Composing with change of domain/codomain topologyContinuity is not topology-independent; changing either topology can break or create itReusing "ff is continuous" across different topological pairings without rechecking
Confusing continuity with "sends open to open"That property is called open map, logically independent of continuityBelieving image-openness is equivalent to or required for continuity
Sequential characterizationValid in metric spaces (and more generally first-countable spaces)Assuming sequences alone characterize continuity in arbitrary topological spaces (false without countability restrictions)

The mathematician behind it

Origins · 1 minFelix Hausdorff and how this was discovered
FH
Felix Hausdorff
1868–1942 · Founder of point-set topology, Bonn and Greifswald

Hausdorff, working at the turn of the twentieth century, was the figure most responsible for extracting continuity from its metric origins and re-expressing it purely in terms of neighborhoods and open sets, in his 1914 treatise Grundzüge der Mengenlehre. He built on the neighborhood-based framework that had been sketched by earlier analysts, but it was Hausdorff who systematized the open-set axioms into the modern definition of a topological space and showed that continuity, convergence, and closure could all be recovered from that single structure. His separation axiom (the "Hausdorff condition," T2T_2) remains one of the standard hypotheses layered on top of bare topological spaces precisely because continuity theory, while working in full generality, becomes far more powerful once limits are forced to be unique.

History
- 1817 — Bernard Bolzano gives an early rigorous formulation of continuity for real functions, prefiguring ε\varepsilon-δ\delta reasoning.
- 1821 — Augustin-Louis Cauchy states a continuity definition in Cours d'Analyse, still tied to infinitesimals rather than strict inequalities.
- 1861 — Karl Weierstrass lectures using the fully rigorous ε\varepsilon-δ\delta formulation that becomes the analytic standard.
- 1906 — Maurice Fréchet introduces metric spaces, generalizing continuity beyond the real line while keeping a distance function.
- 1914 — Felix Hausdorff's Grundzüge der Mengenlehre axiomatizes topological spaces via open sets, yielding the preimage definition of continuity in full generality.
Why does the topological definition use preimages instead of images?

Because preimages interact correctly with the topology axioms while images do not. For any function ff, preimages satisfy f−1(⋃iUi)=⋃if−1(Ui)f^{-1}(\bigcup_i U_i) = \bigcup_i f^{-1}(U_i) and f−1(⋂iUi)=⋂if−1(Ui)f^{-1}(\bigcap_i U_i) = \bigcap_i f^{-1}(U_i), matching exactly the closure properties (arbitrary unions, finite intersections) that define a topology. Images only satisfy the union version in general, and can badly fail to preserve openness — a constant map sends an open interval to a single point, which is not open, yet constant maps are intuitively as continuous as possible. Preimages give a definition that is both mathematically well-behaved and matches intuition; images do not.

Is continuity a property of a function alone, or of the function plus the topologies?

It is a property of the triple (f,TX,TY)(f, \mathcal{T}_X, \mathcal{T}_Y), never of ff in isolation. The same formula, such as f(x)=x3−3xf(x)=x^3-3x, can be continuous with respect to one pairing of topologies on domain and codomain and discontinuous with respect to another, as shown when the domain is given the cofinite topology instead of the standard one. Whenever someone says "ff is continuous" without specifying topologies, they are implicitly relying on a default (usually the standard/Euclidean topology), and that default should always be stated explicitly in careful work.

Does the ε\varepsilon-δ\delta definition disagree with the topological one anywhere?

No — on metric spaces they are fully equivalent, as proved in the central theorem via the chain (2)⇔\Leftrightarrow(5). The ε\varepsilon-δ\delta definition is simply the topological definition specialized to the basis of open balls, using the basis criterion (statement 4). Every ε\varepsilon-δ\delta proof is secretly a preimage argument restricted to balls; the topological definition is strictly more general because it applies to spaces with no metric at all, such as the Zariski topology or the cofinite topology used in the worked examples.

If ff is continuous at every point individually, is it automatically continuous on all of XX?

Yes, and this equivalence — statement (1) versus statement (2) in the theorem — is proved rigorously above using nothing beyond the union axiom for open sets. The forward direction restricts a global preimage to a local neighborhood; the reverse direction reassembles f−1(V)f^{-1}(V) as a union, over each of its points, of small open neighborhoods guaranteed by local continuity, and a union of open sets is open by the topology axioms. So "continuous everywhere" and "continuous at every point" are the same statement viewed two ways, not two different strengths of continuity.

What is an open map, and how does it differ from a continuous map?

An open map sends open sets of XX to open sets of YY — literally the reverse direction of the continuity condition. The two properties are logically independent: a map can be continuous but not open (any nonconstant real polynomial mapping onto a proper subinterval of its range near a local extremum, e.g. f(x)=x2f(x)=x^2 sends the open interval (−1,1)(-1,1) to the non-open set [0,1)[0,1)), and a map can be open but not continuous (constructible with wilder topologies). Continuity is about preimages; openness is about images. Only for special classes of maps, such as Homeomorphisms, are both properties guaranteed simultaneously in both directions.

How does this definition connect to homeomorphisms and connectedness?

A homeomorphism is precisely a bijection f:X→Yf:X\to Y such that both ff and f−1f^{-1} are continuous in the preimage sense proved here; this double continuity is what makes homeomorphic spaces topologically indistinguishable. Continuity is also the mechanism behind the preservation theorems for Connected Spaces: if f:X→Yf:X\to Y is continuous and XX is connected, then f(X)f(X) is connected, because a separation of f(X)f(X) into disjoint nonempty relatively open sets would pull back, via the preimage definition, to a separation of XX itself, contradicting connectedness. The same preimage mechanism drives the analogous compactness-preservation theorem.

Why is the composition of continuous functions continuous, and why does that matter structurally?

It matters because it makes topological spaces and continuous maps into a category: objects are spaces, morphisms are continuous maps, and composition of morphisms must again be a morphism for the structure to be coherent. The proof is a one-line preimage computation: (g∘f)−1(U)=f−1(g−1(U))(g\circ f)^{-1}(U) = f^{-1}(g^{-1}(U)) for any sets, so if g−1(U)g^{-1}(U) is open (by gg's continuity) and ff pulls opens back to opens (by ff's continuity), the composite preimage is open too. This closure property is exactly what lets basis and subbasis techniques and homeomorphism arguments chain together reliably across many maps at once.

Before this

Where this leads