Continuity Through Open Sets
Continuity can be described without starting with a point and a chosen error bound. Instead, we ask what happens to open sets when we take their preimages. This viewpoint is especially useful when the target is a Euclidean space: open sets can be assembled from open balls, so continuity can often be checked by calculating the preimage of each ball.
Let \((X,d_X)\) and \((Y,d_Y)\) be metric spaces, each equipped with the topology in which a set is open when every one of its points lies in an open ball contained in that set. For a map \(f:X\to Y\) and a subset \(V\subseteq Y\), the preimage is \(f^{-1}(V)=\{x\in X:f(x)\in V\}\). This notation does not require \(f\) to have an inverse function.
The definition requires the preimage condition for every open set in the target, including the empty set and the whole space. Their preimages are \(\varnothing\) and \(X\), respectively, and both are open. The substantive work is therefore to handle the other open sets in the target. The next result shows why balls are a convenient collection to test.
Proof. If \(f\) is continuous, every open ball in \(Y\) is an open set, so its preimage is open by the definition of continuity. Conversely, suppose the preimage of every open ball in \(Y\) is open in \(X\). Let \(V\subseteq Y\) be open. For each \(y\in V\), openness gives a radius \(r_y>0\) such that \(B_{d_Y}(y,r_y)\subseteq V\). Consequently, \(V=\bigcup_{y\in V}B_{d_Y}(y,r_y)\); when \(V=\varnothing\), this is the empty union. Preimages respect unions, so \(f^{-1}(V)=\bigcup_{y\in V}f^{-1}(B_{d_Y}(y,r_y))\). Each set in this union is open by the assumption, and an arbitrary union of open sets is open. Thus \(f^{-1}(V)\) is open for every open \(V\subseteq Y\), which is continuity. \(\square\)
The test applies to every metric space, not only to the real line. It is useful because it reduces a condition involving all target open sets to calculations involving balls; the proof explains exactly why the reduction is valid. We now use it in several explicit settings.
Squaring: Preimages of Intervals
Worked Example: The Squaring Map on the Real Line
Consider \(f:\mathbb{R}\to\mathbb{R}\), \(f(x)=x^2\), with the standard topology on both copies of \(\mathbb{R}\). First calculate the preimage of the open interval \((1,4)\). By the definition of preimage, \(x\in f^{-1}((1,4))\) exactly when \(1<x^2<4\). The inequality \(x^2<4\) is equivalent to \(-2<x<2\), and \(x^2>1\) is equivalent to \(x<-1\) or \(x>1\). Taking both conditions gives \(f^{-1}((1,4))=(-2,-1)\cup(1,2)\).
Check: If \(x=3/2\), then \(f(x)=(3/2)^2=9/4\), and \(1<9/4<4\). If \(x=-2\), then \(f(x)=4\), which is not in the open interval \((1,4)\); this confirms that the endpoint \(-2\) is excluded. The other endpoints are excluded for the same strict-inequality reason: \(f(-1)=1\), \(f(1)=1\), and \(f(2)=4\).
To verify continuity, it is not enough to calculate the preimage of just this one interval. Let \((a,b)\) be any open interval, with \(a<b\). If \(b\leq 0\), no square is strictly less than \(b\), so \(f^{-1}((a,b))=\varnothing\). If \(a<0<b\), the lower bound \(a<x^2\) holds for every \(x\), and the upper bound gives \(f^{-1}((a,b))=(-\sqrt b,\sqrt b)\). If \(0\leq a<b\), both bounds matter, giving \(f^{-1}((a,b))=(-\sqrt b,-\sqrt a)\cup(\sqrt a,\sqrt b)\). These sets are open; when \(a=0\), the last expression is \((-\sqrt b,0)\cup(0,\sqrt b)\), still open.
Every open subset of \(\mathbb{R}\) is a union of open intervals: around each of its points there is an open interval contained in the set. Preimages respect unions, so the preimage of any open subset is a union of the open preimages just calculated. It is therefore open, and the map \(f(x)=x^2\) is continuous.
Preimages in the Plane
Worked Example: A Coordinate Projection
Give \(\mathbb{R}^2\) the Euclidean metric \(d((x,y),(u,v))=\sqrt{(x-u)^2+(y-v)^2}\), and give \(\mathbb{R}\) its standard metric. Consider the projection \(\pi_1:\mathbb{R}^2\to\mathbb{R}\), defined by \(\pi_1(x,y)=x\). For the open interval \(V=(-1,2)\), its preimage is the vertical strip \(\pi_1^{-1}(V)=\{(x,y)\in\mathbb{R}^2:-1<x<2\}=(-1,2)\times\mathbb{R}\).
To check that this strip is open, take any point \((x,y)\) in it. Both numbers \(x+1\) and \(2-x\) are positive, so set \(r=\min(x+1,2-x)/2>0\). If \((u,v)\in B((x,y),r)\), then \(|u-x|\leq\sqrt{(u-x)^2+(v-y)^2}<r\). Since \(r\leq(x+1)/2<x+1\) and \(r\leq(2-x)/2<2-x\), it follows that \(u>-1\) and \(u<2\). Thus the ball is contained in the strip.
Check at a particular point: For \((0,17)\), the two distances to the vertical boundaries are \(0+1=1\) and \(2-0=2\). The chosen radius is \(\min(1,2)/2=1/2\). Every point \((u,v)\) in \(B((0,17),1/2)\) satisfies \(|u|<1/2\), hence \(-1<u<2\).
The same argument proves continuity of the projection, not merely openness of this one preimage. Let \(V\subseteq\mathbb{R}\) be any open set and take \((x,y)\in\pi_1^{-1}(V)\), so \(x\in V\). There is a \(\delta>0\) with \((x-\delta,x+\delta)\subseteq V\). Every \((u,v)\in B((x,y),\delta)\) satisfies \(|u-x|<\delta\), so \(u\in V\) and \((u,v)\in\pi_1^{-1}(V)\). Each point of the preimage has such a ball around it; therefore the preimage is open for every open \(V\).
Worked Example: A Line in the Plane
Define \(h:\mathbb{R}\to\mathbb{R}^2\) by \(h(t)=(t,2t)\), using the standard topology on \(\mathbb{R}\) and the Euclidean topology on \(\mathbb{R}^2\). We calculate the preimage of an arbitrary open ball with centre \((a,b)\) and radius \(r>0\). Membership in the preimage means \((t-a)^2+(2t-b)^2<r^2\). Expanding the left side gives \(5t^2-2(a+2b)t+a^2+b^2\). Completing the square gives the exact identity \[ (t-a)^2+(2t-b)^2 =5\left(t-\frac{a+2b}{5}\right)^2+\frac{(2a-b)^2}{5}. \] Therefore the ball preimage is described by \[ 5\left(t-\frac{a+2b}{5}\right)^2 <r^2-\frac{(2a-b)^2}{5}. \]
If \(r^2-(2a-b)^2/5\leq0\), the left side is nonnegative and the strict inequality has no solutions, so the preimage is empty. If \(r^2-(2a-b)^2/5>0\), division by \(5\) and taking square roots gives the open interval \[ \left(\frac{a+2b}{5}-\sqrt{\frac{r^2-(2a-b)^2/5}{5}}, \frac{a+2b}{5}+\sqrt{\frac{r^2-(2a-b)^2/5}{5}}\right). \] Thus every open-ball preimage is open in \(\mathbb{R}\), whether it is empty or an interval. The open-ball test proves that \(h\) is continuous.
Check with a specific ball: Take centre \((0,0)\) and radius \(\sqrt5\). The inequality becomes \((t-0)^2+(2t-0)^2<(\sqrt5)^2\), or \(5t^2<5\), so the preimage is \((-1,1)\). At \(t=1/2\), the image is \((1/2,1)\) and its distance from \((0,0)\) is \(\sqrt{(1/2)^2+1^2}=\sqrt5/2<\sqrt5\). At \(t=1\), the distance is \(\sqrt{1^2+2^2}=\sqrt5\), so \(t=1\) is correctly excluded by the strict ball condition.
Composition and a Common Pitfall
Proof. Let \(W\subseteq Z\) be open. Since \(g\) is continuous, \(g^{-1}(W)\) is open in \(Y\). Since \(f\) is continuous, the preimage under \(f\) of this open set is open in \(X\). For every \(x\in X\), \(x\) belongs to that preimage exactly when \(g(f(x))\in W\), so \((g\circ f)^{-1}(W)=f^{-1}(g^{-1}(W))\). The preimage of every open \(W\) is therefore open, which is continuity of \(g\circ f\). \(\square\)
Common pitfall: Continuity does not mean that images of open sets are open. For the continuous squaring map, the open set \((-1,1)\subseteq\mathbb{R}\) has image \(f((-1,1))=[0,1)\). The value \(0\) is included because \(f(0)=0\), and \(1\) is excluded because neither endpoint of \((-1,1)\) belongs to the set. The image is not open in \(\mathbb{R}\): every open interval around \(0\) contains negative numbers, which are not in \([0,1)\). The definition asks for \(f^{-1}(V)\) to be open for open \(V\) in the target; it imposes no such condition on \(f(U)\).
There is also a useful closed-set consequence. If \(f:X\to Y\) is continuous and \(C\subseteq Y\) is closed, then \(Y\setminus C\) is open. Hence \(f^{-1}(Y\setminus C)\) is open. Because \(f^{-1}(Y\setminus C)=X\setminus f^{-1}(C)\), the preimage \(f^{-1}(C)\) is closed. The direction matters: continuity guarantees that preimages of closed sets are closed, not that images of closed sets are closed.
Open-set continuity lets us use the structure of the target to organize a proof. In metric spaces, balls provide a local collection whose unions recover every open set. The examples show how the resulting preimages can be intervals, strips, or empty sets, and why the definition is about preimages rather than images.
Check Your Understanding
For each question, use the definition and, where appropriate, the open-ball test.
- For \(f(x)=x^2\), calculate \(f^{-1}((-4,9))\) and explain why it is open.
- For \(\pi_1:\mathbb{R}^2\to\mathbb{R}\), calculate the preimage of \((2,5)\).
- For \(h(t)=(t,2t)\), calculate the preimage of the ball centred at \((0,0)\) with radius \(3\).
- State why checking preimages of open balls suffices to prove continuity between metric spaces.
- Give an example showing that a continuous map need not send open sets to open sets.