Continuity via preimages
Statement
Let \(X\) and \(Y\) be topological spaces with topologies \(\tau_X\) and \(\tau_Y\), and let \(f:X\to Y\) be a function. Then \(f\) is continuous (in the topological sense: for every \(x\in X\) and every open \(V\) containing \(f(x)\), there is an open \(U\) containing \(x\) with \(f(U)\subseteq V\)) if and only if for every open set \(V\subseteq Y\) (i.e. \(V\in\tau_Y\)) the preimage \(f^{-1}(V)=\{x\in X : f(x)\in V\}\) is open in \(X\) (i.e. \(f^{-1}(V)\in\tau_X\)). No further hypotheses on \(X\), \(Y\), or \(f\) are required: neither space need be metric, Hausdorff, or even \(T_1\); \(f\) need not be injective, surjective, or continuous a priori.
Why it matters
This theorem is the hinge on which point-set topology turns from a theory of "nearby points" into a theory of "open sets". The \(\varepsilon\)–\(\delta\) definition of continuity only makes sense where distances exist; the preimage characterisation makes sense in any topological space whatsoever, and agrees with the metric definition exactly when a metric is present (Theorem T-078, cross-referenced below). It converts continuity, a statement quantified over every point of the domain, into a statement quantified over every open set of the codomain — a global, coordinate-free condition that composes effortlessly and is often far easier to check.
Structurally it is also the reason continuity is the "correct" notion of morphism between topological spaces: it is precisely the condition making \(f\) a morphism in the category of topological spaces, and it is what makes composites of continuous maps continuous with a one-line proof (see Corollaries).
Hypotheses
Proof
Result
Reading. A map between topological spaces is continuous exactly when it "pulls open sets back to open sets". You never need to mention points, distances, or neighbourhoods once you adopt this as the working definition — and where a metric is present, this condition is provably equivalent to the familiar \(\varepsilon\)–\(\delta\) statement (Theorem T-078).
Scope. Holds for arbitrary topological spaces \(X,Y\) and arbitrary functions \(f:X\to Y\); no separation axioms, metrisability, or compactness assumptions are used anywhere in the proof. It is the definition of continuity used throughout general topology, and specialises correctly to metric spaces, to the discrete/indiscrete extremes, and to subspace, product, and quotient topologies via their defining universal properties.
Corollaries & converses
- Composition is continuous. If \(f:X\to Y\) and \(g:Y\to Z\) are continuous then \(g\circ f:X\to Z\) is continuous: for \(W\in\tau_Z\), \((g\circ f)^{-1}(W)=f^{-1}(g^{-1}(W))\), and \(g^{-1}(W)\in\tau_Y\) by continuity of \(g\), so \(f^{-1}(g^{-1}(W))\in\tau_X\) by continuity of \(f\). This one-line proof is the theorem's main structural payoff.
- Equivalent closed-set form. \(f\) is continuous iff \(f^{-1}(C)\) is closed in \(X\) for every closed \(C\subseteq Y\) — immediate by taking complements, since \(f^{-1}(Y\setminus C)=X\setminus f^{-1}(C)\).
- Suffices to check on a subbasis. If \(\mathcal{S}\) is a subbasis for \(\tau_Y\), then \(f\) is continuous iff \(f^{-1}(S)\) is open for every \(S\in\mathcal{S}\); one need not check every open set, only generators, because preimage commutes with unions and finite intersections.
- Converse direction is already built in — the statement is a genuine "iff", not merely a necessary condition; there is no separate converse to worry about, unlike many theorems that only give one implication for free.
- Does not extend to preimages of arbitrary (non-open) sets characterising anything special: preimages of closed sets are closed (a corollary above), but preimages of, say, dense sets need not be dense, and preimages of compact sets need not be compact — this theorem is specifically about the open-set correspondence.
Fails without
- Without a topology on the codomain \(Y\) matching the one used to test openness: take \(Y=\mathbb{R}\) with the standard topology \(\tau_Y\) but test preimages against a coarser topology \(\tau_Y'=\{\emptyset,\mathbb{R}\}\) instead. Every function \(f:X\to Y\) trivially satisfies "\(f^{-1}(V)\) open for all \(V\in\tau_Y'\)" (only two sets to check), yet \(f\) may not be continuous with respect to \(\tau_Y\) at all — e.g. \(f:\mathbb{R}\to\mathbb{R}\), \(f=\mathbb{1}_{\mathbb{Q}}\) (indicator of the rationals), which is discontinuous everywhere in the standard sense. The theorem's equivalence is stated relative to one fixed pair \((\tau_X,\tau_Y)\); silently swapping the topology being tested breaks it.
- Without testing ALL open sets (only some): checking that preimages of a few open sets happen to be open does not certify continuity unless those sets form a basis or subbasis. Let \(X=Y=\mathbb{R}\) (standard topology) and \(f(x)=\lfloor x\rfloor\) (floor function). Then \(f^{-1}((-\infty,\infty))=\mathbb{R}\) is open and \(f^{-1}(\emptyset)=\emptyset\) is open, yet \(f\) is not continuous: \(f^{-1}\big((0.5,1.5)\big)=[1,2)\), which is not open in \(\mathbb{R}\). Checking only the two trivial open sets gives no information.
- Without the "for every point" quantifier in the pointwise definition (using only single-point continuity): as in the Hypotheses section, a function continuous at one point need not have any open preimages be open; the forward implication of this theorem genuinely needs continuity at every point of the relevant preimage, not just somewhere.
Common errors
- Writing \(f^{-1}(V)\) and assuming it presupposes \(f\) is bijective or that \(f^{-1}\) is a genuine inverse function; it is only ever set-theoretic preimage here.
- Trying to prove continuity by choosing one open set \(V\), showing \(f^{-1}(V)\) is open, and concluding "hence continuous" — the theorem requires the condition for every open \(V\in\tau_Y\), not a witness.
- Confusing "preimages of open sets are open" with "images of open sets are open" (the latter is the definition of an open map, a different and independent property; continuous maps need not be open, and open maps need not be continuous).
- Forgetting the Corollary that only a basis/subbasis needs checking, and instead attempting (or believing one must attempt) to verify openness of preimages for literally every open set by brute force in examples where a basis check is far shorter.
- Misapplying the closed-set form by checking closedness of images instead of preimages of closed sets.
- Assuming the theorem requires \(X\) or \(Y\) to be metric or Hausdorff, and being unable to apply it to non-metrisable examples (e.g. the cofinite or Zariski topologies) where it is equally valid and often the only workable definition of continuity available.
Discussion
Historically, the shift the theorem records is the one from Weierstrass's arithmetised \(\varepsilon\)–\(\delta\) continuity (1870s), which needs a metric to state, to Hausdorff's 1914 axiomatic notion of a topological space defined purely by a system of open sets. Hausdorff and later Kuratowski took the preimage condition (or an equivalent neighbourhood formulation) essentially as the definition of continuity, rather than as a theorem to be proved from something more primitive — in a course built that way, this result is a "definition-to-definition" translation lemma rather than a deep theorem. In a course (like this one) that starts from the pointwise neighbourhood definition of continuity, it is a genuine theorem establishing that the two possible starting points coincide.
The deeper significance is categorical: once "open set" is the primitive notion, continuous maps are exactly the structure-preserving maps (morphisms) of topological spaces, and this theorem is what makes that identification work smoothly, because it shows the morphism condition can be checked entirely in terms of the structure (open sets) being preserved under pullback, with no reference to points at all. This is what allows continuity to be generalised painlessly to settings with no points in the usual sense, such as pointless topology / locale theory, where "open set" is retained as primitive and "point" is discarded.
Pedagogically the theorem also explains why so many topology proofs proceed by "let \(V\) be open in \(Y\); show \(f^{-1}(V)\) is open" — this is not a trick but simply unwinding the working definition. Once internalised, results such as "the composite of continuous maps is continuous" (Corollaries) become one-line preimage-algebra computations rather than \(\varepsilon\)–\(\delta\) juggling with two nested quantifier chains.
A common misconception is that the preimage condition is somehow stronger or weaker than pointwise continuity, or that it only applies "globally" while the \(\varepsilon\)–\(\delta\)/neighbourhood definition is "local". They are exactly equivalent by this theorem, and in fact the theorem is proved by exhibiting, for each open \(V\), a witnessing local neighbourhood \(U_x\) at each point (step 4) and then taking their union (step 6) — so the "global" preimage statement is nothing more than a repackaging of infinitely many local statements, glued together using the arbitrary-union axiom of a topology. It is this axiom, not any new idea about continuity, that lets the local-to-global passage happen for free.
Worked examples
Reading. Checking only the generating intervals (via the subbasis corollary) confirms \(x\mapsto x^2\) is continuous on all of \(\mathbb{R}\), with no limit computations needed.
Reading. By the theorem, \(f\) is continuous, even though \(X,Y\) are finite sets with no metric structure at all — illustrating that continuity is a purely topological notion, checkable by finite inspection here.
Problems
- Let \(X\) have the discrete topology (every subset open). Show that every function \(f:X\to Y\) is continuous, for any topological space \(Y\), directly from this theorem.
Solution
For any \(V\in\tau_Y\), \(f^{-1}(V)\) is some subset of \(X\). Since \(X\) is discrete, every subset of \(X\) is open, so \(f^{-1}(V)\in\tau_X\) regardless of what \(f^{-1}(V)\) actually is. This holds for every \(V\in\tau_Y\), so by the theorem \(f\) is continuous. (Contrast: if instead \(Y\) is discrete and \(X\) is not, continuity of \(f\) is a real constraint, since \(f^{-1}(\{y\})\) must be open in \(X\) for every \(y\in Y\).) - Let \(Y\) have the indiscrete topology \(\tau_Y=\{\emptyset,Y\}\). Show every function \(f:X\to Y\) is continuous, for any \(X\).
Solution
The only open sets of \(Y\) are \(\emptyset\) and \(Y\) itself. \(f^{-1}(\emptyset)=\emptyset\) and \(f^{-1}(Y)=X\), both of which are open in \(X\) by the topology axioms (the empty set and whole space are always open). So the condition "\(f^{-1}(V)\) open for all \(V\in\tau_Y\)" is satisfied vacuously/trivially, and by the theorem \(f\) is continuous. - Let \(X=Y=\mathbb{R}\) with the standard topology, and let \(f(x)=1\) if \(x\in\mathbb{Q}\), \(f(x)=0\) otherwise. Using the preimage characterisation, show \(f\) is not continuous.
Solution
Take \(V=(0.5,1.5)\), which is open in \(\mathbb{R}\). Then \(f^{-1}(V)=\{x: f(x)\in(0.5,1.5)\}=\{x:f(x)=1\}=\mathbb{Q}\). But \(\mathbb{Q}\) is not open in \(\mathbb{R}\) (every nonempty open interval contains irrationals, so no open set is contained in \(\mathbb{Q}\) except \(\emptyset\)). Since we exhibited one open \(V\) whose preimage is not open, the "for all \(V\)" condition fails, so by the theorem \(f\) is not continuous. - Let \(f:X\to Y\) and \(g:Y\to Z\) be continuous. Using only the preimage characterisation (not \(\varepsilon\)–\(\delta\)), prove \(g\circ f:X\to Z\) is continuous, and identify exactly which theorem-instances are invoked.
Solution
Let \(W\in\tau_Z\) be open. Since \(g\) is continuous, the theorem (forward-to-hypothesis direction, applied to \(g\)) gives \(g^{-1}(W)\in\tau_Y\). Since \(f\) is continuous, the theorem applied to \(f\) with the open set \(g^{-1}(W)\) gives \(f^{-1}(g^{-1}(W))\in\tau_X\). By the general preimage identity \((g\circ f)^{-1}(W)=f^{-1}(g^{-1}(W))\) (composition of preimages), we get \((g\circ f)^{-1}(W)\in\tau_X\). Since \(W\) was an arbitrary open set of \(Z\), the theorem (this time in the "preimages open \(\Rightarrow\) continuous" direction, applied to \(g\circ f\)) yields that \(g\circ f\) is continuous. Two applications of the theorem to \(f\) and \(g\) individually, plus one application concluding continuity of the composite, are used. - Let \(X\) be given the cofinite topology (open sets are \(\emptyset\) and all complements of finite subsets) and let \(Y=\mathbb{R}\) with the standard topology. Show that a non-constant polynomial function \(f:X=\mathbb{R}\to Y=\mathbb{R}\) (domain given the cofinite topology, codomain standard) fails to be continuous by finding one open set of \(Y\) whose preimage is not open in the cofinite topology on \(X\), then explain why constant functions remain continuous in this setting.
Solution
Let \(f(x)=x\) with domain \(\mathbb{R}\) equipped with the cofinite topology and codomain \(\mathbb{R}\) with the standard topology. Take \(V=(0,1)\), open in the standard topology. Then \(f^{-1}(V)=(0,1)\). In the cofinite topology, the only open sets are \(\emptyset\) and cofinite sets (complements of finite sets); \((0,1)\) is infinite and its complement \(\mathbb{R}\setminus(0,1)\) is also infinite, so \((0,1)\) is neither \(\emptyset\) nor cofinite, hence not open in \((X,\tau_{\text{cofinite}})\). By the theorem, since we found one open \(V\) with non-open preimage, \(f\) is not continuous. For a constant function \(f\equiv c\): for any open \(V\subseteq Y\), \(f^{-1}(V)\) is either \(X\) (if \(c\in V\)) or \(\emptyset\) (if \(c\notin V\)), both of which are open in any topology on \(X\) whatsoever (topology axioms), so by the theorem every constant function is continuous regardless of the topologies chosen on \(X\) and \(Y\).