maths2u
Tier
⌕ Search ⌘K
Theorem

Continuity via preimages

T-079Home MU-301Threads space
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
\(X\) and \(Y\) are topological spaces (with specified topologies \(\tau_X,\tau_Y\)). Continuity via preimages presupposes a notion of "open set" on both sides. Drop the topology on \(Y\) — e.g. only give a partial collection of subsets that isn't closed under arbitrary unions — and "for every open \(V\), \(f^{-1}(V)\) is open" stops pinning down a stable class of maps: composing two such "continuous" maps can fail to satisfy the same condition, because the union/intersection axioms that make the proof of the composition corollary work are simply unavailable.
The pointwise definition of continuity quantifies over ALL points \(x\in X\) and all open neighbourhoods \(V\) of \(f(x)\). If continuity were only demanded at one point \(x_0\) (local continuity), the equivalence would fail: a function can be continuous at a single point without every preimage of an open set being open. E.g. \(f:\mathbb{R}\to\mathbb{R}\), \(f(x)=x\) for \(x\in\mathbb{Q}\), \(f(x)=-x\) for \(x\notin\mathbb{Q}\), is continuous only at \(x=0\); \(f^{-1}((-1,1))\) is neither open nor closed in \(\mathbb{R}\).
\(f\) is a genuine function \(X\to Y\), i.e. defined and single-valued on the whole of \(X\), and the preimage \(f^{-1}(V)\) is computed as a set-theoretic preimage (not requiring \(f\) to be invertible). Students sometimes read \(f^{-1}\) as "the inverse function" and worry the theorem needs \(f\) to be a bijection. It does not: \(f^{-1}(V)\) is shorthand for \(\{x\in X: f(x)\in V\}\), which exists for any function regardless of injectivity or surjectivity. If one mistakenly required \(f\) to be invertible, one would exclude constant maps, projections, and quotient maps — all of which are continuous and central examples — from the scope of the theorem, which is a genuine loss of generality, not a correction.
Proof
1
\text{Fix notation: } f:X\to Y,\ (X,\tau_X),\ (Y,\tau_Y). \text{ We prove both directions.}
Set-up only; both implications will be argued separately since this is an "iff". A
2
(\Rightarrow)\ \text{Assume } f \text{ is continuous at every point of } X \text{ (pointwise definition). Fix } V\in\tau_Y.
We must show \(f^{-1}(V)\in\tau_X\); by the definition of the subspace/ambient topology, a set is open iff it is a neighbourhood of each of its points, so it suffices to find, for each \(x\in f^{-1}(V)\), an open \(U_x\ni x\) with \(U_x\subseteq f^{-1}(V)\). A
3
\text{Let } x\in f^{-1}(V). \text{ Then } f(x)\in V, \text{ and } V \text{ is an open neighbourhood of } f(x).
Immediate from the definition of preimage: \(x\in f^{-1}(V) \iff f(x)\in V\). A
4
\text{By continuity of } f \text{ at } x, \ \exists\, U_x\in\tau_X \text{ with } x\in U_x \text{ and } f(U_x)\subseteq V.
This is exactly the pointwise definition of continuity at \(x\), applied to the open neighbourhood \(V\) of \(f(x)\). B
5
f(U_x)\subseteq V \iff U_x\subseteq f^{-1}(V).
Basic preimage algebra: \(f(A)\subseteq B \iff A\subseteq f^{-1}(B)\) for any function \(f\) and sets \(A\subseteq X,\ B\subseteq Y\) (adjunction between image and preimage). So \(U_x\subseteq f^{-1}(V)\) with \(U_x\) open and \(x\in U_x\). A
6
f^{-1}(V)=\bigcup_{x\in f^{-1}(V)} U_x.
Each \(x\in f^{-1}(V)\) lies in its own \(U_x\subseteq f^{-1}(V)\), giving \(\subseteq\) and \(\supseteq\) simultaneously: every point of \(f^{-1}(V)\) is covered by the union, and every \(U_x\) sits inside \(f^{-1}(V)\). B
7
\text{Hence } f^{-1}(V) \text{ is a union of open sets, so } f^{-1}(V)\in\tau_X.
Topology axiom: arbitrary unions of open sets are open. This closes the forward direction. A
8
(\Leftarrow)\ \text{Assume } f^{-1}(V)\in\tau_X \text{ for every } V\in\tau_Y. \text{ Fix } x\in X \text{ and an open } V\ni f(x).
We must exhibit an open \(U\ni x\) with \(f(U)\subseteq V\), to verify the pointwise definition of continuity at the arbitrary point \(x\). A
9
\text{Set } U:=f^{-1}(V).
By hypothesis (applied to this particular \(V\)), \(U=f^{-1}(V)\in\tau_X\), i.e. \(U\) is open. B
10
x\in U, \quad\text{since } f(x)\in V \iff x\in f^{-1}(V)=U.
Definition of preimage again, using that \(f(x)\in V\) was given. A
11
f(U)=f(f^{-1}(V))\subseteq V.
General fact for any function: \(f(f^{-1}(B))\subseteq B\) for any \(B\subseteq Y\) (equality can fail when \(f\) is not surjective, but the inclusion always holds, which is all that is needed here). B
12
\text{So } U \text{ is an open neighbourhood of } x \text{ with } f(U)\subseteq V. \text{ Since } x \text{ and } V \text{ were arbitrary, } f \text{ is continuous.}
This is precisely the pointwise definition of continuity, verified at every point; both implications are established, so the equivalence holds. A
Result
f \text{ is continuous} \iff \forall\, V\in\tau_Y,\ f^{-1}(V)\in\tau_X

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
1
\text{Show } f:\mathbb{R}\to\mathbb{R},\ f(x)=x^2 \text{ is continuous, using preimages of a basis.}
By the Corollary, it suffices to check preimages of basic open intervals \((a,b)\) generate \(\tau_Y\). A
2
\text{Case } b\le 0: f^{-1}((a,b))=\emptyset. \quad \text{Case } a\lt 0\le b: f^{-1}((a,b))=(-\sqrt{b},\sqrt{b}).
Directly solving \(x^2\in(a,b)\): if the interval is entirely \(\le 0\), no real \(x\) has \(x^2\) there; if it straddles \(0\), \(x^2\lt b\) forces \(|x|\lt\sqrt b\), and \(x^2\gt a\) is automatic since \(a\lt0\le x^2\). B
3
\text{Case } 0\lt a\lt b: f^{-1}((a,b))=(-\sqrt{b},-\sqrt{a})\cup(\sqrt{a},\sqrt{b}).
\(x^2\in(a,b)\iff \sqrt a\lt |x|\lt\sqrt b\), which splits into the positive and negative branches shown. B
4
\text{In every case } f^{-1}((a,b)) \text{ is open in } \mathbb{R} \text{ (empty set, an open interval, or a union of two open intervals).}
Empty set and open intervals are open by definition of the standard topology; finite unions of open sets are open (topology axiom). A
\forall (a,b): f^{-1}((a,b)) \text{ open} \implies f \text{ continuous on } \mathbb{R}

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.

1
\text{Let } X=\{a,b,c\} \text{ with } \tau_X=\{\emptyset,\{a\},\{a,b\},X\}, \ Y=\{p,q\} \text{ with } \tau_Y=\{\emptyset,\{p\},Y\}.
A finite example to show the theorem applies verbatim with no metric present. Define \(f(a)=p,\ f(b)=q,\ f(c)=q\). A
2
\text{Test every open set of } Y: \quad f^{-1}(\emptyset)=\emptyset,\quad f^{-1}(Y)=X.
Preimages of the whole space and empty set are always the whole space and empty set respectively, for any function — both automatically open. A
3
f^{-1}(\{p\})=\{a\}.
Only \(a\) maps to \(p\), by the definition of \(f\) given above. A
4
\{a\}\in\tau_X \implies f^{-1}(\{p\}) \text{ is open.}
Direct inspection of \(\tau_X\), which was given to contain \(\{a\}\) as one of its listed open sets. A
5
\text{Since } \tau_Y=\{\emptyset,\{p\},Y\} \text{ has exactly these three open sets, all are checked.}
Exhaustive case check over the (finite) topology \(\tau_Y\); no basis shortcut is even needed here since \(\tau_Y\) is small. B
\forall V\in\tau_Y: f^{-1}(V)\in\tau_X \implies f \text{ continuous}

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
  1. 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.
    SolutionFor 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\).)
  2. Let \(Y\) have the indiscrete topology \(\tau_Y=\{\emptyset,Y\}\). Show every function \(f:X\to Y\) is continuous, for any \(X\).
    SolutionThe 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.
  3. 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.
    SolutionTake \(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.
  4. 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.
    SolutionLet \(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.
  5. 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.
    SolutionLet \(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\).