← Back to GATE Mathematics

Topology

Topological spaces, continuity, compactness, connectedness, separation axioms, and product topology — complete syllabus coverage with rigorous definitions, key theorems, worked examples, and interactive practice.

Topological Spaces Continuity & Homeomorphisms Compactness Connectedness Separation Axioms Product Topology
0 / 6 units completed0%
01
Topological Spaces

A topological space is the most general setting in which we can discuss continuity, convergence, and connectedness. We begin with the axioms that define a topology and explore open sets, closed sets, bases, and subbases.

Definition of a Topology
Definition — Topology A topology on a set $X$ is a collection $\tau \subseteq \mathcal{P}(X)$ satisfying:
  • $\emptyset \in \tau$ and $X \in \tau$.
  • If $\{U_\alpha\}_{\alpha \in I} \subseteq \tau$, then $\bigcup_{\alpha \in I} U_\alpha \in \tau$ (arbitrary unions).
  • If $U_1, U_2, \dots, U_n \in \tau$, then $\bigcap_{i=1}^{n} U_i \in \tau$ (finite intersections).
The pair $(X, \tau)$ is called a topological space, and members of $\tau$ are called open sets.
Definition — Closed Set A subset $C \subseteq X$ is closed if its complement $X \setminus C$ is open, i.e., $X \setminus C \in \tau$.

Common topologies on $\mathbb{R}$:

  • Standard (Euclidean) topology: generated by open intervals $(a,b)$.
  • Discrete topology: $\tau = \mathcal{P}(X)$ — every subset is open.
  • Indiscrete (trivial) topology: $\tau = \{\emptyset, X\}$.
  • Lower-limit (Sorgenfrey) topology: generated by half-open intervals $[a,b)$.
Basis and Subbasis
Definition — Basis A collection $\mathcal{B} \subseteq \tau$ is a basis for the topology $\tau$ if every open set $U \in \tau$ can be written as a union of members of $\mathcal{B}$. Equivalently, for every $x \in U \in \tau$, there exists $B \in \mathcal{B}$ such that $x \in B \subseteq U$.
Theorem — Basis Recognition A collection $\mathcal{B}$ of subsets of $X$ is a basis for some topology on $X$ if and only if: (i) $\mathcal{B}$ covers $X$: $\bigcup_{B \in \mathcal{B}} B = X$; and (ii) for any $B_1, B_2 \in \mathcal{B}$ and any $x \in B_1 \cap B_2$, there exists $B_3 \in \mathcal{B}$ with $x \in B_3 \subseteq B_1 \cap B_2$.
Definition — Subbasis A subbasis $\mathcal{S}$ for a topology on $X$ is any collection of subsets whose union equals $X$. The topology generated by $\mathcal{S}$ has as a basis all finite intersections of members of $\mathcal{S}$.
★ Example
Show that $\mathcal{B} = \{(a,b) : a < b, \; a,b \in \mathbb{Q}\}$ is a basis for the standard topology on $\mathbb{R}$.
Solution: Since $\mathbb{Q}$ is dense in $\mathbb{R}$, for any open interval $(c,d)$ and any $x \in (c,d)$, we can find rationals $a, b$ with $c < a < x < b < d$, so $x \in (a,b) \subseteq (c,d)$. Every open set in the standard topology is a union of open intervals, and every open interval can be written as a union of intervals with rational endpoints. Hence $\mathcal{B}$ generates the standard topology.
Interior, Closure, and Boundary
Definition For $A \subseteq X$:
  • Interior: $\mathrm{int}(A) = \bigcup \{U \in \tau : U \subseteq A\}$ — the largest open set contained in $A$.
  • Closure: $\overline{A} = \bigcap \{C : C \text{ closed}, A \subseteq C\}$ — the smallest closed set containing $A$.
  • Boundary: $\partial A = \overline{A} \setminus \mathrm{int}(A)$.
Theorem $x \in \overline{A}$ if and only if every open set containing $x$ intersects $A$.
02
Continuity & Homeomorphisms

Continuous maps are the natural morphisms between topological spaces. A homeomorphism is a bijective continuous map with continuous inverse — the topological notion of "same shape."

Continuous Maps
Definition — Continuity A function $f: (X, \tau_X) \to (Y, \tau_Y)$ is continuous if $f^{-1}(V) \in \tau_X$ for every $V \in \tau_Y$. That is, the preimage of every open set is open.
Theorem — Equivalent Conditions for Continuity The following are equivalent for $f: X \to Y$:
  • $f$ is continuous (preimage of every open set is open).
  • The preimage of every closed set is closed.
  • For every $A \subseteq X$: $f(\overline{A}) \subseteq \overline{f(A)}$.
  • For every $x \in X$ and every open set $V$ containing $f(x)$, there exists an open set $U$ containing $x$ with $f(U) \subseteq V$.
★ Example
Show that $f: \mathbb{R} \to \mathbb{R}$ defined by $f(x) = x^2$ is continuous in the standard topology.
Solution: It suffices to check that $f^{-1}((a,b))$ is open for every open interval $(a,b)$. If $b \le 0$, then $f^{-1}((a,b)) = \emptyset$, which is open. If $a < 0 \le b$, then $f^{-1}((a,b)) = (-\sqrt{b}, \sqrt{b})$, which is open. If $0 \le a < b$, then $f^{-1}((a,b)) = (-\sqrt{b}, -\sqrt{a}) \cup (\sqrt{a}, \sqrt{b})$, a union of open intervals, hence open. Since open intervals form a basis, $f$ is continuous.
Homeomorphisms
Definition — Homeomorphism A bijection $f: X \to Y$ is a homeomorphism if both $f$ and $f^{-1}$ are continuous. If such an $f$ exists, $X$ and $Y$ are homeomorphic, written $X \cong Y$.
Theorem A continuous bijection from a compact space to a Hausdorff space is a homeomorphism.
★ Example
Show that $(0,1)$ and $\mathbb{R}$ are homeomorphic.
Solution: Consider $f: (0,1) \to \mathbb{R}$ defined by $f(x) = \tan\!\left(\pi x - \frac{\pi}{2}\right)$. This is a bijection (strictly increasing, surjective onto $\mathbb{R}$). Both $f$ and $f^{-1}(y) = \frac{1}{\pi}\arctan(y) + \frac{1}{2}$ are continuous. Hence $(0,1) \cong \mathbb{R}$.
Open and Closed Maps
Definition A map $f: X \to Y$ is an open map if $f(U)$ is open in $Y$ for every open $U$ in $X$. It is a closed map if $f(C)$ is closed in $Y$ for every closed $C$ in $X$.

A homeomorphism is both an open map and a closed map. However, a continuous bijection need not be a homeomorphism — we also need the inverse to be continuous.

03
Compactness

Compactness generalises the properties of closed bounded subsets of $\mathbb{R}^n$. It is one of the most powerful concepts in topology, enabling us to extract finite information from infinite collections.

Definition and Basic Properties
Definition — Compact Space A topological space $X$ is compact if every open cover of $X$ has a finite subcover. That is, if $X = \bigcup_{\alpha \in I} U_\alpha$ with each $U_\alpha$ open, then there exist $\alpha_1, \dots, \alpha_n \in I$ such that $X = U_{\alpha_1} \cup \cdots \cup U_{\alpha_n}$.
Theorem — Heine-Borel A subset of $\mathbb{R}^n$ (with the standard topology) is compact if and only if it is closed and bounded.
Theorem — Properties of Compact Sets
  • A closed subset of a compact space is compact.
  • A compact subset of a Hausdorff space is closed.
  • The continuous image of a compact space is compact.
  • A continuous real-valued function on a compact space attains its maximum and minimum (Extreme Value Theorem).
★ Example
Show that $(0,1)$ is not compact.
Solution: Consider the open cover $\left\{\left(\frac{1}{n}, 1\right) : n \ge 2\right\}$. We have $\bigcup_{n=2}^{\infty}\left(\frac{1}{n}, 1\right) = (0,1)$. However, any finite subcollection $\left\{\left(\frac{1}{n_1}, 1\right), \dots, \left(\frac{1}{n_k}, 1\right)\right\}$ has union $\left(\frac{1}{N}, 1\right)$ where $N = \max(n_1, \dots, n_k)$, which does not cover points in $\left(0, \frac{1}{N}\right]$. Hence no finite subcover exists.
Tychonoff's Theorem
Theorem — Tychonoff The product $\prod_{\alpha \in I} X_\alpha$ (with the product topology) is compact if and only if each $X_\alpha$ is compact. This holds for arbitrary (possibly uncountable) index sets $I$.

Tychonoff's theorem is equivalent to the Axiom of Choice. For finite products, the proof is elementary; the general case requires Zorn's Lemma or the ultrafilter characterisation of compactness.

★ Example
Is $[0,1]^{\mathbb{N}}$ (countable product of unit intervals) compact?
Solution: Yes. Each factor $[0,1]$ is compact (by Heine-Borel). By Tychonoff's theorem, the product $[0,1]^{\mathbb{N}} = \prod_{n=1}^{\infty} [0,1]$ is compact in the product topology.
04
Connectedness

Connectedness captures the idea of a space being "in one piece." We study connected spaces, path-connected spaces, and connected components.

Connected Spaces
Definition — Connected Space A topological space $X$ is connected if it cannot be written as a union of two non-empty disjoint open sets. Equivalently, the only subsets of $X$ that are both open and closed (clopen) are $\emptyset$ and $X$ itself.
Theorem
  • The continuous image of a connected space is connected.
  • $\mathbb{R}$ is connected. More generally, the connected subsets of $\mathbb{R}$ are precisely the intervals.
  • Intermediate Value Theorem (topological version): If $f: X \to \mathbb{R}$ is continuous and $X$ is connected, then $f(X)$ is an interval.
★ Example
Show that $\mathbb{Q}$ (with the subspace topology from $\mathbb{R}$) is not connected.
Solution: Let $A = \mathbb{Q} \cap (-\infty, \sqrt{2})$ and $B = \mathbb{Q} \cap (\sqrt{2}, \infty)$. Since $\sqrt{2} \notin \mathbb{Q}$, we have $\mathbb{Q} = A \cup B$ with $A \cap B = \emptyset$. Both $A$ and $B$ are open in the subspace topology (intersections of open sets in $\mathbb{R}$ with $\mathbb{Q}$) and non-empty. Hence $\mathbb{Q}$ is disconnected.
Path-Connectedness and Components
Definition — Path-Connected $X$ is path-connected if for every $x, y \in X$, there exists a continuous map $\gamma: [0,1] \to X$ with $\gamma(0) = x$ and $\gamma(1) = y$.
Theorem Path-connected $\Rightarrow$ connected. The converse is false in general, but holds in open subsets of $\mathbb{R}^n$.
Definition — Connected Component The connected component of $x \in X$ is the largest connected subset of $X$ containing $x$. Connected components partition $X$ into disjoint closed (but not necessarily open) subsets.
★ Example — Topologist's Sine Curve
The topologist's sine curve $S = \{(x, \sin(1/x)) : x > 0\} \cup \{(0,y) : -1 \le y \le 1\}$ is connected but not path-connected.
Sketch: $S$ is connected because $\{(x, \sin(1/x)) : x > 0\}$ is the continuous image of $(0,\infty)$ (hence connected), and its closure includes the vertical segment. However, no continuous path can connect a point on the vertical segment to a point on the oscillating curve, because the oscillations become infinitely rapid near $x = 0$.
05
Separation Axioms

Separation axioms quantify how well a topology can distinguish points and closed sets. These axioms form a hierarchy from $T_0$ to $T_4$ and beyond.

The Separation Hierarchy
Definitions — Separation Axioms
  • $T_1$ (Fréchet): For any two distinct points $x \ne y$, there exist open sets $U \ni x$ with $y \notin U$ and $V \ni y$ with $x \notin V$. Equivalently, every singleton $\{x\}$ is closed.
  • $T_2$ (Hausdorff): For any two distinct points $x \ne y$, there exist disjoint open sets $U \ni x$ and $V \ni y$ with $U \cap V = \emptyset$.
  • $T_3$ (Regular): $T_1$ and for any closed set $C$ and any point $x \notin C$, there exist disjoint open sets separating $x$ and $C$.
  • $T_4$ (Normal): $T_1$ and for any two disjoint closed sets $C_1, C_2$, there exist disjoint open sets separating $C_1$ and $C_2$.
The hierarchy: $T_4 \Rightarrow T_3 \Rightarrow T_2 \Rightarrow T_1$.
Theorem — Urysohn's Lemma A topological space $X$ is normal ($T_4$) if and only if for every pair of disjoint closed sets $A, B \subseteq X$, there exists a continuous function $f: X \to [0,1]$ with $f(A) = \{0\}$ and $f(B) = \{1\}$.
Theorem Every compact Hausdorff space is normal ($T_4$). Every metrizable space is normal.
★ Example
Show that the cofinite topology on an infinite set $X$ is $T_1$ but not $T_2$.
Solution: $T_1$: For distinct $x, y$, $X \setminus \{y\}$ is open (cofinite) and contains $x$ but not $y$. So singletons are closed and the space is $T_1$.
Not $T_2$: Any two non-empty open sets $U, V$ in the cofinite topology have finite complements. So $U \cap V = X \setminus ((X \setminus U) \cup (X \setminus V))$, which is cofinite (removing finitely many points from $X$), hence non-empty since $X$ is infinite. No two non-empty open sets can be disjoint, so the space is not Hausdorff.
06
Product Topology

The product topology is the natural way to topologize a Cartesian product of spaces, ensuring that projections are continuous and satisfying a universal property.

Finite and Arbitrary Products
Definition — Product Topology Given spaces $\{(X_\alpha, \tau_\alpha)\}_{\alpha \in I}$, the product topology on $\prod_{\alpha \in I} X_\alpha$ is the topology generated by the subbasis $\{\pi_\alpha^{-1}(U_\alpha) : \alpha \in I, \; U_\alpha \in \tau_\alpha\}$, where $\pi_\alpha$ is the projection map. A basis consists of sets $\prod_{\alpha \in I} U_\alpha$ where $U_\alpha = X_\alpha$ for all but finitely many $\alpha$.
Theorem — Universal Property A map $f: Y \to \prod_{\alpha} X_\alpha$ is continuous if and only if $\pi_\alpha \circ f: Y \to X_\alpha$ is continuous for every $\alpha$.

Note: The product topology differs from the box topology (where arbitrary products of open sets are open) for infinite products. The box topology on $\mathbb{R}^{\mathbb{N}}$ is strictly finer and does not satisfy Tychonoff's theorem.

★ Example
Describe a basis for the product topology on $\mathbb{R}^2 = \mathbb{R} \times \mathbb{R}$.
Solution: A basis for the product topology on $\mathbb{R}^2$ consists of all sets of the form $(a,b) \times (c,d)$ where $a < b$ and $c < d$ are real numbers. These are open rectangles with sides parallel to the axes. This generates the standard (Euclidean) topology on $\mathbb{R}^2$.
★ Key Takeaways
✎ Practice Problems
Problem 1
Let $X = \{a, b, c\}$ and $\tau = \{\emptyset, \{a\}, \{a,b\}, X\}$. Verify that $\tau$ is a topology. Find all closed sets. Is the space $T_1$?
Show Solution ▼
$\tau$ satisfies the three axioms (check all unions/intersections). The closed sets (complements of open sets) are $X, \{b,c\}, \{c\}, \emptyset$. The space is not $T_1$ because $\{b\}$ is not closed (its complement $\{a,c\}$ is not in $\tau$).
Problem 2
Prove that $[0,1]$ is compact directly from the definition (without using Heine-Borel).
Show Solution ▼
Let $\{U_\alpha\}$ be an open cover of $[0,1]$. Define $S = \{x \in [0,1] : [0,x] \text{ has a finite subcover from } \{U_\alpha\}\}$. Then $S$ is non-empty ($0 \in U_\alpha$ for some $\alpha$, so some interval $[0,\varepsilon) \subseteq S$). Let $s = \sup S$. Since $s \in U_\beta$ for some $\beta$, we can extend any finite subcover of $[0, s-\delta]$ by adding $U_\beta$ to cover $[0, s+\delta'] \cap [0,1]$ for small $\delta' > 0$. Hence $s = 1$ and $1 \in S$.
Problem 3
Prove that a continuous bijection $f: X \to Y$ is a homeomorphism if $X$ is compact and $Y$ is Hausdorff.
Show Solution ▼
We need to show $f^{-1}$ is continuous, i.e., $f$ is a closed map. Let $C \subseteq X$ be closed. Since $X$ is compact, $C$ is compact (closed subset of a compact space). Since $f$ is continuous, $f(C)$ is compact. Since $Y$ is Hausdorff, compact sets are closed, so $f(C)$ is closed in $Y$. Hence $f$ maps closed sets to closed sets, making $f^{-1}$ continuous.
Problem 4
Let $f: X \to Y$ be continuous and $X$ connected. Prove that if $f$ is surjective, then $Y$ is connected.
Show Solution ▼
Suppose $Y = A \cup B$ with $A, B$ open, disjoint, and non-empty. Then $X = f^{-1}(A) \cup f^{-1}(B)$, where $f^{-1}(A)$ and $f^{-1}(B)$ are open (by continuity), disjoint (since $A \cap B = \emptyset$), and non-empty (since $f$ is surjective). This contradicts the connectedness of $X$.
Problem 5
Show that in the product topology on $\mathbb{R}^\omega = \prod_{n=1}^{\infty} \mathbb{R}$, the set $U = \prod_{n=1}^{\infty}(-1,1)$ is not open, but it is open in the box topology.
Show Solution ▼
In the product topology, a basic open set has the form $\prod_{n=1}^{\infty} U_n$ where $U_n = \mathbb{R}$ for all but finitely many $n$. Since $U = \prod (-1,1)$ requires $U_n = (-1,1) \ne \mathbb{R}$ for all $n$, $U$ does not contain any basic open set, hence $U$ is not open. In the box topology, arbitrary products of open sets are declared open, so $\prod (-1,1)$ is a basic open set.
🎯 Interactive Quiz
1. Which of the following is not a topology on $X = \{1,2,3\}$?
A $\{\emptyset, X\}$
B $\{\emptyset, \{1\}, \{2\}, \{3\}, \{1,2\}, \{1,3\}, \{2,3\}, X\}$
C $\{\emptyset, \{1\}, \{2\}, X\}$
D $\{\emptyset, \{1\}, \{1,2\}, X\}$
2. A subset of $\mathbb{R}^n$ is compact (in the standard topology) if and only if it is:
A Open and bounded
B Closed and bounded
C Closed
D Bounded
3. Which space is connected but not path-connected?
A $[0,1]$
B Topologist's sine curve
C $\mathbb{Q}$
D $\mathbb{R}^2$
4. In a $T_1$ space, which statement is true?
A Every singleton set is closed
B Every pair of distinct points can be separated by disjoint open sets
C Disjoint closed sets can be separated by disjoint open sets
D Every finite set is open
5. Tychonoff's theorem states that the product of compact spaces is compact. This theorem is equivalent to which axiom?
A Continuum Hypothesis
B Axiom of Choice
C Axiom of Regularity
D Axiom of Infinity