A function can be perfectly well-defined by a simple rule and still destroy the shape of a space. The map that sends every rational number to $0$ and every irrational number to $1$ respects neither nearness nor passage to limits: a sequence of rationals and irrationals can approach the same real number while the function values jump between two separated points. Continuity is the topological condition that prevents this kind of tearing. It asks that whenever the target declares a set of acceptable outputs to be open, the corresponding set of inputs was already open in the source.
The point of the topological definition is that it separates the idea of continuity from formulas, derivatives, distances, and coordinates. On metric spaces it recovers the familiar $\varepsilon$-$\delta$ condition, but it also applies to quotient spaces, manifolds, function spaces, ordered spaces, and spaces built by gluing. The central question is not whether a graph can be drawn without lifting a pencil. The central question is: which maps respect the open-set structure that records observable local behaviour?
[example: A Jump Detected by an Open Set]
Let $f:\mathbb R\to\mathbb R$ be given by
\begin{align*}
f(x) &=
\begin{cases}
0, & x<0,\\
1, & x\ge 0.
\end{cases}
\end{align*}
We test continuity by pulling back the open interval $(1/2,3/2)$ in the codomain. For $x\in\mathbb R$,
\begin{align*}
x\in f^{-1}((1/2,3/2))
&\iff f(x)\in (1/2,3/2)\\
&\iff f(x)=1\\
&\iff x\ge 0.
\end{align*}
The middle equivalence holds because the only possible values of $f$ are $0$ and $1$, with
\begin{align*}
0\notin (1/2,3/2), \qquad 1\in (1/2,3/2).
\end{align*}
Therefore
\begin{align*}
f^{-1}((1/2,3/2))&=[0,\infty).
\end{align*}
This set is not open in the usual topology on $\mathbb R$: if it were open, then since $0\in[0,\infty)$ there would be some $\varepsilon>0$ with
\begin{align*}
(-\varepsilon,\varepsilon)\subset [0,\infty).
\end{align*}
But $-\varepsilon/2\in(-\varepsilon,\varepsilon)$ and $-\varepsilon/2<0$, so $-\varepsilon/2\notin[0,\infty)$, a contradiction. Thus one [open set](/page/Open%20Set) in the target detects the jump at $0$, showing why continuity is tested by preimages of open sets.
[/example]
The same test also explains why topology is the right language. A formula may look harmless, but the topology decides what counts as a small change. Changing the topology on the domain or codomain can turn the same underlying set-theoretic map from continuous to discontinuous, or from discontinuous to continuous. Continuous functions therefore belong to topology as much as to analysis.
Before defining a continuous function, we need the ambient objects on which continuity is measured. The essential data are not lengths or angles, but the collections of subsets declared open. Those collections encode what it means to test a point locally.
[definition: Topological Space]
A [topological space](/page/Topological%20Space) is a pair $(X, \tau_X)$, where $X$ is a set and $\tau_X \subset \mathcal P(X)$ satisfies:
\begin{align*}
&\varnothing \in \tau_X, \qquad X \in \tau_X, \\
&\text{if } \mathcal U \subset \tau_X, \text{ then } \bigcup_{U \, \in \, \mathcal U} U \in \tau_X, \\
&\text{if } U_1,\ldots,U_n \in \tau_X, \text{ then } \bigcap_{i=1}^n U_i \in \tau_X.
\end{align*}
The elements of $\tau_X$ are called open sets.
[/definition]
A topological space is therefore a set equipped with a chosen language of local tests. Once that language is fixed on the source and target, continuity asks whether a function respects those tests by pulling them back.
## Definition
A function between topological spaces should preserve what can be detected locally in the target. If an observer in $Y$ can restrict attention to an open region $V$, then a continuous map should make the corresponding condition on $X$ locally detectable as well. This leads to the preimage condition.
[definition: Continuous Function]
Let $(X,\tau_X)$ and $(Y,\tau_Y)$ be topological spaces. A function $f: X \to Y$ is continuous if for every $V \in \tau_Y$, the preimage
\begin{align*}
f^{-1}(V) &= \{x \in X : f(x) \in V\}
\end{align*}
belongs to $\tau_X$.
[/definition]
This definition pulls information backwards. It does not ask that images of open sets be open, because a map can collapse a whole interval to one point and still preserve every target-side test. The fastest way to separate the correct direction from the tempting wrong direction is to examine constant maps.
[example: Constant Maps]
Let $(X,\tau_X)$ and $(Y,\tau_Y)$ be topological spaces, fix $y_0\in Y$, and define $c:X\to Y$ by $c(x)=y_0$ for every $x\in X$. We show that $c$ is continuous by checking the preimage of an arbitrary open set $V\in\tau_Y$.
For each $x\in X$,
\begin{align*}
x\in c^{-1}(V)
&\iff c(x)\in V \\
&\iff y_0\in V.
\end{align*}
If $y_0\in V$, then the last condition is true for every $x\in X$, so
\begin{align*}
c^{-1}(V)&=X.
\end{align*}
If $y_0\notin V$, then the last condition is false for every $x\in X$, so
\begin{align*}
c^{-1}(V)&=\varnothing.
\end{align*}
Thus
\begin{align*}
c^{-1}(V)
&=
\begin{cases}
X, & y_0\in V,\\
\varnothing, & y_0\notin V.
\end{cases}
\end{align*}
By the definition of a topological space, $X\in\tau_X$ and $\varnothing\in\tau_X$, so $c^{-1}(V)\in\tau_X$ for every $V\in\tau_Y$. Hence $c$ is continuous.
This also shows why continuity is not about sending open sets to open sets: if $U\subset X$ is nonempty, choose $u\in U$, and then
\begin{align*}
c(U)
&=\{c(x):x\in U\}\\
&=\{y_0\},
\end{align*}
because $c(u)=y_0$ gives $y_0\in c(U)$ and every value $c(x)$ equals $y_0$. The singleton $\{y_0\}$ need not be open in $Y$.
[/example]
Open sets are the native tests for continuity, but many arguments detect failure by trapping points in complementary constraints. The formal language of closed sets belongs just after the primary definition, because it gives the first alternative test for the same concept.
## Open and Closed Tests
Many continuity arguments are easier to run backwards through closed constraints than through open regions. To use that complementary language without ambiguity, we first name closed sets.
[definition: Closed Set]
Let $(X,\tau_X)$ be a topological space. A subset $F \subset X$ is closed if $X \setminus F \in \tau_X$.
[/definition]
The open-set definition is often inconvenient when the available information is phrased as membership in a closed constraint, such as a diagonal, a compact subset of $\mathbb R$, or the zero set of a function. The next theorem supplies the closed-set test needed in those situations, and it is also the version that connects most directly to compactness and Hausdorff separation.
[quotetheorem:1010]
The theorem says that continuity preserves both kinds of topological tests: open neighbourhood tests and closed obstruction tests. It also prepares the ground for compactness and convergence, where closed subsets often carry the usable information.
## Local Continuity and Neighbourhoods
### Neighbourhood Formulations
Continuity is global in its definition, since it asks about every open subset of the codomain. In practice, discontinuity often happens at a point, and many arguments need a local version. The local language replaces arbitrary open subsets of $Y$ by neighbourhoods of one value $f(x_0)$.
To describe local continuity without relying on metric balls, we need a word for the open sets that surround a point. This notion is the topological replacement for a small interval around a real number.
[definition: Neighbourhood]
Let $(X,\tau_X)$ be a topological space and let $x_0 \in X$. A subset $N \subset X$ is a neighbourhood of $x_0$ if there exists $U \in \tau_X$ such that
\begin{align*}
x_0 \in U \subset N.
\end{align*}
[/definition]
A neighbourhood need not itself be open; it only has to contain an open set around the point. This flexibility lets the local definition match many common formulations in analysis, where closed balls or half-open intervals may appear as convenient neighbourhoods.
[definition: Continuity at a Point]
Let $(X,\tau_X)$ and $(Y,\tau_Y)$ be topological spaces. Let $f: X \to Y$ be a function and let $x_0 \in X$. The function $f$ is continuous at $x_0$ if for every neighbourhood $N$ of $f(x_0)$ in $Y$, the preimage $f^{-1}(N)$ is a neighbourhood of $x_0$ in $X$.
[/definition]
A useful local notion must still recover the global definition, otherwise checking continuity point by point would miss information encoded in larger open sets. The next theorem confirms that local neighbourhood control at every point is exactly the same requirement as the global preimage condition.
[quotetheorem:4974]
This result turns continuity into a local property. It is why a discontinuity at a single point can defeat global continuity, and why local coordinate arguments on manifolds can be assembled into a global continuity statement.
### Metric Continuity
When the spaces come from metrics, neighbourhoods can be replaced by balls. To connect the topological definition to the analytic condition used in calculus, we first recall the structure that supplies those balls.
[definition: Metric Space]
A metric space is a pair $(X,d_X)$, where $X$ is a set and $d_X: X \times X \to [0,\infty)$ satisfies, for all $x,y,z \in X$,
\begin{align*}
&d_X(x,y)=0 \iff x=y, \\
&d_X(x,y)=d_X(y,x), \\
&d_X(x,z) \le d_X(x,y)+d_X(y,z).
\end{align*}
[/definition]
Metrics generate topologies by declaring balls to be the basic local tests, so the abstract neighbourhood condition should reduce to a quantitative estimate involving two positive parameters. The next theorem is the conversion rule between the topological definition and the $\varepsilon$-$\delta$ language of metric spaces.
[quotetheorem:4975]
The theorem does not replace the topological definition; it explains why the older metric definition was successful. It works when distance is available, while the open-set definition keeps working after quotienting, gluing, or changing the notion of local observation.
[example: Continuity of a Polynomial]
Let $p:\mathbb R\to\mathbb R$ be the polynomial
\begin{align*}
p(x)&=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0.
\end{align*}
Fix $x_0\in\mathbb R$. We show that $p$ is continuous at $x_0$ in the usual metric topology by proving that $|p(x)-p(x_0)|$ can be made arbitrarily small when $|x-x_0|$ is small.
First consider a monomial $x\mapsto x^m$ with $m\ge 1$. The factorisation
\begin{align*}
x^m-x_0^m&=(x-x_0)\sum_{j=0}^{m-1}x^jx_0^{m-1-j}
\end{align*}
follows by expanding the right-hand side:
\begin{align*}
(x-x_0)\sum_{j=0}^{m-1}x^jx_0^{m-1-j}
&=\sum_{j=0}^{m-1}x^{j+1}x_0^{m-1-j}-\sum_{j=0}^{m-1}x^jx_0^{m-j}\\
&=\sum_{k=1}^{m}x^kx_0^{m-k}-\sum_{k=0}^{m-1}x^kx_0^{m-k}\\
&=x^m-x_0^m.
\end{align*}
Now assume $|x-x_0|<1$. Then
\begin{align*}
|x|&=|x-x_0+x_0|\\
&\le |x-x_0|+|x_0|\\
&<1+|x_0|.
\end{align*}
Hence, for $0\le j\le m-1$,
\begin{align*}
|x^jx_0^{m-1-j}|
&=|x|^j|x_0|^{m-1-j}\\
&\le (1+|x_0|)^j(1+|x_0|)^{m-1-j}\\
&=(1+|x_0|)^{m-1}.
\end{align*}
Therefore
\begin{align*}
|x^m-x_0^m|
&=\left|(x-x_0)\sum_{j=0}^{m-1}x^jx_0^{m-1-j}\right|\\
&\le |x-x_0|\sum_{j=0}^{m-1}|x^jx_0^{m-1-j}|\\
&\le m(1+|x_0|)^{m-1}|x-x_0|.
\end{align*}
For the whole polynomial,
\begin{align*}
p(x)-p(x_0)
&=\sum_{m=0}^{n}a_mx^m-\sum_{m=0}^{n}a_mx_0^m\\
&=\sum_{m=0}^{n}a_m(x^m-x_0^m)\\
&=\sum_{m=1}^{n}a_m(x^m-x_0^m),
\end{align*}
because the $m=0$ term is $a_0(1-1)=0$. If $|x-x_0|<1$, then
\begin{align*}
|p(x)-p(x_0)|
&=\left|\sum_{m=1}^{n}a_m(x^m-x_0^m)\right|\\
&\le \sum_{m=1}^{n}|a_m|\,|x^m-x_0^m|\\
&\le \sum_{m=1}^{n}|a_m|\,m(1+|x_0|)^{m-1}|x-x_0|\\
&=C|x-x_0|,
\end{align*}
where
\begin{align*}
C&=\sum_{m=1}^{n}|a_m|\,m(1+|x_0|)^{m-1}.
\end{align*}
Given $\varepsilon>0$, choose
\begin{align*}
\delta&=
\begin{cases}
1, & C=0,\\
\min\{1,\varepsilon/C\}, & C>0.
\end{cases}
\end{align*}
If $|x-x_0|<\delta$, then in the case $C=0$ we have $|p(x)-p(x_0)|\le 0<\varepsilon$, while in the case $C>0$ we have
\begin{align*}
|p(x)-p(x_0)|
&\le C|x-x_0|\\
&< C\delta\\
&\le \varepsilon.
\end{align*}
Thus $p$ is continuous at $x_0$, and since $x_0$ was arbitrary, every real polynomial is continuous on $\mathbb R$.
[/example]
The example shows that the topological definition includes the standard continuous functions of calculus. Its advantage is not that it changes these examples, but that it gives the same word to the same structural behaviour in every topological setting.
## Bases and Efficient Tests
### Basic Open Tests
The definition of continuity asks for every open subset of the codomain, which can be an enormous family. In practice, topologies are often specified by smaller collections of opens from which all others are built. If continuity respects those smaller local tests, arbitrary unions then do the remaining work.
A basis records a set of reusable open neighbourhood shapes. In metric spaces these are open balls; in ordered spaces they are intervals; in product spaces they are boxes. The definition captures exactly the amount of data needed to reconstruct all open sets.
[definition: Basis for a Topology]
Let $X$ be a set. A collection $\mathcal B \subset \mathcal P(X)$ is a basis for a topology on $X$ if:
\begin{align*}
&\text{for every } x \in X, \text{ there exists } B \in \mathcal B \text{ such that } x \in B, \\
&\text{if } x \in B_1 \cap B_2 \text{ with } B_1,B_2 \in \mathcal B, \text{ then there exists } B_3 \in \mathcal B \text{ such that } x \in B_3 \subset B_1 \cap B_2.
\end{align*}
[/definition]
The topology generated by $\mathcal B$ is the collection of all unions of elements of $\mathcal B$. Thus a basis is not merely a list of preferred open sets; it is enough information to recover the whole topology.
Continuity asks for preimages of every open set in the codomain, but a generated topology may contain opens built from many unions of basic pieces. The practical question is whether it is enough to check preimages only on those basic pieces, since arbitrary opens are then assembled from them. The [basis criterion](/theorems/3308) answers exactly this reduction problem.
[quotetheorem:4976]
This theorem is one of the main computational tools for continuity. It says that continuity is tested in the codomain, not by covering the domain. In Euclidean spaces, it lets us test preimages of open balls or open rectangles rather than arbitrary open sets.
### Product Coordinates
The basis criterion becomes especially useful for product spaces, where the natural basic opens are rectangles. Coordinate projections should be continuous because they represent forgetting information, and the [product topology](/page/Product%20Topology) is designed to make that statement true.
[example: Coordinate Projections from a Product]
Let $X$ and $Y$ be topological spaces, and equip $X \times Y$ with the product topology. Define the coordinate projections by
\begin{align*}
\pi_X: X \times Y &\to X, &
\pi_X(x,y)&=x,
\end{align*}
and
\begin{align*}
\pi_Y: X \times Y &\to Y, &
\pi_Y(x,y)&=y.
\end{align*}
We show that each projection is continuous by checking preimages of open sets.
Let $U\subset X$ be open. For any $(x,y)\in X\times Y$,
\begin{align*}
(x,y)\in \pi_X^{-1}(U)
&\iff \pi_X(x,y)\in U\\
&\iff x\in U\\
&\iff (x,y)\in U\times Y.
\end{align*}
Hence
\begin{align*}
\pi_X^{-1}(U)&=U\times Y.
\end{align*}
Since $U$ is open in $X$ and $Y$ is open in $Y$, the set $U\times Y$ is a basic open set in the product topology. Therefore $\pi_X^{-1}(U)$ is open in $X\times Y$ for every open $U\subset X$, so $\pi_X$ is continuous.
Similarly, let $V\subset Y$ be open. For any $(x,y)\in X\times Y$,
\begin{align*}
(x,y)\in \pi_Y^{-1}(V)
&\iff \pi_Y(x,y)\in V\\
&\iff y\in V\\
&\iff (x,y)\in X\times V.
\end{align*}
Thus
\begin{align*}
\pi_Y^{-1}(V)&=X\times V.
\end{align*}
Since $X$ is open in $X$ and $V$ is open in $Y$, the set $X\times V$ is basic open in the product topology. Therefore $\pi_Y^{-1}(V)$ is open in $X\times Y$ for every open $V\subset Y$, so $\pi_Y$ is continuous. The product topology is therefore exactly the topology in which forgetting either coordinate passes the open-set continuity test.
[/example]
The example also hints at a universal property. The product topology is designed so that projections are continuous, and it is the weakest topology on $X \times Y$ with that property. Many topological constructions are chosen by asking which functions should become continuous.
## Algebra of Continuous Maps
### Composition and Structure
Once continuity is defined by preimages, it becomes stable under the operations that respect preimages. The most important of these is composition: if one map respects open tests and a second map respects open tests, their composite respects open tests as well.
The statement is simple, but it is the reason continuous functions form the morphisms of topology. Spaces and continuous maps make up the category in which topological constructions naturally live.
[quotetheorem:4960]
Composition turns local preservation into a reusable tool. Once a complicated map is written as a composite of known continuous maps, continuity follows from the structure of the decomposition.
A group operation can be algebraically valid while behaving badly with respect to nearby points. To use topology and group algebra together, multiplication and inversion must preserve local information rather than tear neighbourhoods apart. A topological group is the structure obtained by imposing exactly those compatibility requirements.
[definition: Topological Group]
A topological group is a group $(G,\cdot)$ equipped with a topology $\tau_G$ such that the multiplication map
\begin{align*}
m: G \times G &\to G \\
(g,h) &\mapsto g \cdot h
\end{align*}
and the inversion map
\begin{align*}
i: G &\to G \\
g &\mapsto g^{-1}
\end{align*}
are continuous.
[/definition]
This definition ensures that small changes in group elements produce small changes in products and inverses. It is the topological reason that translations and conjugations in Lie groups behave well.
[example: Continuous Real Arithmetic]
In the usual topology on $\mathbb R$, consider
\begin{align*}
+: \mathbb R \times \mathbb R &\to \mathbb R, & (x,y)&\mapsto x+y, \\
\cdot: \mathbb R \times \mathbb R &\to \mathbb R, & (x,y)&\mapsto xy.
\end{align*}
We verify the $\varepsilon$-$\delta$ condition at an arbitrary point $(x_0,y_0)\in\mathbb R^2$, using rectangles around $(x_0,y_0)$.
For addition, let $\varepsilon>0$ and choose $\delta=\varepsilon/2$. If
\begin{align*}
|x-x_0|&<\delta, &
|y-y_0|&<\delta,
\end{align*}
then
\begin{align*}
|(x+y)-(x_0+y_0)|
&=|(x-x_0)+(y-y_0)|\\
&\le |x-x_0|+|y-y_0|\\
&<\delta+\delta\\
&=\varepsilon.
\end{align*}
Thus addition is continuous at $(x_0,y_0)$.
For multiplication, first rewrite the difference by adding and subtracting $xy_0$:
\begin{align*}
xy-x_0y_0
&=xy-xy_0+xy_0-x_0y_0\\
&=x(y-y_0)+y_0(x-x_0).
\end{align*}
Taking absolute values gives
\begin{align*}
|xy-x_0y_0|
&=|x(y-y_0)+y_0(x-x_0)|\\
&\le |x|\,|y-y_0|+|y_0|\,|x-x_0|.
\end{align*}
Let
\begin{align*}
\delta&=\min\left\{1,\frac{\varepsilon}{2(1+|x_0|+|y_0|)}\right\}.
\end{align*}
If $|x-x_0|<\delta$ and $|y-y_0|<\delta$, then $\delta\le 1$, so
\begin{align*}
|x|
&=|x_0+(x-x_0)|\\
&\le |x_0|+|x-x_0|\\
&< |x_0|+1.
\end{align*}
Therefore
\begin{align*}
|xy-x_0y_0|
&\le |x|\,|y-y_0|+|y_0|\,|x-x_0|\\
&< (|x_0|+1)\delta+|y_0|\delta\\
&=(1+|x_0|+|y_0|)\delta\\
&\le \frac{\varepsilon}{2}\\
&<\varepsilon.
\end{align*}
Thus multiplication is continuous at $(x_0,y_0)$. Since $(x_0,y_0)$ was arbitrary, the usual arithmetic operations on $\mathbb R$ are continuous maps.
[/example]
### Pasting and Piecewise Construction
This calculation is the local analytic face of a topological fact: algebraic operations can be required to be continuous maps. Another common construction goes in a different direction, building a function from several formulas on different parts of the domain. To make such piecewise definitions reliable, we need a theorem that turns agreement on overlaps into continuity of the glued map.
[quotetheorem:1037]
The [pasting lemma](/theorems/1037) makes continuity compatible with gluing. It is indispensable in algebraic topology, where maps are often constructed simplex by simplex, cell by cell, or chart by chart.
[example: Absolute Value by Pasting]
Let $A=(-\infty,0]$ and $B=[0,\infty)$, each with the [subspace topology](/page/Subspace%20Topology) inherited from $\mathbb R$. The sets are closed in $\mathbb R$ because
\begin{align*}
\mathbb R\setminus A&=(0,\infty),\\
\mathbb R\setminus B&=(-\infty,0),
\end{align*}
and both complements are open in the usual topology.
Define
\begin{align*}
f_A:A&\to\mathbb R, & f_A(x)&=-x,\\
f_B:B&\to\mathbb R, & f_B(x)&=x.
\end{align*}
To see that $f_A$ is continuous, fix $x_0\in A$ and let $\varepsilon>0$. Choose $\delta=\varepsilon$. If $x\in A$ and $|x-x_0|<\delta$, then
\begin{align*}
|f_A(x)-f_A(x_0)|
&=|(-x)-(-x_0)|\\
&=|x_0-x|\\
&=|x-x_0|\\
&<\varepsilon.
\end{align*}
Thus $f_A$ is continuous on $A$. Similarly, if $x_0\in B$ and $|x-x_0|<\varepsilon$, then
\begin{align*}
|f_B(x)-f_B(x_0)|
&=|x-x_0|\\
&<\varepsilon,
\end{align*}
so $f_B$ is continuous on $B$.
The overlap is
\begin{align*}
A\cap B&=(-\infty,0]\cap[0,\infty)\\
&=\{0\}.
\end{align*}
At the only point of the overlap,
\begin{align*}
f_A(0)&=-0\\
&=0\\
&=f_B(0),
\end{align*}
so the two formulae agree on $A\cap B$. By the *Pasting Lemma*, the function $f:\mathbb R\to\mathbb R$ defined by
\begin{align*}
f(x)&=
\begin{cases}
-x, & x\le 0,\\
x, & x\ge 0
\end{cases}
\end{align*}
is continuous. For $x\le 0$, $|x|=-x$, and for $x\ge 0$, $|x|=x$, so this pasted function is exactly
\begin{align*}
f(x)&=|x|.
\end{align*}
Hence the absolute value function is continuous because its two linear pieces are continuous and agree at the point where they are glued.
[/example]
The example is elementary, but the method scales. Piecewise definitions are topologically legitimate when the pieces cover the domain in a controlled way and the formulas agree on the overlaps.
## Subspaces, Products, and Quotients
### Subspaces
Continuity becomes most useful when spaces are built from other spaces. Subspaces inherit open sets from ambient spaces, products encode simultaneous variation, and quotients encode gluing. Each construction is designed around which maps into or out of it should be continuous.
A subspace is the simplest construction: we restrict attention to a subset but keep the ambient notion of openness as far as it can be seen inside the subset. This is how intervals, spheres, and embedded surfaces inherit topology from Euclidean space.
[definition: Subspace Topology]
Let $(X,\tau_X)$ be a topological space and let $A \subset X$. The subspace topology on $A$ is
\begin{align*}
\tau_A &= \{A \cap U : U \in \tau_X\}.
\end{align*}
[/definition]
When a function lands in a subspace, there are two ways to view it: as a map into the smaller space or as a map into the ambient space followed by inclusion. The next theorem explains why these two viewpoints give the same continuity test, which is essential when subsets of Euclidean space are used as targets.
[quotetheorem:4977]
This theorem prevents unnecessary repetition. To show that a parametrised curve lands continuously in a circle, for example, it suffices to view it as a continuous map into $\mathbb R^2$ whose image lies in the circle.
### Products
A product space must describe what it means for several coordinates to vary continuously at once. The topology should make all projections continuous while still being no stronger than necessary, since adding too many open sets would make maps into the product harder to construct.
[definition: Product Topology]
Let $X$ and $Y$ be topological spaces. The product topology on $X\times Y$ is the topology generated by the basis
\begin{align*}
\mathcal B &= \{U\times V : U \subset X \text{ open and } V \subset Y \text{ open}\}.
\end{align*}
[/definition]
A map into $X\times Y$ is hard to test directly if one treats each open rectangle as a separate condition. But every such map is determined by its two coordinate functions, so the key question is whether continuity of those coordinates already controls all product-open tests. The product topology is built so that this coordinatewise test is both necessary and sufficient.
[quotetheorem:962]
This is why vector-valued continuity in Euclidean space is componentwise continuity. It also explains why product spaces are the correct domains for binary operations such as addition and multiplication.
### Quotients
Products encode simultaneous coordinates, but many spaces in topology are built by identification rather than by pairing. To make a circle from an interval, or a torus from a square, we need a topology on the set of equivalence classes that makes continuity descend from the original space.
[definition: Quotient Topology]
Let $(X,\tau_X)$ be a topological space, let $\sim$ be an [equivalence relation](/page/Equivalence%20Relation) on $X$, and let $q: X \to X/{\sim}$ be the quotient map. The [quotient topology](/page/Quotient%20Topology) on $X/{\sim}$ is
\begin{align*}
\tau_{X/{\sim}} &= \{V \subset X/{\sim} : q^{-1}(V) \in \tau_X\}.
\end{align*}
[/definition]
The definition is engineered so that continuity out of a quotient is checked before passing to the quotient. A map defined on the glued space is continuous exactly when its pullback along the quotient map is continuous, and the next theorem records that working rule.
[quotetheorem:1031]
Quotient spaces are where the open-set definition earns its keep. There may be no convenient distance on the quotient, and the points may be equivalence classes rather than familiar coordinates. Continuity remains testable through the quotient map.
[example: Gluing the Ends of an Interval]
Let $X=[0,1]$ with the subspace topology from $\mathbb R$, and let $\sim$ identify $0$ with $1$ while leaving every other point equivalent only to itself. Write
\begin{align*}
q:X&\to X/{\sim}
\end{align*}
for the quotient map, and set
\begin{align*}
S^1&=\{(u,v)\in\mathbb R^2:u^2+v^2=1\}.
\end{align*}
Define
\begin{align*}
F:[0,1]&\to\mathbb R^2\\
t&\mapsto (\cos(2\pi t),\sin(2\pi t)).
\end{align*}
The two coordinate functions $t\mapsto \cos(2\pi t)$ and $t\mapsto \sin(2\pi t)$ are continuous, so $F$ is continuous as a map into $\mathbb R^2$ by coordinatewise continuity for product spaces. For every $t\in[0,1]$,
\begin{align*}
\cos^2(2\pi t)+\sin^2(2\pi t)&=1,
\end{align*}
so $F(t)\in S^1$ and $F$ may be regarded as a map $[0,1]\to S^1$. At the glued endpoints,
\begin{align*}
F(0)&=(\cos 0,\sin 0)\\
&=(1,0),
\end{align*}
and
\begin{align*}
F(1)&=(\cos(2\pi),\sin(2\pi))\\
&=(1,0),
\end{align*}
so $F(0)=F(1)$.
Since the only nontrivial identification is $0\sim 1$, the equality $F(0)=F(1)$ makes $F$ constant on equivalence classes. Hence the formula
\begin{align*}
\bar F([t])&=F(t)
\end{align*}
defines a function
\begin{align*}
\bar F:X/{\sim}&\to S^1.
\end{align*}
It is well-defined because if $s\sim t$, then either $s=t$, in which case $F(s)=F(t)$, or $\{s,t\}=\{0,1\}$, in which case the endpoint computation gives $F(s)=F(t)$. Moreover,
\begin{align*}
(\bar F\circ q)(t)&=\bar F([t])\\
&=F(t),
\end{align*}
so $\bar F\circ q=F$. By the *[Universal Property of the Quotient Topology](/theorems/1031)*, $\bar F$ is continuous.
We now check that $\bar F$ is bijective. For surjectivity, let $(u,v)\in S^1$. By the polar-coordinate parametrisation of the unit circle, there exists $\theta\in[0,2\pi)$ such that
\begin{align*}
u&=\cos\theta, &
v&=\sin\theta.
\end{align*}
With $t=\theta/(2\pi)\in[0,1)$, we get
\begin{align*}
\bar F([t])&=F(t)\\
&=(\cos(2\pi t),\sin(2\pi t))\\
&=(\cos\theta,\sin\theta)\\
&=(u,v).
\end{align*}
Thus $\bar F$ is surjective.
For injectivity, suppose $\bar F([s])=\bar F([t])$ with $s,t\in[0,1]$. Then
\begin{align*}
\cos(2\pi s)&=\cos(2\pi t),\\
\sin(2\pi s)&=\sin(2\pi t).
\end{align*}
Using the cosine difference identity,
\begin{align*}
\cos(2\pi(s-t))
&=\cos(2\pi s)\cos(2\pi t)+\sin(2\pi s)\sin(2\pi t)\\
&=\cos^2(2\pi t)+\sin^2(2\pi t)\\
&=1.
\end{align*}
Since $s,t\in[0,1]$, we have $2\pi(s-t)\in[-2\pi,2\pi]$. On this interval, $\cos \alpha=1$ only for $\alpha\in\{-2\pi,0,2\pi\}$, so
\begin{align*}
2\pi(s-t)&\in\{-2\pi,0,2\pi\}.
\end{align*}
Hence
\begin{align*}
s-t&\in\{-1,0,1\}.
\end{align*}
If $s-t=0$, then $s=t$ and $[s]=[t]$. If $s-t=1$, then $(s,t)=(1,0)$, so $s\sim t$. If $s-t=-1$, then $(s,t)=(0,1)$, so again $s\sim t$. Therefore $[s]=[t]$, and $\bar F$ is injective.
The space $[0,1]$ is compact by the *[Heine-Borel Theorem](/theorems/315)*. The quotient map $q$ is continuous by the definition of the quotient topology, so $X/{\sim}=q([0,1])$ is compact by *Continuous Image of a [Compact Space](/page/Compact%20Space)*. Also, $S^1$ is Hausdorff because it is a subspace of the [Hausdorff space](/page/Hausdorff%20Space) $\mathbb R^2$. Thus $\bar F:X/{\sim}\to S^1$ is a bijective continuous map from a compact space to a Hausdorff space, so by *Compact-to-Hausdorff Bijective Continuous Maps are Homeomorphisms*, $\bar F$ is a homeomorphism. The quotient topology therefore turns the endpoint agreement $F(0)=F(1)$ into an actual topological circle.
[/example]
This construction is the prototype for attaching cells and forming spaces in algebraic topology. Instead of proving continuity after gluing from scratch, the quotient topology gives a controlled test upstairs.
## Continuity, Sequences, and Separation
### Sequential Tests
In metric spaces, continuity can be recognised by sequences: if $x_k \to x$, then $f(x_k)\to f(x)$. In general topological spaces, sequences may not see all open sets. Understanding when sequential tests are valid is a useful warning against importing metric habits into arbitrary topology.
The sequence criterion needs a definition of convergence that uses open neighbourhoods. This version works in every topological space, even when limits are not unique.
[definition: Convergent Sequence in a Topological Space]
Let $(X,\tau_X)$ be a topological space. A sequence $(x_k)_{k\in\mathbb N}$ in $X$ converges to $x\in X$ if for every neighbourhood $N$ of $x$, there exists $K\in\mathbb N$ such that $x_k\in N$ for every $k\ge K$.
[/definition]
A convergent sequence is eventually trapped in every neighbourhood of its limit. If $f$ is continuous, each neighbourhood of $f(x)$ pulls back to a neighbourhood of $x$, so the original sequence should eventually land inside that pullback.
This gives the first sequential test to isolate: continuity should at least guarantee that every convergent sequence in the domain is sent to a convergent sequence in the codomain with the expected limit. The theorem records this one-way implication before we ask whether sequences can also detect continuity.
[quotetheorem:4978]
The converse needs additional hypotheses. A space can have too many neighbourhoods at a point for sequences to detect all failures. First-countability is the condition that supplies a countable local testing family.
[definition: First-Countable Space]
A topological space $(X,\tau_X)$ is first-countable if for every $x\in X$ there exists a sequence $(U_k)_{k\in\mathbb N}$ of neighbourhoods of $x$ such that for every neighbourhood $N$ of $x$, there exists $k\in\mathbb N$ with $U_k\subset N$.
[/definition]
Metric spaces are first-countable because the balls $B(x,1/k)$ form such a local family. With this countable supply of neighbourhoods, any failure of continuity can be converted into a sequence witnessing the failure, which motivates the full sequential characterisation.
[quotetheorem:4979]
The theorem identifies the boundary of the sequential method. It is valid in metric topology and many spaces used in analysis, but it should not be assumed in all topological spaces.
### Hausdorff Targets and Equality
In an arbitrary topological space, two distinct points may be impossible to distinguish by disjoint neighbourhoods. When this happens, limits need not be unique and equality arguments can lose their topological force. The Hausdorff condition rules out that ambiguity by requiring distinct points to admit incompatible open tests.
[definition: Hausdorff Space]
A topological space $(X,\tau_X)$ is Hausdorff if for every pair of distinct points $x,y\in X$, there exist open sets $U,V\in\tau_X$ such that
\begin{align*}
x\in U, \qquad y\in V, \qquad U\cap V=\varnothing.
\end{align*}
[/definition]
When the codomain is Hausdorff, two different output values can be separated by open tests. That separation should make the set of input points where two continuous maps agree behave like a closed constraint, and the next theorem is the exact form of that principle.
[quotetheorem:1025]
This theorem turns pointwise equality into topology. If two continuous maps into a Hausdorff space agree on a [dense subset](/page/Dense%20Subset), the equaliser contains a dense set and is closed, so it contains the closure of that dense set.
[example: Agreement on the Rationals]
Let $f,g:\mathbb R\to\mathbb R$ be continuous in the usual topology, and suppose that
\begin{align*}
f(q)&=g(q) \qquad \text{for every } q\in\mathbb Q.
\end{align*}
Set
\begin{align*}
E&=\{x\in\mathbb R:f(x)=g(x)\}.
\end{align*}
Since $\mathbb R$ is Hausdorff and both $f$ and $g$ are continuous, the *Equaliser of Continuous Maps into a Hausdorff Space* implies that $E$ is closed in $\mathbb R$.
For every $q\in\mathbb Q$, the hypothesis gives $f(q)=g(q)$, so
\begin{align*}
q\in E.
\end{align*}
Therefore
\begin{align*}
\mathbb Q&\subset E.
\end{align*}
Because $E$ is closed and contains $\mathbb Q$, it contains the closure of $\mathbb Q$:
\begin{align*}
\overline{\mathbb Q}&\subset E.
\end{align*}
By the *Density of the Rationals in the Real Line*, every nonempty open interval in $\mathbb R$ contains a rational number, so every neighbourhood of every $x\in\mathbb R$ meets $\mathbb Q$. Hence
\begin{align*}
\overline{\mathbb Q}&=\mathbb R.
\end{align*}
Combining the inclusions gives
\begin{align*}
\mathbb R=\overline{\mathbb Q}\subset E\subset \mathbb R,
\end{align*}
so
\begin{align*}
E&=\mathbb R.
\end{align*}
Thus for every $x\in\mathbb R$,
\begin{align*}
x\in E
&\iff f(x)=g(x),
\end{align*}
and since $E=\mathbb R$, we have $f(x)=g(x)$ for all $x\in\mathbb R$. Therefore $f=g$ on all of $\mathbb R$; agreement on the dense subset $\mathbb Q$ forces agreement everywhere.
[/example]
This is a typical continuity argument: prove something on a dense, manageable subset, then use topological structure to force the conclusion everywhere.
## Compactness and Connectedness Under Continuous Maps
### Compact Images
Continuity is powerful because it transports global structure from the domain to the image. Compactness and connectedness are the two most important examples. They explain why continuous real-valued functions on closed bounded intervals attain extrema and satisfy intermediate value phenomena.
Compactness abstracts the property that every open cover has a finite subcover. It is a finite-control principle: infinitely many local pieces of information can be reduced to finitely many when the space is compact.
[definition: Compact Space]
A topological space $(X,\tau_X)$ is compact if for every collection $\mathcal U\subset\tau_X$ with
\begin{align*}
X &= \bigcup_{U\in\mathcal U}U,
\end{align*}
there exist $U_1,\ldots,U_n\in\mathcal U$ such that
\begin{align*}
X &= \bigcup_{i=1}^n U_i.
\end{align*}
[/definition]
Compactness interacts strongly with continuity because any open cover of the image can be pulled back to an open cover of the domain. The next theorem is needed to turn compactness from a property of the source space into a property of the range of a continuous function.
[quotetheorem:305]
This theorem is the topological core of the extreme value theorem. The usual order and completeness properties of $\mathbb R$ enter only after compactness has been transported to the image.
[quotetheorem:182]
The compactness hypothesis cannot be discarded. A continuous function can fail to attain its supremum on a noncompact domain even when it is bounded.
[example: Bounded Continuous Function Without a Maximum]
Let $f:(0,1)\to\mathbb R$ be given by $f(x)=x$, where $(0,1)$ has the subspace topology from $\mathbb R$. If $V\subset\mathbb R$ is open, then
\begin{align*}
f^{-1}(V)
&=\{x\in(0,1):f(x)\in V\}\\
&=\{x\in(0,1):x\in V\}\\
&=(0,1)\cap V.
\end{align*}
Since $(0,1)\cap V$ is open in the subspace topology on $(0,1)$, the map $f$ is continuous.
Its image is
\begin{align*}
f((0,1))
&=\{f(x):x\in(0,1)\}\\
&=\{x:x\in(0,1)\}\\
&=(0,1).
\end{align*}
Thus every value of $f$ is strictly less than $1$, so $1$ is an upper bound:
\begin{align*}
x\in(0,1)
&\implies f(x)=x<1.
\end{align*}
If $M<1$, choose
\begin{align*}
x&=\frac{M+1}{2}.
\end{align*}
When $M<1$, we have
\begin{align*}
M&<\frac{M+1}{2}<1,
\end{align*}
and, if $M\le 0$, then $x>0$ as well. If $0<M<1$, the same inequality gives $x\in(0,1)$. Hence no number smaller than $1$ is an upper bound for $f((0,1))$, and therefore
\begin{align*}
\sup_{x\in(0,1)} f(x)&=1.
\end{align*}
However, a maximum would require some $x_0\in(0,1)$ with
\begin{align*}
f(x_0)&=1.
\end{align*}
Since $f(x_0)=x_0$, this would force $x_0=1$, contradicting $x_0\in(0,1)$. Therefore $f$ is bounded and continuous but does not attain its supremum.
The missing endpoint is a compactness failure: the sets
\begin{align*}
U_n&=(0,1-1/n) \qquad n\ge 2
\end{align*}
are open in $(0,1)$, they cover $(0,1)$, but any finite subcollection has largest index $N$ and covers only
\begin{align*}
(0,1-1/N),
\end{align*}
which misses every point in $(1-1/N,1)$. Thus the extreme value conclusion fails because the domain is not compact.
[/example]
### Connected Images
Compactness explains extrema, but it does not explain why a continuous real-valued function cannot jump over an intermediate value. For that, the relevant global property is connectedness, which records whether a space can be separated into two disjoint open regions.
[definition: Connected Space]
A topological space $(X,\tau_X)$ is connected if there do not exist nonempty open sets $U,V\in\tau_X$ such that
\begin{align*}
X &= U\cup V, \\
U\cap V &= \varnothing.
\end{align*}
[/definition]
A connected domain has no way to split into two nonempty open pieces. If a continuous image could be split in that way, the two image pieces would pull back to a forbidden split of the domain. Thus the natural transport question for connectedness has a rigid answer: continuous images cannot create a separation.
[quotetheorem:296]
A connected image in $\mathbb R$ must be an interval, and intervals cannot omit a value lying between two of their points. This is why the connected-image theorem immediately asks for the classical real-valued consequence stated next.
[quotetheorem:629]
The theorem forbids jumps in real-valued continuous functions on intervals. It is not a statement about differentiability or monotonicity; it is a statement about connectedness transported by continuity.
[example: Why the Dirichlet Function is Discontinuous Everywhere]
Let $f:\mathbb R\to\mathbb R$ be defined by
\begin{align*}
f(x)&=
\begin{cases}
1, & x\in\mathbb Q, \\
0, & x\notin\mathbb Q.
\end{cases}
\end{align*}
We show that $f$ is not continuous at any chosen point $x_0\in\mathbb R$.
First suppose $x_0\in\mathbb Q$. Then
\begin{align*}
f(x_0)&=1.
\end{align*}
The interval
\begin{align*}
N&=(1/2,3/2)
\end{align*}
is a neighbourhood of $f(x_0)=1$. If $f$ were continuous at $x_0$, then $f^{-1}(N)$ would be a neighbourhood of $x_0$, so there would be some $\varepsilon>0$ such that
\begin{align*}
x_0\in (x_0-\varepsilon,x_0+\varepsilon)\subset f^{-1}(N).
\end{align*}
By density of the irrational numbers in $\mathbb R$, there exists
\begin{align*}
y&\in (x_0-\varepsilon,x_0+\varepsilon)\setminus\mathbb Q.
\end{align*}
Since $y$ is irrational,
\begin{align*}
f(y)&=0,
\end{align*}
and
\begin{align*}
0&\notin (1/2,3/2).
\end{align*}
Thus $y\notin f^{-1}(N)$, contradicting $(x_0-\varepsilon,x_0+\varepsilon)\subset f^{-1}(N)$.
Now suppose $x_0\notin\mathbb Q$. Then
\begin{align*}
f(x_0)&=0.
\end{align*}
The interval
\begin{align*}
M&=(-1/2,1/2)
\end{align*}
is a neighbourhood of $f(x_0)=0$. If $f$ were continuous at $x_0$, then there would be some $\varepsilon>0$ such that
\begin{align*}
x_0\in (x_0-\varepsilon,x_0+\varepsilon)\subset f^{-1}(M).
\end{align*}
By density of the rational numbers in $\mathbb R$, there exists
\begin{align*}
q&\in (x_0-\varepsilon,x_0+\varepsilon)\cap\mathbb Q.
\end{align*}
Since $q$ is rational,
\begin{align*}
f(q)&=1,
\end{align*}
and
\begin{align*}
1&\notin (-1/2,1/2).
\end{align*}
Thus $q\notin f^{-1}(M)$, contradicting $(x_0-\varepsilon,x_0+\varepsilon)\subset f^{-1}(M)$.
In both cases, continuity at $x_0$ fails. Since $x_0$ was arbitrary, the Dirichlet function is discontinuous at every point of $\mathbb R$.
[/example]
The example shows continuity as a condition of local stability. It also illustrates why density arguments are so effective: dense subsets can force a continuous map, but they can also expose discontinuity when two dense behaviours conflict.
## Extreme Topologies and Pathologies
A continuous function depends on both the domain topology and the codomain topology. The same set-theoretic function can behave differently when either topology changes. Extreme topologies make this dependence visible.
Suppose we want every possible function out of a space to be continuous. Then every preimage of every open set in every codomain must be open. Since arbitrary preimages can be arbitrary subsets of the domain, the domain must declare every subset open.
[definition: Discrete Topology]
Let $X$ be a set. The discrete topology on $X$ is
\begin{align*}
\tau_X &= \mathcal P(X).
\end{align*}
[/definition]
The discrete topology contains the maximum possible number of open sets on $X$. For a function $f:X\to Y$, every preimage $f^{-1}(V)$ is some subset of $X$, regardless of what topology is placed on $Y$.
This makes discreteness the natural domain condition for a universal continuity statement. The next formal result turns the preimage observation into a precise endpoint principle: from a discrete domain, no set-theoretic function can fail the open-preimage test.
[quotetheorem:4952]
The previous extreme made the domain so fine that all preimages were open. The dual question asks how coarse the codomain can be if every possible function into it is to be continuous from every source. That question leads to the topology with only the unavoidable open sets.
[definition: Indiscrete Topology]
Let $X$ be a set. The indiscrete topology on $X$ is
\begin{align*}
\tau_X &= \{\varnothing,X\}.
\end{align*}
[/definition]
The indiscrete topology has the minimum possible number of open sets. To check whether this really forces universal continuity into the space, it is enough to ask what the preimages of those two open sets can be, and the next theorem gives the resulting endpoint case.
[quotetheorem:4980]
These extremes show that continuity is not an intrinsic property of a bare function. It is a relation between a function and two topologies.
[example: The Identity Map Can Change Continuity]
Let $X$ be a set with at least two elements. Let $X_d$ denote $X$ with the discrete topology
\begin{align*}
\tau_d&=\mathcal P(X),
\end{align*}
and let $X_i$ denote $X$ with the indiscrete topology
\begin{align*}
\tau_i&=\{\varnothing,X\}.
\end{align*}
First consider the identity map
\begin{align*}
\operatorname{id}:X_d&\to X_i, &
\operatorname{id}(x)&=x.
\end{align*}
To check continuity, let $V$ be open in $X_i$. Since the only open subsets of $X_i$ are $\varnothing$ and $X$, there are two cases. If $V=\varnothing$, then
\begin{align*}
\operatorname{id}^{-1}(V)
&=\{x\in X:\operatorname{id}(x)\in\varnothing\}\\
&=\varnothing.
\end{align*}
If $V=X$, then
\begin{align*}
\operatorname{id}^{-1}(V)
&=\{x\in X:\operatorname{id}(x)\in X\}\\
&=\{x\in X:x\in X\}\\
&=X.
\end{align*}
Both $\varnothing$ and $X$ belong to $\tau_d=\mathcal P(X)$, so $\operatorname{id}^{-1}(V)$ is open in $X_d$ for every open $V\subset X_i$. Hence
\begin{align*}
\operatorname{id}:X_d\to X_i
\end{align*}
is continuous.
Now choose two distinct elements $a,b\in X$, and set
\begin{align*}
A&=\{a\}.
\end{align*}
Then $A$ is nonempty because $a\in A$, and $A\ne X$ because $b\in X$ but $b\notin A$. Since $X_d$ has the discrete topology, every subset of $X$ is open in $X_d$, so $A$ is open in $X_d$.
Consider the identity map in the opposite direction:
\begin{align*}
\operatorname{id}:X_i&\to X_d.
\end{align*}
The preimage of $A$ is
\begin{align*}
\operatorname{id}^{-1}(A)
&=\{x\in X:\operatorname{id}(x)\in A\}\\
&=\{x\in X:x\in A\}\\
&=A.
\end{align*}
But $A$ is neither $\varnothing$ nor $X$, so
\begin{align*}
A&\notin \{\varnothing,X\}=\tau_i.
\end{align*}
Thus the preimage of the open set $A\subset X_d$ is not open in $X_i$, and therefore
\begin{align*}
\operatorname{id}:X_i\to X_d
\end{align*}
is not continuous. The underlying formula $x\mapsto x$ is unchanged; the continuity changes entirely because the domain and codomain topologies change.
[/example]
This example is a useful antidote to formula-based thinking. The formula $x\mapsto x$ did not change; only the topologies changed.
## Homeomorphisms and Topological Equivalence
### Two-Sided Continuity
If continuous functions are the structure-preserving maps of topology, then the isomorphisms are the continuous functions that can be undone continuously. A bijective continuous map is not enough in general, because its inverse may fail to preserve open sets.
The right notion of sameness in topology is therefore stronger than bijection and stronger than one-way continuity. It requires continuity in both directions.
[definition: Homeomorphism]
Let $(X,\tau_X)$ and $(Y,\tau_Y)$ be topological spaces. A function $f:X\to Y$ is a homeomorphism if $f$ is bijective, continuous, and its inverse function $f^{-1}:Y\to X$ is continuous.
[/definition]
Two homeomorphic spaces have the same topological structure. To state which properties survive this kind of sameness, we need the language of invariants.
[definition: Topological Invariant]
A property $P$ of topological spaces is a topological invariant if whenever $X$ and $Y$ are homeomorphic topological spaces, $X$ has property $P$ if and only if $Y$ has property $P$.
[/definition]
Compactness, connectedness, and Hausdorffness are topological invariants because they are preserved and reflected by homeomorphisms. This is why continuity becomes a tool for classification, not only for analysis.
[example: Open Interval and Real Line]
Define
\begin{align*}
f:(-1,1)&\to\mathbb R, &
f(x)&=\frac{x}{1-x^2}.
\end{align*}
The denominator does not vanish on $(-1,1)$, because $-1<x<1$ implies $0\le x^2<1$, hence $1-x^2>0$. Therefore $f$ is continuous on $(-1,1)$ by the usual continuity of polynomial arithmetic and quotients with nonzero denominator.
We now solve explicitly for the inverse. Suppose
\begin{align*}
y&=\frac{x}{1-x^2}.
\end{align*}
Since $1-x^2>0$, multiplying both sides gives
\begin{align*}
y(1-x^2)&=x,\\
y-yx^2&=x,\\
yx^2+x-y&=0.
\end{align*}
If $y\ne 0$, this quadratic equation in $x$ has solutions
\begin{align*}
x&=\frac{-1\pm\sqrt{1+4y^2}}{2y}.
\end{align*}
The root with the minus sign is not in $(-1,1)$: if $y>0$, then
\begin{align*}
\frac{-1-\sqrt{1+4y^2}}{2y}&<0
\end{align*}
and
\begin{align*}
\left|\frac{-1-\sqrt{1+4y^2}}{2y}\right|
&=\frac{1+\sqrt{1+4y^2}}{2y}\\
&>\frac{2y}{2y}\\
&=1,
\end{align*}
while if $y<0$ the same absolute-value computation gives
\begin{align*}
\left|\frac{-1-\sqrt{1+4y^2}}{2y}\right|
&=\frac{1+\sqrt{1+4y^2}}{2|y|}\\
&>\frac{2|y|}{2|y|}\\
&=1.
\end{align*}
Thus the inverse must use the root
\begin{align*}
x&=\frac{-1+\sqrt{1+4y^2}}{2y}.
\end{align*}
Rationalising the numerator,
\begin{align*}
\frac{-1+\sqrt{1+4y^2}}{2y}
&=\frac{(\sqrt{1+4y^2}-1)(\sqrt{1+4y^2}+1)}{2y(\sqrt{1+4y^2}+1)}\\
&=\frac{(1+4y^2)-1}{2y(\sqrt{1+4y^2}+1)}\\
&=\frac{4y^2}{2y(\sqrt{1+4y^2}+1)}\\
&=\frac{2y}{1+\sqrt{1+4y^2}}.
\end{align*}
This formula also gives $x=0$ when $y=0$, matching $f(0)=0$.
Set
\begin{align*}
g(y)&=\frac{2y}{1+\sqrt{1+4y^2}}.
\end{align*}
For $y\ne 0$,
\begin{align*}
|g(y)|
&=\frac{2|y|}{1+\sqrt{1+4y^2}}\\
&<\frac{2|y|}{2|y|}\\
&=1,
\end{align*}
and $g(0)=0$, so $g(y)\in(-1,1)$ for every $y\in\mathbb R$. Since $y\mapsto 1+4y^2$ is continuous, square root is continuous on $[0,\infty)$, and the denominator $1+\sqrt{1+4y^2}$ is always positive, the quotient formula shows that $g$ is continuous on $\mathbb R$.
Finally,
\begin{align*}
f(g(y))&=y
\end{align*}
because $g(y)$ was obtained by solving $y=x/(1-x^2)$ with the unique solution in $(-1,1)$, and
\begin{align*}
g(f(x))&=x
\end{align*}
for every $x\in(-1,1)$ by the same uniqueness. Hence $f$ is bijective with continuous inverse $g$, so $f$ is a homeomorphism. Thus the bounded interval $(-1,1)$ and the unbounded line $\mathbb R$ are topologically the same; boundedness as a subset of $\mathbb R$ is not a topological invariant, while connectedness is.
[/example]
### When Bijective Continuity Suffices
A bijective continuous map can still fail to be a homeomorphism, so a useful theory needs conditions under which inverse continuity is forced. Compact domains and Hausdorff codomains provide exactly such a criterion, because compact sets map to compact sets and compact subsets of Hausdorff spaces behave like closed sets.
[quotetheorem:318]
The theorem is a standard way to prove that a parametrisation is topologically correct. Once compactness, Hausdorffness, bijectivity, and continuity are verified, the inverse continuity comes as a conclusion of the theorem.
[example: A Bijective Continuous Map Whose Inverse is Not Continuous]
Let $X=[0,1)$ with the subspace topology from $\mathbb R$, and let
\begin{align*}
S^1&=\{(u,v)\in\mathbb R^2:u^2+v^2=1\}
\end{align*}
with the subspace topology from $\mathbb R^2$. Define
\begin{align*}
f:X&\to S^1,\\
f(t)&=(\cos(2\pi t),\sin(2\pi t)).
\end{align*}
For every $t\in[0,1)$,
\begin{align*}
\cos^2(2\pi t)+\sin^2(2\pi t)&=1,
\end{align*}
so $f(t)\in S^1$. The coordinate functions $t\mapsto \cos(2\pi t)$ and $t\mapsto \sin(2\pi t)$ are continuous, so the map $t\mapsto(\cos(2\pi t),\sin(2\pi t))$ is continuous as a map into $\mathbb R^2$, and therefore $f$ is continuous as a map into the subspace $S^1$.
We check bijectivity. For surjectivity, let $(u,v)\in S^1$. By the polar parametrisation of the unit circle, there is some $\theta\in[0,2\pi)$ such that
\begin{align*}
u&=\cos\theta, &
v&=\sin\theta.
\end{align*}
Set
\begin{align*}
t&=\frac{\theta}{2\pi}.
\end{align*}
Then $t\in[0,1)$ and
\begin{align*}
f(t)
&=(\cos(2\pi t),\sin(2\pi t))\\
&=(\cos\theta,\sin\theta)\\
&=(u,v).
\end{align*}
Thus $f$ is surjective.
For injectivity, suppose $f(s)=f(t)$ with $s,t\in[0,1)$. Then
\begin{align*}
\cos(2\pi s)&=\cos(2\pi t),\\
\sin(2\pi s)&=\sin(2\pi t).
\end{align*}
Using the cosine difference identity,
\begin{align*}
\cos(2\pi(s-t))
&=\cos(2\pi s)\cos(2\pi t)+\sin(2\pi s)\sin(2\pi t)\\
&=\cos^2(2\pi t)+\sin^2(2\pi t)\\
&=1.
\end{align*}
Since $s,t\in[0,1)$, we have
\begin{align*}
-1<s-t<1,
\end{align*}
and hence
\begin{align*}
-2\pi<2\pi(s-t)<2\pi.
\end{align*}
On the interval $(-2\pi,2\pi)$, the equation $\cos\alpha=1$ holds only at $\alpha=0$. Therefore
\begin{align*}
2\pi(s-t)&=0,
\end{align*}
so $s=t$. Hence $f$ is injective.
Let
\begin{align*}
h:S^1&\to X
\end{align*}
be the inverse function. Then
\begin{align*}
h(1,0)&=0,
\end{align*}
because
\begin{align*}
f(0)&=(\cos 0,\sin 0)\\
&=(1,0).
\end{align*}
Consider the open neighbourhood
\begin{align*}
U&=[0,1/2)
\end{align*}
of $0$ in $X$, since
\begin{align*}
U&=[0,1)\cap(-1/2,1/2).
\end{align*}
If $h$ were continuous at $(1,0)$, then $h^{-1}(U)$ would be a neighbourhood of $(1,0)$ in $S^1$. Thus there would be some $\varepsilon>0$ such that every point of $S^1$ within Euclidean distance $\varepsilon$ of $(1,0)$ lies in $h^{-1}(U)$.
Choose an integer $n$ with
\begin{align*}
n&>\max\left\{2,\frac{2\pi}{\varepsilon}\right\},
\end{align*}
and set
\begin{align*}
t_n&=1-\frac{1}{n}.
\end{align*}
Then $t_n\in[0,1)$ and $t_n>1/2$, so
\begin{align*}
h(f(t_n))&=t_n\notin U.
\end{align*}
But $f(t_n)$ is close to $(1,0)$:
\begin{align*}
f(t_n)
&=\left(\cos\left(2\pi-\frac{2\pi}{n}\right),\sin\left(2\pi-\frac{2\pi}{n}\right)\right)\\
&=\left(\cos\frac{2\pi}{n},-\sin\frac{2\pi}{n}\right).
\end{align*}
Therefore
\begin{align*}
\|f(t_n)-(1,0)\|^2
&=\left(\cos\frac{2\pi}{n}-1\right)^2+\left(-\sin\frac{2\pi}{n}\right)^2\\
&=\cos^2\frac{2\pi}{n}-2\cos\frac{2\pi}{n}+1+\sin^2\frac{2\pi}{n}\\
&=2-2\cos\frac{2\pi}{n}.
\end{align*}
Using $1-\cos a=2\sin^2(a/2)$,
\begin{align*}
2-2\cos\frac{2\pi}{n}
&=4\sin^2\frac{\pi}{n}.
\end{align*}
Since $0<\pi/n<\pi/2$ and $\sin r<r$ for $r>0$,
\begin{align*}
\|f(t_n)-(1,0)\|
&=2\sin\frac{\pi}{n}\\
&<\frac{2\pi}{n}\\
&<\varepsilon.
\end{align*}
So every neighbourhood of $(1,0)$ in $S^1$ contains a point $f(t_n)$ whose inverse value is not in $U$. Hence $h^{-1}(U)$ is not a neighbourhood of $(1,0)$, and $h$ is not continuous at $(1,0)$.
Thus $f$ is a bijective continuous map, but its inverse is not continuous. Bijective continuity alone therefore does not imply topological equivalence.
[/example]
This failure is one reason compactness appears so often beside continuity. The closed interval $[0,1]$ is compact and can be quotient-glued to the circle, while the half-open interval $[0,1)$ carries a boundary defect that the circle cannot remember continuously.
## Beyond and Connected Topics
Continuous functions are the entry point to [topology](/page/Topology), but the concept becomes richer as the spaces acquire more structure. In [metric spaces](/page/Metric%20Space), continuity interacts with [uniform continuity](/page/Uniform%20Continuity), completeness, and compactness. In that setting, open-set continuity agrees with the $\varepsilon$-$\delta$ condition and sequential criteria are often sufficient.
In algebraic topology, continuous maps are the morphisms that induce algebraic data. Homotopy, fundamental groups, covering spaces, and cohomology all begin with the question of when two continuous maps should count as deformable into one another. The quotient and pasting results above are basic tools for constructing maps on spaces built by gluing.
In analysis, continuous functions form spaces such as $C(X)$, $C_b(X)$, and $C_0(X)$. When these are equipped with norms, the same functions become objects of functional analysis. Compactness of the domain often turns pointwise control into uniform control, as in the theory of continuous functions on compact Hausdorff spaces.
On manifolds, continuity is the minimum compatibility condition for maps before differentiability is considered. Smooth maps are continuous maps with additional coordinate-level regularity, and topological invariants help distinguish manifolds before one asks about differentiable structure.
The natural course-level continuations are [Cambridge IB Analysis and Topology](/page/Cambridge%20IB%20Analysis%20and%20Topology) for the foundations of topological spaces and metric continuity, [Cambridge II Algebraic Topology](/page/Cambridge%20II%20Algebraic%20Topology) for spaces built from continuous maps and homotopies, and [Cambridge III Algebraic Topology](/page/Cambridge%20III%20Algebraic%20Topology) for deeper invariants extracted from continuous structure.
## References
Androma, [Topology](/page/Topology).
Androma, [Metric Space](/page/Metric%20Space).
Androma, [Cambridge IB Analysis and Topology](/page/Cambridge%20IB%20Analysis%20and%20Topology).
Androma, [Cambridge II Analysis of Functions](/page/Cambridge%20II%20Analysis%20of%20Functions).
Androma, [Cambridge II Algebraic Topology](/page/Cambridge%20II%20Algebraic%20Topology).
Androma, [Cambridge III Algebraic Topology](/page/Cambridge%20III%20Algebraic%20Topology).
James R. Munkres, *Topology* (2000).
John L. Kelley, *General Topology* (1955).
Allen Hatcher, *Algebraic Topology* (2002).