# 1.9: Topological Spaces

- Page ID
- 10124

Topology is one of the major branches of mathematics, along with other such branches as algebra (in the broad sense of algebraic structures), and analysis. Topology deals with spatial concepts involving distance, closeness, separation, convergence, and continuity. Needless to say, entire series of books have been written about the subject. Our goal in this section and the next is simply to review the basic definitions and concepts of topology that we will need for our study of probability and stochastic processes. You may want to refer to this section as needed.

## Basic Theory

### Definitions

A topological space consists of a nonempty set \( S \) and a collection \( \mathscr{S} \) of subsets of \( S \) that satisfy the following properties:

- \( S \in \mathscr{S} \) and \( \emptyset \in \mathscr{S} \)
- If \( \mathscr{A} \subseteq \mathscr{S} \) then \( \bigcup \mathscr{A} \in \mathscr{S} \)
- If \( \mathscr{A} \subseteq \mathscr{S} \) and \( \mathscr{A} \) is finite, then \( \bigcap \mathscr{A} \in \mathscr{S} \)

If \( A \in \mathscr{S} \), then \( A \) is said to be open and \( A^c \) is said to be closed. The collection \( \mathscr{S} \) of open sets is a topology on \( S \).

So the union of an arbitrary number of open sets is still open, as is the intersection of a finite number of open sets. The universal set \( S \) and the empty set \( \emptyset \) are both open and closed. There may or may not exist other subsets of \( S \) with this property.

Suppose that \( S \) is a nonempty set, and that \( \mathscr{S} \) and \( \mathscr{T} \) are topologies on \( S \). If \( \mathscr{S} \subseteq \mathscr{T} \) then \( \mathscr{T} \) is finer than \( \mathscr{S} \), and \( \mathscr{S} \) is coarser than \( \mathscr{T} \). *Coarser than* defines a partial order on the collection of topologies on \( S \). That is, if \( \mathscr R, \, \mathscr S, \, \mathscr T \) are topologies on \( S \) then

- \( \mathscr R \) is coarser than \( \mathscr R \), the reflexive property.
- If \( \mathscr R \) is coarser than \( \mathscr S \) and \( \mathscr S \) is coarser than \( \mathscr R \) then \( \mathscr R = \mathscr S \), the anti-symmetric property.
- If \( \mathscr R \) is coarser than \( \mathscr S \) and \( \mathscr S \) is coarser than \( \mathscr T \) then \( \mathscr R \) is coarser than \( \mathscr T \), the transitive property.

A topology can be characterized just as easily by means of closed sets as open sets.

Suppose that \( S \) is a nonempty set. A collection of subsets \( \mathscr{C} \) is the collection of closed sets for a topology on \( S \) if and only if

- \( S \in \mathscr{C} \) and \( \emptyset \in \mathscr{C} \)
- If \( \mathscr{A} \subseteq \mathscr{C} \) then \( \bigcap \mathscr{A} \in \mathscr{C} \).
- If \( \mathscr{A} \subseteq \mathscr{C} \) and \( \mathscr{A} \) is a finite then \( \bigcup \mathscr{A} \in \mathscr{C} \).

## Proof

The set \( \mathscr{S} = \{A^c: A \in \mathscr{C}\} \) must satisfy the axioms of a topology. So the result follows DeMorgan's laws: if \( \mathscr{A} \) is a collection of subsets of \( S \) then \begin{align*} \left(\bigcup \mathscr{A}\right)^c & = \bigcap\{A^c: A \in \mathscr{A}\}\\ \left(\bigcap \mathscr{A}\right)^c & = \bigcup\{A^c: A \in \mathscr{A}\} \end{align*}

Suppose that \( (S, \mathscr{S}) \) is a topological space, and that \( x \in S \). A set \( A \subseteq S \) is a neighborhood of \( x \) if there exists \( U \in \scr S \) with \( x \in U \subseteq A \).

So a neighborhood of a point \( x \in S \) is simply a set with an open subset that contains \( x \). The idea is that points in a small

neighborhood of \( x \) are close

to \( x \) in a sense. An open set can be defined in terms of the neighborhoods of the points in the set.

Suppose again that \( (S, \mathscr{S}) \) is a topological space. A set \( U \subseteq S \) is open if and only if \( U \) is a neighborhood of every \( x \in U \)

## Proof

If \( U \) is open, then clearly \( U \) is a neighborhood of every point \( x \in U \) and clearly satisfies the condition in the theorem. Conversely, suppose that \( U \) is a neighborhood of every \( x \in U \). Then by definition of neighborhood, for every \( x \in U \) there exists an open set \( U_x \) with \( x \in U_x \subseteq U \). But then \( \bigcup_{x \in U} U_x \) is open, and clearly this set is \( U \).

Although the proof seems trivial, the neighborhood concept is how you should think of openness. A set \( U \) is open if every point in \( U \) has a set of nearby points

that are also in \( U \).

Our next three definitions deal with *topological* sets that are naturally associated with a given subset.

Suppose again that \( (S, \mathscr{S}) \) is a topological space and that \( A \subseteq S \). The closure of \( A \) is the set \[ \cl(A) = \bigcap\{B \subseteq S: B \text{ is closed and } A \subseteq B\}\] This is the smallest closed set containing \( A \):

- \( \cl(A) \) is closed.
- \( A \subseteq \cl(A) \).
- If \( B \) is closed and \( A \subseteq B \) then \( \cl(A) \subseteq B \)

## Proof

Note that \( \mathscr{B} = \{B \subseteq S: B \text{ is closed and } A \subseteq B\} \) is nonempty since \( S \in \mathscr{B} \).

- The sets in \( \mathscr{B} \) are closed so \( \bigcap \mathscr{B} \) is closed.
- By definition, \( A \subseteq B \) for each \( B \in \mathscr{B} \). Hence \( A \subseteq \bigcap\mathscr{B} \).
- If \( B \) is closed and \( A \subseteq B \) then \(B \in \mathscr{B}\) so \( \bigcap \mathscr{B} \subseteq B \).

Of course, if \( A \) is closed then \( A = \cl(A) \). Complementary to the closure of a set is the interior of the set.

Suppose again that \( (S, \mathscr{S}) \) is a topological space and that \( A \subseteq S \). The interior of \( A \) is the set \[ \int(A) = \bigcup\{U \subseteq S: U \text{ is open and } U \subseteq A\} \] This set is the largest open subset of \( A \):

- \( \int(A) \) is open.
- \( \int(A) \subseteq A \).
- If \( U \) is open and \( U \subseteq A \) then \( U \subseteq \int(A) \)

## Proof

Note that \( \mathscr{U} = \{U \subseteq S: U \text{ is open and } U \subseteq A\} \) is nonempty since \( \emptyset \in \mathscr{U} \).

- The sets in \( \mathscr{U} \) are open so \( \bigcup \mathscr{U} \) is open.
- By definition, \( U \subseteq A \) for each \( U \in \mathscr{U} \). Hence \( \bigcup \mathscr{U} \subseteq A \).
- If \( U \) is open and \( U \subseteq A \) then \(U \in \mathscr{U}\) so \( U \subseteq \bigcup\mathscr{U} \).

Of course, if \( A \) is open then \( A = \int(A) \). The boundary of a set is the set difference between the closure and the interior.

Suppose again that \( (S, \mathscr{S}) \) is a topological space. The boundary of \( A \) is \( \partial(A) = \cl(A) \setminus \int(A) \). This set is closed.

## Proof

By definition, \( \partial(A) = \cl(A) \cap [\int(A)]^c \), the intersection of two closed sets.

A topology on a set induces a natural topology on any subset of the set.

Suppose that \( (S, \mathscr{S}) \) is a topological space and that \( R \) is a nonempty subset of \( S \). Then \( \mathscr{R} = \{A \cap R: A \in \mathscr{S}\} \) is a topology on \( R \), known as the relative topology induced by \( \mathscr{S} \).

## Proof

First \( S \in \mathscr{S} \) and \( S \cap R = R \), so \( R \in \mathscr{R} \). Next, \( \emptyset \in \mathscr{S} \) and \( \emptyset \cap R = \emptyset \) so \( \emptyset \in \mathscr{R} \). Suppose that \( \mathscr{B} \subseteq \mathscr{R} \). For each \( B \in \mathscr{B} \), select \( A \in \mathscr{S} \) such that \( B = A \cap R \). Let \( \mathscr{A} \) denote the collection of sets selected (we need the axiom of choice to do this). Then \( \bigcup \mathscr{A} \in \mathscr{S} \) and \( \bigcup \mathscr{B} = \left(\bigcup \mathscr{A} \right) \cap R\), so \( \bigcup \mathscr{B} \in \mathscr{R} \). Finally, suppose that \( \mathscr{B} \subseteq \mathscr{R} \) is finite. Once again, for each \( B \in \mathscr{B} \) there exists \( A \in \mathscr{S} \) with \( A \cap R = B \). Let \( \mathscr{A} \) denote the collection of sets selected. Then \( \mathscr{A} \) is finite so \( \bigcap \mathscr{A} \in \mathscr{S} \). But \( \bigcap \mathscr{B} = \left(\bigcap \mathscr{A}\right) \cap R \) so \( \bigcap \mathscr{B} \in \mathscr{R} \).

In the context of the previous result, note that if \( R \) is itself open, then the relative topology is \( \mathscr{R} = \{A \in \mathscr{S}: A \subseteq R\} \), the subsets of \( R \) that are open in the original topology.

### Separation Properties

Separation properties refer to the ability to separate points or sets with disjoint open sets. Our first definition deals with separating two points.

Suppose that \( (S, \mathscr{S}) \) is a topological space and that \( x, \, y \) are distinct points in \( S \). Then \( x \) and \( y \) can be separated if there exist disjoint open sets \( U \) and \( V \) with \( x \in U \) and \( y \in V \). If every pair of distinct points in \( S \) can be separated, then \( (S, \mathscr{S}) \) is called a Hausdorff space.

Hausdorff spaces are named for the German mathematician Felix Hausdorff. There are weaker separation properties. For example, there could be an open set \( U \) that contains \( x \) but not \( y \), and an open set \( V \) that contains \( y \) but not \( x \), but no disjoint open sets that contain \( x \) and \( y\). Clearly if every open set that contains one of the points also contains the other, then the points are indistinguishable from a topological viewpoint. In a Hausdorff space, singletons are closed.

Suppose that \( (S, \mathscr{S}) \) is a Hausdorff space. Then \( \{x\} \) is closed for each \( x \in S \).

## Proof

The definition shows immediately that \( \{x\}^c \) is open: if \( y \in \{x\}^c \), there exists on open set \( V \) with \( y \in V \subseteq \{x\}^c \).

Our next definition deals with separating a point from a closed set.

Suppose again that \( (S, \mathscr{S}) \) is a topological space. A nonempty closed set \( A \subseteq S \) and a point \( x \in A^c \) can be separated if there exist disjoint open sets \( U \) and \( V \) with \( A \subseteq U \) and \( x \in V \). If every nonempty closed set \( A \) and point \( x \in A^c \) can be separated, then the space \( (S, \mathscr{S}) \) is regular.

Clearly if \( (S, \mathscr{S}) \) is a regular space and singleton sets are closed, then \( (S, \mathscr{S}) \) is a Hausdorff space.

### Bases

Topologies, like other set structures, are often defined by first giving some basic sets that should belong to the collection, and the extending the collection so that the defining axioms are satisfied. This idea is motivation for the following definition:

Suppose again that \( (S, \mathscr{S}) \) is a topological space. A collection \( \mathscr{B} \subseteq \mathscr{S} \) is a base for \( \mathscr{S} \) if every set in \( \mathscr{S} \) can be written as a union of sets in \( \mathscr{B} \).

So, a base is a smaller collection of open sets with the property that every other open set can be written as a union of basic open sets. But again, we often want to start with the basic open sets and extend this collection to a topology. The following theorem gives the conditions under which this can be done.

Suppose that \( S \) is a nonempty set. A collection \( \mathscr{B} \) of subsets of \( S \) is a base for a topology on \( S \) if and only if

- \( S = \bigcup \mathscr{B} \)
- If \( A, \, B \in \mathscr{B} \) and \( x \in A \cap B \), there exists \( C \in \mathscr{B} \) with \( x \in C \subseteq A \cap B \)

## Proof

Suppose that \( \mathscr{B} \) is a base for a topology \( \mathscr{S} \) on \( S \). Since \( S \) is open, \( S \) is a union of sets in \( \mathscr{B} \). Since every set in \( \mathscr{B} \) is a subset of \( S \), we must have \( S = \bigcup \mathscr{B} \). Suppose that \( A, \, B \in \mathscr{B} \) and that \( x \in A \cap B \). Since \( A \cap B \) is open, it's a union of sets in \( \mathscr{B} \). The point \( x \) must be in one of those sets, so there exists \( C \in \mathscr{B} \) with \( x \in C \subseteq A \cap B \).

Suppose now that \( \mathscr{B} \) satisfies the two conditions in the theorem. Let \( \mathscr{S} \) be the collection of all unions of sets in \( \mathscr{B} \). Then \( S \in \mathscr{S} \) by condition (a), and \( \emptyset \in \mathscr{S} \) by taking a vacuous union. Suppose that \( U_i \in \mathscr{S} \) for \( i \in I \) where \( I \) is an arbitrary index set. Then for each \( i \in I \), there exists an index set \( J_i \) such that \( U_i = \bigcup_{j \in J_i} B_{i,j} \) where \( B_{i,j} \in \mathscr{B} \) for each \( j \in J_i \). But then \[ \bigcup_{i \in I} U_i = \bigcup_{i \in I} \bigcup_{j \in J_i} B_{i,j} \in \mathscr{S} \] Finally, suppose that \( U, \, V \in \mathscr{S} \). Then there exist index sets \( I \) and \( J \) with \( U = \bigcup_{i \in I} A_i \) and \( V = \bigcup_{j \in J} B_j \) where \( A_i \in \mathscr{B} \) for all \( i \in I \) and \( B_j \in \mathscr{B} \) for all \( j \in J \). Then \[ U \cap V = \bigcup_{i \in I, j \in J} (A_i \cap B_j) \] By condition (b), for each \( i \in I \), \( j \in J \), and \( x \in A_i \cap B_j \) there exists \(C_{x,i,j} \in \mathscr{B}\) with \( x \in C_{x,i,j} \subseteq A_i \cap B_j \). But then clearly \[ U \cap V = \bigcup\{C_{x,i,j}: i \in I, j \in J, x \in A_i \cap B_j\} \in \mathscr{S} \]

Here is a slightly weaker condition, but one that is often satisfied in practice.

Suppose that \( S \) is a nonempty set. A collection \( \mathscr{B} \) of subsets of \( S \) that satisfies the following properties is a base for a topology on \( S \):

- \( S = \bigcup \mathscr{B} \)
- If \( A, \, B \in \mathscr{B} \) then \( A \cap B \in \mathscr{B} \)

Part (b) means that \( \mathscr{B} \) is closed under finite intersections.

### Compactness

Our next discussion considers another very important type of set. Some additional terminology will make the discussion easier. Suppose that \( S \) is a set and \( A \subseteq S \). A collection of subsets \( \mathscr{A} \) of \( S \) is said to cover \( A \) if \( A \subseteq \mathscr{A} \). So the word *cover* simply means a collection of sets whose union contains a given set. In a topological space, we can have open an open cover (that is, a cover with open sets), a closed cover (that is, a cover with closed sets), and so forth.

Suppose again that \( (S, \mathscr{S}) \) is a topological space. A set \( C \subseteq S \) is compact if every open cover of \( C \) has a finite sub-cover. That is, if \( \mathscr{A} \subseteq \mathscr{S} \) with \( C \subseteq \bigcup \mathscr{A} \) then there exists a finite \( \mathscr{B} \subseteq \mathscr{A} \) with \( C \subseteq \bigcup \mathscr{B} \).

So intuitively, a compact set is *compact* in the ordinary sense of the word. No matter how small

are the open sets in the covering of \( C \), there will always exist a finite number of the open sets that cover \( C \).

Suppose again that \( (S, \mathscr{S}) \) is a topological space and that \( C \subseteq S \) is a compact. If \( B \subseteq C \) is closed, then \( B \) is also compact.

## Proof

Suppose that \( \mathscr{A} \) is an open cover of \( B \). Since \( B \) is closed, \( B^c \) is open, so \( \mathscr{A} \cup \{B^c\} \) is an open cover of \( C \). Since \( C \) is compact, this last collection has a finite sub-cover of \( C \), which is also a finite sub-cover of \( B \).

Compactness is also preserved under finite unions.

Suppose again that \( (S, \mathscr{S}) \) is a topological space, and that \( C_i \subseteq S \) is compact for each \( i \) in a finite index set \( I \). Then \( C = \bigcup_{i \in I} C_i \) is compact.

## Proof

Suppose that \( \mathscr{A} \) is an open cover of \( C \). Then trivially, \( \mathscr{A} \) is also an open cover of \( C_i \) for each \( i \in I \). Hence there exists a finite subcover \( \mathscr{A}_i \subseteq \mathscr{A} \) of \( C_i \) for each \( i \in I \). But then \( \bigcup_{i \in I} \mathscr{A}_i \) is also finite and is a covering of \( C \).

As we saw above, closed subsets of a compact set are themselves compact. In a Hausdorff space, a compact set is itself closed.

Suppose that \( (S, \mathscr{S}) \) is a Hausdorff space. If \( C \subseteq S \) is compact then \( C \) is closed.

## Proof

We will show that \( C^c \) is open, so fix \( x \in C^c \). For each \( y \in C \), the points \( x \) and \( y \) can be separated, so there exist disjoint open sets \( U_y \) and \( V_y \) such that \( x \in U_y \) and \( y \in V_y \). Trivially, the collection \( \{V_y: y \in C\} \) is an open cover of \( C \), and hence there exist a finite subset \( B \subseteq C \) such that \( \{V_y: y \in B\} \) covers \( C \). But then \(U = \bigcap_{y \in B} U_y \) is open and is disjoint from \( \bigcup_{y \in B} V_y \). Hence also \( U \) is disjoint from \( C \). So to summarize, \( U \) is open and \( x \in U \subseteq C^c \).

Also in a Hausdorff space, a point can be separated from a compact set that does not contain the point.

Suppose that \( (S, \mathscr{S}) \) is a Hausdorff space. If \( x \in S \), \( C \subseteq S \) is compact, and \( x \notin C \), then there exist disjoint open sets \( U \) and \( V \) with \( x \in U \) and \( C \subseteq V \)

## Proof

Since the space is Hausdorff, for each \( y \in C \) there exist disjoint open sets \( U_y \) and \( V_y \) with \( x \in U_y \) and \( y \in V_y \). The collection \( \{V_y: y \in C\} \) is an open cover of \( C \), and hence there exists a finite set \( B \subset C \) such that \( \{V_y: y \in B\} \) covers \( C \). Thus let \( U = \bigcap_{y \in B} U_y \) and \( V = \bigcup_{y \in B} V_y \). Then \( U \) is open, since \( B \) is finite, and \( V \) is open. Moreover \( U \) and \( V \) are disjoint, and \( x \in U \) and \( C \subseteq V \).

In a Hausdorff space, if a point has a neighborhood with a compact boundary, then there is a smaller, closed neighborhood.

Suppose again that \( (S, \mathscr{S}) \) is a Hausdorff space. If \( x \in S \) and \( A \) is a neighborhood of \( x \) with \( \partial(A) \) compact, then there exists a closed neighborhood \( B \) of \( x \) with \( B \subseteq A \).

## Proof

By (20), there exist disjoint open sets \( U \) and \( V \) with \( x \in U \) and \( \partial(A) \subseteq V \). Hence \( \cl(U) \) and \( \partial(A) \) are disjoint. Let \( B = \cl(A \cap U) \). Note that \( B \) is closed, and is a neighborhood of \( x \) since \( U \) and \( A \) are neighborhoods of \( x \). Moreover, \[ B \subseteq \cl(A) \cap \cl(U) = [A \cup \partial(A)] \cap \cl(U) = [A \cap \cl(U)] \cup [\partial(A) \cap \cl(U)] = A \cap \cl(U) \subseteq A \]

Generally, local properties in a topological space refer to properties that hold on the neighborhoods of a point \( x \in S \).

A topological space \( (S, \mathscr{S}) \) is locally compact if every point \( x \in S \) has a compact neighborhood.

This definition is important because many of the topological spaces that occur in applications (like probability) are not compact, but are locally compact. Locally compact Hausdorff spaces have a number of nice properties. In particular, in a locally compact Hausdorff space, there are arbitrarily small

compact neighborhoods of a point.

Suppose that \( (S, \mathscr{S}) \) is a locally compact Hausdorff space. If \( x \in S \) and \( A \) is a neighborhood of \( x \), then there exists a compact neighborhood \( B \) of \( x \) with \( B \subseteq A \).

## Proof

Since \( S \) is locally compact, there exists a compact neighborhood \( C \) of \( x \). Hence \( A \cap C \) is a neighborhood of \( x \). Moreover, \( \partial(A \cap C) \) is closed and is a subset of \( C \) and hence is compact. From (21), there exists a closed neighborhood \( B \) of \( x \) with \( B \subseteq A \cap C \). Since \( B \) is closed and \( B \subseteq C \), \( B \) is compact. Of course also, \( B \subseteq A \).

### Countability Axioms

Our next discussion concerns topologies that can be countably constructed

in a certain sense. Such axioms limit the size

of the topology in a way, and are often satisfied by important topological spaces that occur in applications. We start with an important preliminary definition.

Suppose that \( (S, \mathscr{S}) \) is a topological space. A set \( D \subseteq S \) is dense if \( U \cap D \) is nonempty for every nonempty \( U \in \mathscr{S} \).

Equivalently, \( D \) is dense if every neighborhood of a point \( x \in S \) contains an element of \( D \). So in this sense, one can find elements of \( D \) arbitrarily close

to a point \( x \in S \). Of course, the entire space \( S \) is dense, but we are usually interested in topological spaces that have dense sets of limited cardinality.

Suppose again that \( (S, \mathscr{S}) \) is a topological space. A set \( D \subseteq S \) is dense if and only if \( \cl(D) = S \).

## Proof

Suppose that \( D \) is dense. Since \( \cl(D) \) is closed, \( [\cl(D)]^c \) is open. If this set is nonempty, it must contain a point in \( D \). But that's clearly a contradiction since \( D \subseteq \cl(D) \). Conversely, suppose that \( \cl(D) = S \). Suppose that \( U \) is a nonempty, open set. Then \( U^c \) is closed, and \( U^c \ne S \). If \( D \cap U = \emptyset \), then \( D \subseteq U^c \). But then \( \cl(D) \subseteq U^c \) so \( \cl(D) \ne S \).

Here is our first countability axiom:

A topological space \( (S, \mathscr{S}) \) is separable if there exists a countable dense subset.

So in a separable space, there is a *countable* set \( D \) with the property that there are points in \( D \) arbitrarily close

to every \( x \in S \). Unfortunately, the term *separable* is similar to *separating points* that we discussed above in the definition of a Hausdorff space. But clearly the concepts are very different. Here is another important countability axiom.

A topological space \( (S, \mathscr{S}) \) is second countable if it has a countable base.

So in a second countable space, there is a countable collection of open sets \( \mathscr{B} \) with the property that every other open set is a union of sets in \( \mathscr{B} \). Here is how the two properties are related:

If a topological space \( (S, \mathscr{S}) \) is second countable then it is separable.

## Proof

Suppose that \( \mathscr{B} = \{U_i: i \in I\} \) is a base for \( \mathscr{S} \), where \( I \) is a countable index set. Select \( x_i \in U_i \) for each \( i \in I \), and let \( D = \{x_i: i \in I\} \). Of course, \( D \) is countable. If \( U \) is open and nonempty, then \( U = \bigcup_{j \in J} U_j \) for some nonempty \( J \subseteq I \). But then \( \{x_j: j \in J\} \subseteq U \), so \( D \) is dense.

As the terminology suggests, there are other axioms of countability (such as *first countable*), but the two we have discussed are the most important.

### Connected and Disconnected Spaces

This discussion deals with the situation in which a topological space falls into two or more separated pieces, in a sense.

A topological space \( (S, \mathscr{S}) \) is disconnected if there exist nonempty, disjoint, open sets \( U \) and \( V \) with \( S = U \cup V \). If \( (S, \mathscr{S}) \) is not disconnected, then it is connected.

Since \( U = V^c \), it follows that \( U \) and \( V \) are also closed. So the space is disconnected if and only if there exists a proper subset \( U \) that is open and closed (sadly, such sets are sometimes called clopen). If \( S \) is disconnected, then \( S \) consists of two pieces \( U \) and \( V \), and the points in \( U \) are not close

to the points in \( V \), in a sense. To study \( S \) topologically, we could simply study \( U \) and \( V \) separately, with their relative topologies.

### Convergence

There is a natural definition for a convergent sequence in a topological space, but the concept is not as useful as one might expect.

Suppose again that \( (S, \mathscr{S}) \) is a topological space. A sequence of points \( (x_n: n \in \N_+) \) in \( S \) converges to \( x \in S \) if for every neighborhood \( A \) of \( x \) there exists \( m \in \N_+ \) such that \( x_n \in A \) for \( n \gt m \). We write \( x_n \to x \) as \( n \to \infty \).

So for every neighborhood of \( x \), regardless of how small

, all but finitely many of the terms of the sequence will be in the neighborhood. One would naturally hope that limits, when they exist, are unique, but this will only be the case if points in the space can be separated.

Suppose that \( (S, \mathscr{S}) \) is a Hausdorff space. If \( (x_n: n \in \N_+) \) is a sequence of points in \( S \) with \( x_n \to x \in S \) as \( n \to \infty \) and \( x_n \to y \in S \) as \( n \to \infty \), then \( x = y \).

## Proof

If \( x \ne y \), there exist disjoint neighborhoods \( A \) and \( B \) of \( x \) and \( y \), respectively. There exist \( k, \, m \in \N_+ \) such that \( x_n \in A \) for all \( n \gt k \) and \( x_n \in B \) for all \( n \gt m \). But then if \( n \gt \max\{k, m\} \), \( x_n \in A \) and \( x_n \in B \), a contradiction.

On the other hand, if distinct points \( x, \, y \in S \) cannot be separated, then any sequence that converges to \( x \) will also converge to \( y \).

### Continuity

Continuity of functions is one of the most important concepts to come out of general topology. The idea, of course, is that if two points are close together in the domain, then the functional values should be close together in the range. The abstract topological definition, based on inverse images is very simple, but not very intuitive at first.

Suppose that \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \) are topological spaces. A function \( f: S \to T \) is continuous if \( f^{-1}(A) \in \mathscr{S} \) for every \( A \in \mathscr{T} \).

So a continuous function has the property that the inverse image of an open set (in the range space) is also open (in the domain space). Continuity can equivalently be expressed in terms of closed subsets.

Suppose again that \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \) are topological spaces. A function \( f: S \to T \) is continuous if and only if \( f^{-1}(A) \) is a closed subset of \( S \) for every closed subset \( A \) of \( T \).

## Proof

Recall that \( f^{-1}(A ^c) = \left[f^{-1}(A)\right]^c \) for \( A \subseteq T \). The result follows directly from the definition and the fact that a set is open if and only if its complement is closed.

Continuity preserves limits.

Suppose again that \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \) are topological spaces, and that \( f: S \to T \) is continuous. If \( (x_n: n \in \N_+) \) is a sequence of points in \( S \) with \( x_n \to x \in S \) as \( n \to \infty \), then \( f(x_n) \to f(x) \) as \( n \to \infty \).

## Proof

Suppose that \( V \subseteq T \) is open and \( f(x) \in V \). Then \( f^{-1}(V) \) is open in \( S \) and \( x \in f^{-1}(V) \). Hence there exists \( m \in \N_+ \) such that \( x_n \in f^{-1}(V) \) for every \( n \gt m \). But then \( f(x_n) \in V \) for \( n \gt m \). So \( f(x_n) \to f(x) \) as \( n \to \infty \).

The converse of the last result is not true, so continuity of functions in a general topological space cannot be characterized in terms of convergent sequences. There are objects like sequences but more general, known as nets, that do characterize continuity, but we will not study these. Composition, the most important way to combine functions, preserves continuity.

Suppose that \( (S, \mathscr{S}) \), \( (T, \mathscr{T}) \), and \( (U, \mathscr{U}) \) are topological spaces. If \( f: S \to T \) and \( g: T \to U \) are continuous, then \( g \circ f: S \to U \) is continuous.

## Proof

If \( A \) is open in \( U \) then \( g^{-1}(A) \) is open in \( T \) and therefore \( f^{-1}\left[g^{-1}(A)\right] = \left(f^{-1} \circ g^{-1}\right)(A) \) is open in \( S \). But \((g \circ f)^{-1} = f^{-1} \circ g^{-1}\).

The next definition is very important. A recurring theme in mathematics is to recognize when two mathematical structures of a certain type are fundamentally the same, even though they may appear to be different.

Suppose again that \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \) are topological spaces. A one-to-one function \( f \) that maps \( S \) onto \( T \) with both \( f \) and \( f^{-1} \) continuous is a homeomorphism from \( (S, \mathscr{S}) \) to \( (T, \mathscr{T}) \). When such a function exists, the topological spaces are said to be homeomorphic.

Note that in this definition, \( f^{-1} \) refers to the inverse function, not the mapping of inverse images. If \( f \) is a homeomorphism, then \( A \) is open in \( S \) if and only if \( f(A) \) is open in \( T \). It follows that the topological spaces are essentially equivalent: any purely topological property can be characterized in terms of open sets and therefore any such property is shared by the two spaces.

*Being homeomorphic* is an equivalence relation on the collection of topological spaces. That is, for spaces \( (S, \mathscr{S}) \), \( (T, \mathscr{T}) \), and \( (U, \mathscr{U}) \),

- \( (S, \mathscr{S}) \) is homeomorphic to \( (S, \mathscr{S}) \) (the reflexive property).
- If \( (S, \mathscr{S}) \) is homeomorphic to \( (T, \mathscr{T}) \) then \( (T, \mathscr{T}) \) is homeomorphic to \( (S, \mathscr{S}) \) (the symmetric property).
- If \( (S, \mathscr{S}) \) is homeomorphic to \( (T, \mathscr{T}) \) and \( (T, \mathscr{T}) \) is homeomorphic to \( (U, \mathscr{U}) \) then \( (S, \mathscr{S}) \) is homeomorphic to \( (U, \mathscr{U}) \) (the transitive property).

## Proof

- The identity function \( I: S \to S \) defined by \( I(x) = x \) for \( x \in S \) is a homeomorphism from the space \( (S, \mathscr{S}) \) to itself.
- If \( f \) is a homoemorphism from \( (S, \mathscr{S}) \) to \( (T, \mathscr{T}) \) then \( f^{-1} \) is a homeomorphism from \( (T, \mathscr{T}) \) to \( (S, \mathscr{S}) \).
- If \( f \) is a homeomorphism from \( (S, \mathscr{S}) \) to \( (T, \mathscr{T}) \) and \( g \) is a homeomorphism from \( (T, \mathscr{T}) \) to \( (U, \mathscr{U}) \), then \( g \circ f \) is a homeomorphism from \( (S, \mathscr{S}) \) to \( (U, \mathscr{U}) \).

Continuity can also be defined *locally*, by restricting attention to the neighborhoods of a point.

Suppose again that \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \) are topological spaces, and that \( x \in S \). A function \( f: S \to T \) is continuous at \( x \) if \( f^{-1}(B) \) is a neighborhood of \( x \) in \( S \) whenever \( B \) is a neighborhood of \( f(x) \) in \( T \). If \( A \subseteq S \), then \( f \) is continuous on \( A \) is \( f \) is continuous at each \( x \in A \).

Suppose again that \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \) are topological spaces, and that \( f: S \to T \). Then \( f \) is continuous if and only if \( f \) is continuous at each \( x \in S \).

## Proof

Suppose that \( f \) is continuous. Let \( x \in S \) and let \( B \) be a neighborhood of \( f(x) \). Then there exists an open set \( V \) in \( T \) with \( f(x) \in V \subseteq B \). But then \( f^{-1}(V) \) is open in \( S \), and \( x \in f^{-1}(V) \subseteq f^{-1}(B) \), so \( f^{-1}(B) \) is a neighborhood of \( x \). Hence \( f \) is continuous at \( x \).

Conversely, suppose that \( f \) is continuous at each \( x \in S \), and suppose that \( V \in \mathscr{T} \). If \( V \) contains no points in the range of \( f \), then \( f^{-1}(V) = \emptyset \in \mathscr{S} \). Otherwise, there exists \( x \in S \) with \( f(x) \in V \). But then \( V \) is a neighborhood of \( f(x) \), so \( U = f^{-1}(V) \) is a neighborhood of \( x \). Let \( y \in U \). Then \( f(y) \in V \) also, so \( U \) is also a neighborhood of \( y \). Hence \( U \in \mathscr{S} \).

Properties that are defined for a topological space can be applied to a subset of the space, with the relative topology. But one has to be careful.

Suppose again that \( (S, \mathscr{S}) \) are topological spaces and that \( f: S \to T \). Suppose also that \( A \subseteq S \), and let \( \mathscr{A} \) denote the relative topology on \( A \) induced by \( \mathscr{S} \), and let \( f_A \) denote the restriction of \( f \) to \( A \). If \( f \) is continuous on \( A \) then \( f_A \) is continuous relative to the spaces \( (A, \mathscr{A}) \) and \( (T, \mathscr{T}) \). The converse is not generally true.

## Proof

Suppose that \( V \in \mathscr{T} \). If \( f(A) \cap V = \emptyset \) then \( f_A^{-1}(V) = \emptyset \in \mathscr{A} \). Otherwise, suppose there exists \( x \in A \) with \( f(x) \in V \). Then \( V \) is a neighborhood of \( f(x) \) in \( T \) so \( f^{-1}(V) \) is a neighborhood of \( x\) in \((S, \mathscr{S}) \). Hence \( f^{-1}(V) \cap A = f_A^{-1}(V) \) is a neighborhood of \( x \) in \( (A, \mathscr{A}) \). Since \( f_A \) is continuous (relative to \( (A, \mathscr{A}) \)) at each \( x \in A \), \( f_A \) is continuous from the previous result.

For a simple counterexample, suppose that \( f \) is not continuous at a particular \( x \in S \). The set \( \{x\} \) has the trivial relative topology \( \{\emptyset, \{x\}\} \), and so \( f \) restricted to \( \{x\} \) is trivially continuous.

### Product Spaces

Cartesian product sets are ubiquitous in mathematics, so a natural question is this: given topological spaces \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \), what is a natural topology for \( S \times T \)? The answer is very simple using the concept of a base above.

Suppose that \( (S, \mathscr{S}) \) and \( (T, \mathscr{T}) \) are topological spaces. The collection \( \mathscr{B} = \{A \times B: A \in \mathscr{S}, B \in \mathscr{T}\} \) is a base for a topology on \( S \times T \), called the product topology associated with the given spaces.

## Proof

Trivially, \( S \times T = \bigcup \mathscr{B} \). In fact \( S \times T \in \mathscr{B} \). Next if \( A \times B \in \mathscr{B} \) and \( C \times D \in \mathscr{B} \), so that \( A, \, C \) are open in \( S \) and \( B, \, D \) are open in \( T \), then \[ (A \times B) \cap (C \times D) = (A \cap C) \times (B \cap D) \in \mathscr{B} \] Hence \( \mathscr{B} \) is a base for a topology on \( S \times T \).

So basically, we want the product of open sets to be open in the product space. The product topology is the smallest topology that makes this happen. The definition above can be extended to very general product spaces, but to state the extension, let's recall how general product sets are constructed. Suppose that \( S_i \) is a set for each \( i \) in a nonempty index set \( I \). Then the product set \(\prod_{i \in I} S_i\) is the set of all functions \(x: I \to \bigcup_{i \in I} S_i\) such that \( x(i) \in S_i \) for \( i \in I \).

Suppose that \( (S_i, \mathscr{S}_i) \) is a topological space for each \( i \) in a nonempty index set \( I \). Then \[ \mathscr{B} = \left\{\prod_{i \in I} A_i: A_i \in \mathscr{S}_i \text{ for all } i \in I \text{ and } A_i = S_i \text{ for all but finitely many } i \in I\right\}\] is a base for a topology on \( \prod_{i \in I} S_i \), known as the product topology associated with the given spaces.

## Proof

The proof is just as before, except for the more complicated notation. Trivially \( \prod_{i \in I} S_i = \bigcup \mathscr{B} \), and \( \mathscr{B} \) is closed under finite intersections.

Suppose again that \( S_i \) is a set for each \( i \) in a nonempty index set \( I \). For \( j \in I \), recall that projection function \( p_j: \prod_{i \in I} S_i \to S_j \) is defined by \( p_j(x) = x(j) \).

Suppose again that \( (S_i, \mathscr{S}_i) \) is a topological space for each \( i \in I \), and give the product spacee \( \prod_{i \in I} S_i \) the product topology. The projection function \( p_j \) is continuous for each \( j \in I \).

## Proof

If \( U \) is open in \( S_j \) then \( p_j^{-1}(U) = \prod_{i \in I} A_i \) where \( A_i = S_i \) for \( i \in I \) with \( i \ne j \), and \( A_j = U \), so clearly this inverse image is open in the product space.

As a special case of all this, suppose that \( (S, \mathscr{S}) \) is a topological space, and that \( S_i = S \) for all \( i \in I \). Then the product space \( \prod_{i \in I} S_i \) is the set of all functions from \( I \) to \( S \), sometimes denoted \( S^I \). In this case, the base for the product topology on \( S^I \) is \[ \mathscr{B} = \left\{\prod_{i \in I} A_i: A_i \in \mathscr{S} \text{ for all } i \in I \text{ and } A_i = S \text{ for all but finitely many } i \in I\right\}\] For \( j \in I \), the projection function \( p_j \) just returns the value of a function \( x: I \to S \) at \( j \): \( p_j(x) = x(j) \). This projection function is continuous. Note in particular that no topology is necessary on the domain \( I \).

## Examples and Special Cases

### The Trivial Topology

Suppose that \( S \) is a nonempty set. Then \( \{S, \emptyset\} \) is a topology on \( S \), known as the trivial topology.

With the trivial topology, no two distinct points can be separated. So the topology cannot distinguish between points, in a sense, and all points in \( S \) are close to each other. Clearly, this topology is not very interesting, except as a place to start. Since there is only one nonempty open set (\( S \) itself), the space is connected, and every subset of \( S \) is compact. A sequence in \( S \) converges to every point in \( S \).

Suppose that \( S \) has the trivial topology and that \( (T, \mathscr{T}) \) is another topological space.

- Every function from \( T \) to \( S \) is continuous.
- If \( (T, \mathscr{T}) \) is a Hausdorff space then the only continuous functions from \( S \) to \( T \) are constant functions.

## Proof

- Suppose \( f: T \to S \). Then\( f^{-1}(S) = T \in \mathscr{T} \) and \( f^{-1}(\emptyset) = \emptyset \in \mathscr{T} \), so \( f \) is continuous.
- Suppose that \( f: S \to T \) is continuous and that \( u, \, v \) are distinct elements in the range of \( f \). There exist disjoint open sets \( U, \, V \in \mathscr{T} \) with \( u \in U \) and \( v \in V \). But \( f^{-1}(U) \) and \( f^{-1}(V) \) are nonempty and so must be \( S \). If \( x \in S \), \( f(x) \in U \) and \( f(x) \in V \), a contradiction.

### The Discrete Topology

At the opposite extreme from the trivial topology, with the smallest collection of open sets, is the discrete topology, with the largest collection of open sets.

Suppose that \( S \) is a nonempty set. The power set \( \mathscr{P}(S) \) (consisting of all subsets of \( S \)) is a topology, known as the discrete topology.

So in the discrete topology, every set is both open and closed. All points are separated, and in a sense, widely so. No point is close to another point. With the discrete topology, \( S \) is Hausdorff, disconnected, and the compact subsets are the finite subsets. A sequence in \( S \) converges to \( x \in S \), if and only if all but finitely many terms of the sequence are \( x \).

Suppose that \( S \) has the discrete topology and that \( (T, \mathscr{S}) \) is another topological space.

- Every function from \( S \) to \( T \) is continuous.
- If \( (T, \mathscr{T}) \) is connected, then the only continuous functions from \( T \) to \( S \) are constant functions.

## Proof

- Trivially, if \( f: S \to T \), then \( f^{-}(U) \in \mathscr{P}(S) \) for \( U \in \mathscr{T} \) so \( f \) is continuous.
- Suppose that \( f: T \to S \) is continuous and that \( x \) is in the range of \( f \). Then \( \{x\} \) is open and closed in \( S \), so \( f^{-1}\{x\} \) is open and closed in \( T \). If \( T \) is connected, this means that \( f^{-1}\{x\} = T \).

### Euclidean Spaces

The standard topologies used in the Euclidean spaces are the topologies built from open sets that you familiar with.

For the set of real numbers \( \R \), let \( \mathscr{B} = \{(a, b): a, \, b \in \R, \; a \lt b\} \), the collection of open intervals. Then \( \mathscr{B} \) is a base for a topology \( \mathscr{R} \) on \( \R \), known as the Euclidean topology.

## Proof

Clearly the conditions for \( \mathscr{B} \) to be a base given above are satisfied. First \( \R = \bigcup \mathscr{B} \). Next, if \( (a, b) \in \mathscr{B} \) and \( (c, d) \in \mathscr{B} \) and \( x \in (a, b) \cap (c, d) \), then \( x \in \left(\max\{a, c\}, \min\{b, d\}\right) \subseteq (a, b) \cap (c, d) \).

The space \( (\R, \mathscr{R}) \) satisfies many properties that are motivations for definitions in topology in the first place. The convergence of a sequence in \( \R \), in the topological sense given above, is the same as the definition of convergence in calculus. The same statement holds for the continuity of a function \( f \) from \( \R \) to \( \R \).

Before listing other topological properties, we give a characterization of compact sets, known as the Heine-Borel theorem, named for Eduard Heine and Émile Borel. Recall that \( A \subseteq \R \) is bounded if \( A \subseteq [a, b] \) for some \( a, \, b \in \R \) with \( a \lt b \).

A subset \( C \subseteq \R \) is compact if and only if \( C \) is closed and bounded.

So in particular, closed, bounded intervals of the form \( [a, b] \) with \( a, \, b \in \R \) and \( a \lt b \) are compact.

The space \( (\R, \mathscr{R}) \) has the following properties:

- Hausdorff.
- Connected.
- Locally compact.
- Second countable.

## Proof

- Distinct points in \( \R \) can be separated by open intervals.
- \( \R \) has no proper subset that is both open and closed.
- If \( A \) is a neighborhood of \( x \in \R \), then there exists \( a, \, b \in \R \) with \( a \lt b \) such that \( x \in [a, b] \subseteq A \). The closed interval \( [a, b] \) is compact.
- The collection \( \mathscr{Q} = \{(a, b): a, \, b \in \Q, \; a \lt b\} \) is a countable base for \( \mathscr{R} \), where as usual, \( \Q \) is the set of rational real numbers.

As noted in the proof, \( \Q \), the set of rationals, is countable and is dense in \( \R \). Another countable, dense subset is \( \D = \{j / 2^n: n \in \N \text{ and } j \in \Z\} \), the set of dyadic rationals (or binary rationals). For the higher-dimensional Euclidean spaces, we can use the product topology based on the topology of the real numbers.

For \( n \in \{2, 3, \ldots\} \), let \( (\R^n, \mathscr{R}_n) \) be the \( n \)-fold product space corresponding to the space \( (\R, \mathscr{R}) \). Then \( \mathscr{R}_n \) is the Euclidean topology on \( \R^n \).

A subset \( A \subseteq \R^n \) is bounded if there exists \( a, \, b \in \R \) with \( a \lt b \) such that \( A \subseteq [a, b]^n \), so that \( A \) fits inside of an \( n \)-dimensional block

.

A subset \( C \subseteq \R^n \) is compact if and only if \( C \) is closed and bounded.

The space \( (\R^n, \mathscr{R}_n) \) has the following properties:

- Hausdorff.
- Connected.
- Locally compact.
- Second countable.