You should be familiar (at least intuitively) with the definitions of a limit, of a continuous function, and of a real number. Advanced analysis courses define limits and continuity in a general way and follow a rigorous construction of real numbers. We defer this construction until section 3 while still using using ℝ in our examples. As you will see later, there won’t be a circular dependency.

Definition 1.1. A topological space is a pair ( X , T ) where T ∈ P ( X ) is a set of subsets of X , called open sets, such that: X ∈ T , ∅ ∈ T ∀ U α ∈ T ∪ α U α ∈ T ∀ U 1 ∈ T , U 2 ∈ T U 1 ∩ U 2 ∈ T

Let’s start by defining a topology on ℝ .

Example 1.1 (standard topology on ℝ ). We call a subset U ∈ ℝ open if ∀ x ∈ U ∃ ε > 0 , ε ∈ ℝ such that for y ∈ X , | y − x | < ε implies y ∈ U .

Informally speaking, a set is open if for every element of that set it contains all the elements that are “sufficiently close” to that element. Check that a collection of open sets defined above satisfies the axioms of a topological space.

If a topology is defined on a set X , we can define a topology on every subset of X .

Definition 1.2. Let 〈 X , T 〉 be a topological space, Y ⊂ X is a subset of X . Define a topology on Y as follows T Y = { U ∩ Y | U ∈ T } . Then ( Y , T Y ) is a topological space and T Y is called a subspace topology (or induced topology).

Using the axioms of a topological space and the properties of set operations, one can check that subspace topology is indeed a topology. In particular, any subset of ℝ becomes a topological space with a standard topology.

Example 1.2 (discrete topology). For any set X , a discrete topology is a pair ( X , P ( X ) ) where P ( X ) is a power set of X .

In other words, a discrete topology is a set together with all its subsets. It satisfies the axioms of a topological space trivially. Using axiom 2, it’s easy to prove that if all 1-point subsets of a topological space are open, then the topology is discrete, since for every subset U ∈ T we have U = ∪ x ∈ U { x } .

Discrete topology is not a very interesting example, but it’s good to refer to it by a special name when it arises in certain constructions.

Example 1.3. Let ℤ ⊂ ℝ be a set of integers. Standard topology on ℝ induces a discrete topology on ℤ .

A lot of useful examples of topological spaces are created from the following construction:

Definition 1.3. A metric space is a pair ( X , ρ ) where X is a set and ρ : X × X → ℝ is a function, defined on pairs of elements of X such that: ∀ x , y ∈ X ρ ( x , y ) ≥ 0 , and ρ ( x , y ) = 0 if and only if x = y ∀ x , y ∈ X ρ ( x , y ) = ρ ( y , x ) ∀ x , y , z ∈ X ρ ( x , z ) ≤ ρ ( x , y ) + ρ ( y , z )

The quantity ρ ( x , y ) is called distance between x and y , and the function r h o is usually called a metric. Axiom 3 is called a “triangle inequality”.

A familiar example of a metric space is a set of real numbers ℝ with a metric ρ ( x , y ) = | x − y | . Another example is a geometric plane on which ρ is a distance between the points. In these examples, axiom 3 is a usual “triangle inequality”.

Whenever ( X , ρ ) is a metric space, ρ induces a metric on any subset Y ⊂ X . The axioms are satisfied trivially by restricting to Y . Therefore, ( Y , ρ ) is a metric space.

An important set of metrics are various metrics defined on ℝ n = ℝ × ℝ × … × ℝ = { ( x 1 , x 2 , … , x n ) | x i ∈ ℝ } . For x = ( x 1 , x 2 , … , x n ) and y = ( y 1 , y 2 , … , y n ) the following metrics are defined:

L p metric: for p ∈ ℝ , p ≥ 1 , ρ p ( x , y ) = ( | x 1 − y 1 | p + … + | x n − y n | p ) 1 ∕ p

L ∞ metric: ρ ( x , y ) = max ( | x 1 − y 1 | , … , | x n − y n | )

Of course, we need to prove that both L p and L ∞ together with ℝ n satisfy axioms of a metric space.

For each metric space, we can naturally define a topology. In this context, naturally means that this topology is defined the same way for every metric space.

Definition 1.4. Let ( X , ρ ) be a metric space, x ∈ X , ε ∈ ℝ , ε > 0 . An open ball centered at x with a radius ε is a set. B ε ( x ) = { y ∈ X ∣ ρ ( x , y ) < ε }

Definition 1.5. Let ( X , ρ ) be a metric space. A subset U ⊂ X is called open if ∀ x ∈ U ∃ ε ∈ ℝ , ε > 0 such that B ε ( x ) ⊂ U .

Check for yourself that open sets in a metric space are, indeed, open in a topological sense. In other words, a collection of open sets in a metric space define a topology on that metric space with open sets defined as above. In addition, check that open balls are open in the defined topology. If you’re familiar with the definition of open sets from the advanced analysis books (e.g. Rudin), this exercise will help you further see the connection between open sets and open balls. The word “open” means the same thing in the case of both topological and metric spaces. Finally, check that standard topology on ℝ is the same as standard metric-induced topology on ℝ . In other words, check that the topologies consist of precisely the same open sets.

Different metrics can induce the same topology. Here’s an important example

Example 1.4. All L p metrics ( 1 ≤ p ≤ ∞ ) define the same topology on ℝ n

Proof. Pick x , y ∈ ℝ n . We can see that max i | x i − y i | ≤ ( ∑ i | x i − y i | p ) 1 ∕ p ≤ n 1 ∕ p max i | x i − y i | Since: | x j − y j | ≤ max i | x i − y i | And: ∑ i | x i − y i | p ≤ n p max i | x i − y i | . Therefore, we can see that B ε , ρ p ( x ) ⊂ B ε , ρ inf ( x ) ⊂ B ε , n 1 ∕ p ρ p ( x ) Which means that a subset is open in L p metric if and only if it is open in L ∞ metric. □

It’s quite tedious to list all possible open sets to define a topology. Instead mathematicians usually use the following method:

Definition 1.6. A basis ℬ for a set X is a collection of subsets of X such that ∀ V 1 , V 2 ∈ ℬ V 1 ∩ V 2 = ∪ α U α for U α ∈ ℬ . In other words, every intersection of basis elements can be written as a (potentially infinite) union of basis elements. If ℬ is a basis for a set X , then topology, generated by basis ℬ is a set of all subsets of X that can be written as a union of basis elements, as well as X and ∅ .

Check that the construction above indeed defines a topology on X . In a metric space, open balls form a basis for a topology induced by a metric. Moreover, one can take only the open balls up to a fixed radius (say, with ε < 1 ) and both bases define the same exact topology.

Also check that standard topology on R n could be defined using a basis consisting of open intervals ( p , q ) where p , q ∈ ℚ .

Let’s now look at the example where a topology is defined without a metric.

Example 1.5 (triangles on a plane). Let T be a set of triangles on a geometric plane. For our purposes, a triangle is a geometric shape without ordering of vertices. Let’s define a topology on T . We call a subset U ⊂ T open if, roughly speaking, for each triangle, it contains other together “close” to it. To formalize this informal concept, we define, for each triangle Δ ∈ T , a set U ( Δ , ε ) ⊂ T that consists of all triangles Δ ′ such that the following is true: there exists an ordering of vertices for Δ and Δ ′ such that the distances between the vertices with the same indices are less than ε . Check that the set U ( Δ , ε ) ⊂ T form a basis for a set T . This basis defines the topology we were looking for.

Here’s one another simple, but quite useful definition.

Definition 1.7. Let ( X , T ) be a topological space. Subset F ∈ X is called closed if a it’s complement X ∖ F is open.

The following proposition follows directly from the definition above and basic properties of set complement.

Proposition 1.1. Let ( X , T ) be a topological space. Then: X and ∅ are both closed ∀ F 1 , F 2 closed sets, F 1 ∪ F 2 is closed ∀ F α closed sets, ∪ α F α is closed

Definition 1.8. Let ( X , T ) be a topological space, M ⊂ X is an arbitrary subset of X . A closure of M is M ̄ = ∩ F ⊃ M , F is closed F . In other words, the closure of M is a smallest closed set that contains M .

Informally, we can obtain a closure of a set M by adding to it all the points that are “sufficiently closed” to the points of M that are not themselves contained in M . If a set M does not have such points, then M is closed. Formally:

Proposition 1.2. Let ( X , T ) be a topological space, M ⊂ X . Then M ̄ = { x ∈ X ∣ ∀ U ∈ T , x ∈ U , U ∩ M ≠ ∅ }

Proof. Let M ⊂ X . By definition of a closure x ∈ M ̄ means that for every closed subset F ⊂ X , F ⊃ M , we have x ∈ F . By definition of a closed set, we can rewrite the statement above using F = X ∖ U for some open set U . In other words, for every open set U ⊂ X such that U ∩ M = ∅ (since X ∖ U ⊃ M ), we have x ∉ U . Or, equivalently, if U ∋ x then U ∩ M ≠ ∅ . □

Finally, we introduce one more important definition.

Definition 1.9. Let ( X , T ) be a topological space. A neighborhood N x of a point x ∈ X is an open set U ∋ x .

Proposition 1.3. Let ( X , T ) be a topological space. A subset U ⊂ X is open if and only if for every point of U its neighborhood is contained in U .