Algebraic Topology for Data Scientists

Michael S. Postol. Ph.D.

August 27, 2024

The MITRE Corporation

All rights reserved.

The author's affiliation with The MITRE Corporation is provided for identification purposes only and is not intended to convey or imply MITRE's concurrence with, or support for, the positions, opinions, or viewpoints expressed by the author.

CHAPTER: ACKNOWLEDGEMENTS

I would like to thank the following people for their help in putting together this book in its current form:

First of all I would like to thank my long time collaborator, Bob Simon, for leading the development of our time series analysis tool (TSAT). This grew out of my interest in the time series discretization algorithm developed by Jessica Lin and Eamonn Keogh. Jessica Lin, gave us a lot of advice on how to use SAX for our novel cybersecurity applications. Candace Diaz has an algebraic topology background and we have had many discussions on current topics in topological data analysis. She was the person who introduced me to the Gidea-Katz work which we applied to extending SAX to the problem of classifying multivariate time series. Drew Wicke did a large portion of the software development part of TSAT and helped in the experiments described in our paper.

In addition to the people listed above, I would also like to thank Liz Munch, Rocio Gonzalez-Diaz, Andrew Blumberg, Emilie Purvine, and Tegan Emerson for helpful conversations. I would like to thank Marian Gidea, Yuri Katz, Eamonn Keogh, Jessica Lin, Ian Witten, Dmitry Cousin, Henry Adams, Liz Munch, Robert Ghrist, Vin de Silva, Greg Friedman, and Frances Sergereart for the use of illustrations from their works. Mary Ann Wymore helped me with the proper formatting and with legal expertise. I apologize for anyone I may have left out from the above list.

Finally, I would like to thank my wife Nadine for her help in pulling together the permissions. I am grateful to her for her support for this effort and all her support in general over the last 26 years.

CHAPTER: INTRODUCTION

This textbook will give a thorough introduction to topological data analysis (TDA), the application of algebraic topology to data science. Algebraic topology was the topic of my Ph.D. dissertation, written 30 years ago at the University of  Minnesota [124, 125]. At the time, the subject was rather theoretical so I have always been intrigued by the idea of having a practical application. Today, there seems to be a growing interest in using topology for data science and machine learning. At the International Conference on Machine Learning Applications held in December 2019, there was a special session in topological data analysis that was filled beyond capacity for the entire session.

Algebraic topology is traditionally a very specialized field of math and most mathematicians have never been exposed to it, let alone data scientists, computer scientists, and analysts. I have three goals in writing this book. The first is to bring people up to speed who are missing a lot of the necessary background. I will describe the topics in point-set topology, abstract algebra, and homology theory needed for a good understanding of TDA. The second is to explain TDA and some current applications and techniques. Finally, I would like to answer some questions about more advanced topics such as cohomology, homotopy, obstruction theory, and Steenrod squares, and what they can tell us about data. It is hoped that readers will have the tools to start to think about these topics and where they might fit in.

One important question is whether TDA gives any information that more conventional techniques don't. Is it just a solution looking for a problem? What are the advantages? I strongly believe that TDA is a good tool to be used in conjunction with other machine learning methods. I am hoping to make that case in this discussion.

So what is the advantage of algebraic topology? First of all it is a classifier. The idea is to classify geometric objects. Roughly, two objects or spaces (more on that term in the next chapter) are equivalent, if it is possible to deform one into the other without tearing or gluing. You may have heard that a topologist has a hard time distinguishing between a donut and a coffee cup. In reality, though, it would be a hollow donut and a covered coffee cup with a hollow handle. (See figure 1.0.1) Another way to picture it, would be a hollow donut vs. a sphere with a hollow handle.

Coffee Cup Turning into a Donut [98]

Can you tell the difference between a line and a plane? One way is to remove a point. The line is now in two pieces but the plane stays connected. But what about a plane and three dimensional space? They are actually quite different, but how do you know? If you remove a point from either, they stay in one piece. When we get to homology, I will show you a very easy way to tell them apart.

Now look at the data set plotted in Figure 1.0.2. It looks like a ring of points, but how does a computer know that? As far as the computer knows, it is just a bunch of disconnected points. As you will see, persistent homology, will easily determine its shape.

Ring of Data Points

Another advantage is that topology is very bad at telling things apart. Think of all the coffee cups that have been mistakenly eaten. In algebraic topology, a circle, a square, and a triangle are pretty much the same thing. What this does for you is to assure you that the differences it detects are pretty significant and it should reduce your false positive rate.

Topological data analysis is easier than ever before to experiment with as there is now a choice of fast and easily accessible software.

Finally, you will learn a whole new collection of math puns to impress your friends. For example, what do you get when you cross an elephant with an ant? The trivial elephant bundle over the ant. If you want to understand that one, keep reading.

In chapters 2 and 3, I will give the necessary background on point-set topology and abstract algebra. If you are already fluent in these, you can skim through these chapters or skip them entirely. Chapter 4 will deal with homology theory in the more traditional way. Although many papers just jump to persistent homology  with half page descriptions, some exposure to more conventional homology theory will put you in a good position both to understand TDA and possibly to extend it. In chapter 5, I will present persistent homology and some of its visualizations such as bar codes, persistence diagrams, and persistence landscapes. I will also describe applications to data in the form of sublevel sets, graphs, and time series. This will include some of my own work on multivariate time series and the application to the classification of internet of things data. In chapter 6, I will discuss some applications such as Q-analysis, sensor coverage, Ayasdi's "mapper" algorithm, simplicial sets, and the dimesnionality reduction algorithm, UMAP. In chapter 7, I will discuss some ideas I have had in the past but never finished on the use of traditional homology. These include simplicial complexes derived from graphs and their potential application to change detection in a time series of graphs. Also, I will describe an idea for using homology for market basket analysis. How do you distinguish between a grocery store shopper who is buying for a large family and one who is single?

In the last part, I will discuss an idea I have for analyzing a cloud of data points using obstruction theory. (Don't worry if you don't know what all or even most the words in this paragraph mean. I will get you there.) Obstruction theory deals with the "extension problem."  If you have a map from a space A to a space Y, and A is a subspace of X, can you extend the map continuously to all of X while keeping its values on A the same as before. Obstruction theory combines cohomology and homotopy theory. So chapter 8 will deal with cohomology. Cohomology's strength is the idea of a "cup product" giving cohomology the structure of a ring. (See chapter 3 for rings.) Chapter 9 will deal with homotopy. Homotopy theory is much easier to describe than homology but computations are extremely difficult. The advantage is that when you can do the computations, you get a lot more information than homology theory gives you. In Chapter 10, I will describe obstruction theory and my ideas for how to apply it to data science. Chapter 11 will deal with Steenrod squares and reduced powers which give cohomology the structure of an algebra. (Again see chapter 3). Finally, Chapter 12 will describe homotopy groups of spheres. This is a problem that has not been completely solved but I feel that the early work that was done in the 1950's and 1960's holds the key to the potential application of obstruction theory to data science.

This is quite an ambitious list, but I hope to make it understandable even if you don't yet have all of the background. The idea is to get you used to the language and the concepts. TDA is a field with a lot of untapped potential so I would like to start you thinking about all of the possibilities for its future.

One final note. Topology is not the same as topographytopography. Topography looks at features of a geographic area while topology deals with the classification of geometric objects. And network topology is an example of a common feature in math: word reuse.

§ NOTE ON THE USE OF THIS BOOK.

The last four chapters of this book contain some very specialized subjects in algebraic topology that even most math Ph.D.'s have never seen. Reading the first 5 chapters will give you a strong background and allow you to read most of the current papers in the subject. Chapters 6 and 7 provide some interesting special topics, and cohomology which is covered in Chapter 8, will allow you to understand RIPSER, a very fast state of the art software package which will allow you to do most computations in topological data analysis.

The last four chapters are what make this book unique. In his 1956 American Mathematical Society Colloquium Lecture [155], Norman Steenrod (my mathematical great-grandfather and someone you will soon hear more about) described his motivation for his construction of Steenrod squares (see Chapter 11). The idea is to encode more of the geometry of a shape into the algebra by introducing additional structure. This allows shapes to be classified when they can't be classified by easier methods.

It seems to me that difficult classification problems in data science should work the same way. The additional structure provided by homotopy groups, obstructions, and Steenrod squares should allow for the solution of harder classification problems.

There are two issues that then need to be addressed. Are these methods tractable and are they useful? I believe that the answer to the first question is that homotopy groups, obstructions, and Steenrod squares are tractable for a range of problems. The question of their usefulness has yet to be answered. I feel. though, that it is important to lay out the issues and let the reader decide if there are problems that could be addressed using these methods. There is already some work in this direction and it could be an interesting research area for the future.

CHAPTER: POINT-SET TOPOLOGY BACKGROUND

What is space? According to the Hitchhiker's Guide to the Galaxy [1], "Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts compared to space."

Actually, there are really only 2 types of spaces: topological spaces and vector spaces. Any others are just special cases of these. The space we live in is really both, so it is a topological vector space. I will deal with topological spaces in this chapter and postpone vector spaces to chapter 3.

Point set topology is concerned with the properties of topological spaces, sets of points with a special class of subsets called open sets. Topological spaces correspond to geometric shapes. Topology describes the properties of geometric shapes we are used to and gives all sorts of examples of strange shapes where things break down. Fortunately in algebraic topology, almost everything we deal with is nicely behaved, and in TDA even more so. A big advantage in TDA is that there are only a finite number of data points, greatly simplifying the theory. By the time someone collects infinitely many samples, I will have plenty of time to revise this book.

Rather than write a text for the usual semester length course, I will just focus on defining the terms and giving some basic properties. One very popular text is Munkres [111]. I will follow the book by Willard [174], the book that I used in college, and most of the material in this chapter is taken from there. In section 2.1, I will describe the basics of sets and functions, mainly so we can agree on notation. I will also briefly discuss, commutative diagrams. At the end, I will define one of the most familiar type of topological space, metric spaces. Section 2.2  will formally define topological spaces. In section 2.3, I will discuss continuous functions which have a much easier description than when you first met them in calculus. Section 2.4 will cover subspaces, product spaces and quotient spaces, all of which will have analogues in abstract algebra as you will see in Chapter 3. Section 2.5 will present the hierarchy of spaces defined by the separation axioms. In Section 2.6, I will do a little more set theory and discuss the difference between countably infinite and uncountable infinite sets. I will conclude with compactness in Section 2.7 and connectedness in Section 2.8, two ideas that will be very important in algebraic topology.

§ SETS, FUNCTIONS, AND METRIC SPACES

§.§ Sets

A setset is just a collection of objects called elements. In point-set topology, the elements are called points. If $a$ is an element of set $A$ we write $a\in A$. Otherwise, we write $a\notin A$. If $A$ and $B$ are sets, we say that $A$ is contained in $B$ or $A\subset B$ if every element of $A$ is also an element of $B$. In this case, $A$ is a subset of $B$.subset  If  $A\subset B$ and $B\subset A$ then A and B have exactly the same elements and $A=B$.

Write $A-B$ for the set of all elements in A that are not in B. If  $B\subset A$, then $A-B$ is the complementcomplement of $B$ in $A$.

Figure 2.1.1 illustrates some of these concepts. Here we show the union of overlapping sets $A$ and $B$ and have a set $C$ such that $C\subset A$. A picture like this is called a Venn Diagram.

Union, Intersection and Set Difference

If $A$ consists of the elements 1, 2, x, cat, dog, and horse, we write $A=\{1, 2, x, cat, dog, horse\}$. A set with no elements is the empty setempty set and is written $\emptyset$ or $\{\}$.

A set $A$ can be an element of another set $B$ or even itself.  $A\in B$ does not mean the same thing as  $A\subset  B$ as in the latter case the elements of $A$ are all elements of $B$ while in the former case $A$ itself is an element of $B$. This leads to a question. Is there a set of all sets? If there is, this leads to Russell's ParadoxRussell's Paradox. If there was a set of all sets, it would have to include the set of all sets that don't contain themselves as an element, ie $Q=\{A|A\notin A\}$. (The vertical bar means "such that".)

The famous analogy is the town with a male barber who shaves every man who doesn't shave himself. In that case, who shaves the barber? A more descriptive example is based on an analogy given in [150]. Suppose there is an island where every inhabitant has a club named after them and every inhabitant is in at least one club. Not everyone, though is in the club named after them. Also, every club is named after someone. Call a person sociable if they are a member of the club named after them and unsociable if they are not. Could there be a club made up of all of the unsociable people? Suppose there were. It would have to be named after someone. If it was the Michael Postol club, I could not be a member as I would be sociable. Then I would not be in the club named after me so I would be unsociable so then I would have to be in the club.

For this reason we don't talk about the set of all sets. Instead, the collection of sets form a category. Category theory deals with collections of things like sets, topological spaces, groups, etc and special maps between them. The proper place to discuss this subject is in the next chapter but category theory and algebraic topology are very closely linked. For now, think about the different types of sets we will learn about (especially in chapter 3) and the things they have in common.

If $A$ and $B$ are sets, then the unionunion $A\cup B$ is the set of elements that are in $A$ or $B$ or both. The  intersectionintersection $A\cap B$ is the set of elements that are in both $A$ and $B$. If $A\cap B=\emptyset$, we say that $A$ and $B$ are disjoint.

For example, if $A=\{1,3,5\}$ and $B=\{5,7,9\}$ then $A\cup B=\{1,3,5,7,9\}$ and $A\cap B=\{5\}$.

Similar definitions apply for more than two and even infinitely many sets where the union denotes elements that are in at least one of the sets and the intersection is the set of elements that are in all of the sets.

Here are some sets that will arise frequently:

\begin{align}
R &: \text{The set of real numbers.}\\
R^n&:  \text{The set of ordered }n\text{-tuples of real numbers.}\\
Z&:  \text{The set of integers }\{\cdots,-2,-1,0,1,2,\cdots\}\\
Z_n&:\text{The set }\{0,1,2,\cdots,n-1\} \text{ of integers modulo }n.\\
Q&: \text{The set of rational numbers}.
\end{align}

§.§ Functions and Relations

A method of building a new set from an old one is to form the (Cartesian) product.

If $X_1$ and $X_2$ are two sets then the Cartesian product Cartesian product (or simply the product) of  $X_1$ and $X_2$ is the set $X_1 \times X_2$ is the set of all ordered pairs $(x_1,x_2)$ such that $x_1 \in X_1$ and $x_2\in X_2$.

When the sets are geometric shapes we can think of the Cartesian product as the shape resulting from putting a copy of one set at every point of the other set. For example, $R^n \times R=R^{n+1}$. As another example, let $I$ be the interval $[0,1]$ and $S^n$ $S^n$be the hollow $n-$sphere defined to be the set of all points $(X_1,\cdots, X_{n+1})$ such that $X_1^2+\cdots+X_{n+1}^2=1$. So $S^1$ is a circle and $S^2$ is the surface of a sphere.Then $S^1 \times I$ is a cylinder and $S^1 \times S^1$ is a torus (a hollow donut). A Moebius strip looks like a cylinder held up close but has a twist in it. Later we will look at Cartesian products with a "twist". These are called fiber bundles. See Figure 2.1.2 for some pictures.

Torus and Cylinder

Moebius Strip

Torus [181], Cylinder[176], and Moebius Strip[178]

A functionfunction $f$ from a set $X$ to a set $Y$ written $f: X\rightarrow Y$ is a subset of $X\times Y$ with the property that for each $x\in X$ there is one and only one $y\in Y$ such that $(x,y)\in f$. In this case, we write $f(x)=y.$

In this above definition, $X$ is the domainfunction: domain of $f$ and $Y$ is the  rangefunction: range of $f$. The image function: image $f(X)$ of $f$ is the set defined to be the set of $y\in Y$ such that $f(x)=y$ for some $x \in X$. If $X=Y$ there is a special function $f:X\rightarrow X$ called the identity functionidentity function. In this case, $f(x)=x$ for all $x\in X$.

If  $f:X\rightarrow Y$ and  $g:Y\rightarrow Z$ then there is a function $gf: X\rightarrow Z$  called the composition of $g$ with $f$ and defined by $gf(x)=g(f(x))$. We can also write it this way.

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

X     Y     Z
(m-1-1) edge node [above] $f$ (m-1-2)
(m-1-2)  edge node [above] $g$ (m-1-3);

For example, if $f(x)=x^2+1$ and $g(x)=\sin(x)$, then $gf(x)=\sin(x^2+1)$.

If $f:X\rightarrow Y$ , we would like a way to undo $f$. To do this, we need two things to happen. First of all, for every $y\in Y$, we need at least one $x\in X$ for it to map to. The second condition is that for every $y\in Y$, we need at most one $x\in X$ for it to map to. The first condition is called onto and the second is called one-to-one.

A function $f$ is one-to-oneone-to-one or injectiveinjective or an injectioninjection if for $x_1, x_2\in X$, if $x_1\neq x_2$ implies $f(x_1)\neq f( x_2)$. A function $f$ is ontoonto or surjectivesurjective or a surjectionsurjection if for any $y\in Y$, there is an $x\in X$ such that $f(x)=y$. In this case, $f(X)=Y$, i.e. the range of $f$ is all of $Y$.

The function $f(x)=x^2$ is not one-to-one since $f(-1)=1=f(1)$. It is also not onto if $Y=R$, since there is no real value of $x$ with $x^2=-1$. But $g(x)=x^3$ is both one-to-one and onto.

A function $f:X\rightarrow Y$  has a (two-sided) inverse $g:Y\rightarrow X$ if $gf=1_X$ and $fg=1_Y$ where $1_X$ is the identity function on $X$. In this case, we write $g=f^{-1}(x)$. So $f^{-1}$ undoes $f$. By our remarks above, a function has an inverse if and only if it is one-to-one and onto.

It is possible for a function to be one-to-one, but not onto. Then it has an inverse function whose domain is the original function's range. An example of this is the function $f(x)=e^x.$ This is one-to-one, but its range is $R^+$, the postitive real numbers as opposed to all of $R$. This function has an inverse $f^{-1}(x)=ln(x)$ , which is only defined on the range $R^+$ of $f$.

Let $X\subset Y$. Then $f: X\rightarrow Y$ is an inclusioninclusion if $f(x)=x$ for all $x\in X$. Then $f$ is obviously one-to-one, but $f$ is only onto if $X=Y$.

Closely related to functions are relations. A relationrelation is any subset of $A\times A$. So a function $F: A\rightarrow A$ is a special type of relation in which the subset can not contain both $(a_1,b_1)$ and $(a_1,b_2)$ for $a_1, b_1, b_2\in A$ as this is saying that $f(a_1)=b_1$ and $f(a_1)=b_2$. There are two types of relations that will be important in what follows. These are equivalence relations and partial orders.

We will define a particular relation between elements in $A$ writing $a\sim b$ if $(a,b)$ is in the relation. Then $\sim$ is an  equvalence relationequvialence relation if the following three properties hold for all $a, b, c\in A$:

* Reflexive: $a\sim a$

* Symmetric: If $a\sim b$ then $b\sim a$

* Transitive: If $a\sim b$ and $b\sim c$ then $a\sim c$.

In this case, if $a\sim b$, we say that $a$ is equivalent to $b$.

Equality between real numbers is an example of an equivalence relation. Congruence of triangles is another. We will meet many more.

We will define a particular relation between elements in $A$ writing $a\leq b$ if $(a,b)$ is in the relation. Then $\leq$ is an  partial orderpartial order if the following three properties hold for all $a, b, c\in A$:

* Reflexive: $a\leq a$

* Antisymmetric: If $a\leq b$ and $b\leq a$, then $a=b$

* Transitive: If $a\leq b$ and $b\leq c$ then $a\leq c$.

Real numbers obviously form a partial order where $\leq$ has the usual meaning. Note that we didn't require that $a\leq b$ or $b\leq a$ for any $a, b\in A$. If this holds, then we have a linear order. The real numbers have a linear order.

An example of a partial order that is not a linear order is the following: Consider subsets of a set $X$. We say that for $A, B\subset X$, we have $A\leq B$ if $A\subset B$. You can easily check that all of the properties hold, but it is possible that neither $A\subset B$ nor $B\subset A$ is true. In  this case, we say that $A$ and $B$ are incomparable.

To conclude this section, I will introduce the idea of a commutative diagramcommutative diagram. If you are an algebraic topologist, you learn to love them.

Consider the following diagram:

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

A     B     C

D     E     F
(m-1-1) edge node [left] $f_1$ (m-2-1)
(m-1-2) edge node [left] $f_2$ (m-2-2)
(m-1-3) edge node [left] $f_3$ (m-2-3)
(m-1-1) edge node [above] $g_1$ (m-1-2)
(m-1-2) edge node [above] $g_2$ (m-1-3)
(m-2-1) edge node [above] $g_3$ (m-2-2)
(m-2-2) edge node [above] $g_4$ (m-2-3)
(m-1-2) edge node [above] $h$ (m-2-3) ;

The vertices represent sets and the arrows are functions between them. As before, following two arrows in succession represents function compostiton. The idea is that no matter what path you take, as long as you are following arrows, you get to the same place. So let $a\in A$. Then we can get to $F$ in several ways, and $g_4g_3f_1(a)$, $g_4f_2g_1(a)$, $f_3g_2g_1(a)$, and $hg_1(a)$ are all the same element of $F$.

§.§ Metric Spaces

In the next section I will finally introduce topological spaces, but here we will start with the most famous special case. A metric space is basically a space with the notion of a distance between two points.

A metric spacemetric space is a set $M$ together with a function $\rho: M\times M\rightarrow R$ such that we have the following for $x,y,z \in M$:

* $\rho(x,y)\geq 0$ and $\rho(x,y)=0$ if and only if $x=y$.

* $\rho(x,y)=\rho(y,x)$

* Triangle Inequality: $\rho(x,y)+\rho(y,z)\geq \rho(x,z)$.

So the first property says that the difference between two points is a positive number unless they are the same point in which it is 0. The second property is that the distance from $x$ to $y$ is the same as the distance from $y$ to $x$. The triangle inequality says that the sum of the lengths of two sides of a triangle is greater than or equal to the length of the third side. They are equal if the three points lie on the same line. An equivalent statement is that the shortest distance between two pints is a straight line.

The function $\rho$ is called a distance or equivalently, a metric.

$M$ is the real numbers where $\rho(x,y)=|x-y|$ for $x,y\in R$.

$M$ is $R^n$. For $x=(x_1, x_2, \cdots, x_n), y=(y_1, y_2, \cdots, y_n)\in R^n$, we have $\rho(x,y)=\sqrt{\sum_{i=1}^n{(x_i-y_i)^2}}$. This is the usual Euclidean metric.

$M$ is $R^2$. For $x=(x_1, x_2), y=(y_1, y_2)$, we have $\rho(x,y)=|x_1-y_1|+|x_2-y_2|$. This is called the taxi cab or  Manhattan distance.

Let $L^p$  for $p$ a positive integer be the set of real valued functions $f$ of a single real variable such that $\int_R |f|^p<\infty$.Then for $f, g\in L^p$ we have the $L^p$ distance $\rho(f,g)=(\int_R |f-g|^p)^\frac{1}{p}$.

The last two examples will serve as opposite extremes when we discuss topological spaces.

The discrete metric space: Let $M$ be any set. For $x, y\in M$ we let $\rho(x,y)=0$ if $x=y$, and let $\rho(x,y)=1$ if $x\neq y$.

You should check that this is an actual metric space. If you lived in this world, everyone would be one unit tall, your commute to work would be one unit, the distance to the sun (assuming you had one) would be one unit, etc. Sort of convenient but as we will see, everything would fall apart and there would be no path from anywhere to anywhere else.

The opposite extreme is the trivial pseudometric space in which $\rho(x,y)=0$ for any $x$ and $y$. This is a pseudometric rather than a metric as property one is violated but properties 2 and 3 still hold.

Finally, given a metric, we have the idea of a ball. This is the set of points whose distance from a center point is  less than or equal to a particular value called the radius.

Let $M$ be a metric space and $x\in M$. The open  ball of radius $\delta$ centered at x written $B_\delta(x)$ is the set of $y\in M$ such that $\rho(x,y)<\delta$. If instead, we have $\rho(x,y)\leq \delta$, the set is called a closed ball and we will write it as $\bar{B}_\delta(x)$.

Note that if $M=R$, then $B_\delta(x)$ is the open interval $(x-\delta, x+\delta)$. If $M=R^2$, then $B_\delta(x)$ is the circle centered at $x$ of radius $\delta$ (without the boundary).

The open balls in a metric space will be an example of the more general concept of a base for a topology. We will explore this further in the next section.

§ TOPOLOGICAL SPACES

We are now ready to define a topological space. This is a set with a special class of subsets called open sets.

A topologytopology on a set $x$ is a collection $\tau$ of subsets of $X$ called the open setsopen set satisfying:

* Any union (finite or infinite) of subsets of $\tau$ belong to $\tau$.

* Any finite intersection of subsets of $\tau$ belong to $\tau$.

* $\emptyset$ and $X$ belong to $\tau$.

The set $X$ together with the topology $\tau$ is called a topological spacetopological space. In algebraic topology, the word space will always mean a topological space unless it is explicitly stated otherwise.

Given two topologies $\tau_1$ and $\tau_2$ on the same set $X$, we say that $\tau_1$ is weaker (smaller, coarser) than $\tau_2$ or equivalently that $\tau_2$ is stronger (larger, finer) than $\tau_1$ if $\tau_1\subset\tau_2$.

Given a nonempty set $X$, the weakest topology is the trivial topologytopology!trivial in which $\tau_1={X, \emptyset}$. At the other extreme is the discrete topologytopology!discrete in which $\tau_2$ consists of every subset of $X$. Obviously  $\tau_1\subset\tau_2$. In fact, the discrete topology is the strongest possible topology on $X$. You should check that both of these satisfy Definition 2.2.1.

Let $M$ be a metric space. Then the metric topology or usual topology consists of sets $G$ which are defined to be open if and only if for any $x\in G$, there exists a real number $\delta>0$ such that $B_\delta(x)\subset G$.

In other words, G is open if for any point in $G$, we can draw an open ball around it that stays in $G$. For example, the open interval $(0, 1)$ is open. Let $x=.1$. Then if we let $\delta=.05$, then $x-\delta=.05$, and $x+\delta=.15$, so the open ball is $(.05, .15)$ and that is contained in $(0,1)$. It should be clear that we can do something similar no matter how close we get to 0 or 1. So $(0,1)$ is open.

We can also see why the union of open sets can be infinite but we needed to specify a finite union. Consider the collection of open intervals $(-\frac{1}{n},\frac{1}{n})$, for $n=1, 2, \cdots$. These are all open, but

The set $\{0\}$ is not open since any open interval containing $0$ will contain points other than $0$.

If $X$ is a topological space, then a subset $F$ is closedclosed set if the complement of $F$ in $X$ is open.

For the rest of this section, you should convince yourself of the truth of the results by drawing pictures. The first one is analogous to the definition of open set and can be shown by looking at complements.

Let $X$ be a topological space and let F be the collection of closed subsets of $X$. Then the following hold:

* Any intersection (finite or infinite) of subsets of F belong to F.

* Any finite union of subsets ofF belong to F.

* $\emptyset$ and $X$ belong to F.

On $R$, closed intervals are closed sets as their complements are open. For intervals, we can make an open interval closed by adding in its boundary. This motivates the following:

If $X$ is a topological space, and $E\subset X$, then the closureclosure of $E$ written $\bar{E}$ is the intersection of all closed subsets of $X$ which contain $E$. By the previous theorem, $\bar{E}$ must also be closed.

If $A\subset B$ then $\bar{A}\subset\bar{B}$.

Closure of subsets in a topological space have the following properties:

* $E\subset\bar{E}$

* $\bar{\bar{E}}=\bar{E}$

* $\overline{A\cup B}=\bar{A}\cup\bar{B}$

* $\bar{\emptyset}=\emptyset$

* $E$ is closed in $X$ if and only if $\bar{E}=E$.

Note that the closure of the intersection is not necessarily the intersection of the closure. Let $A$ be the rationals in $R$ and $B$ be the irrationals in $R$. It turns out that $R=\bar{A}=\bar{B},$ so $\bar{A}\cap\bar{B}=R$, but $A\cap B=\emptyset$, so $\overline{A\cap B}=\bar{\emptyset}=\emptyset$.

You can think of closure as putting in the rest of the boundary of a set. The opposite of that is the interior operation.

If $X$ is a topological space, and $E\subset X$, then the interiorinterior of $E$ written $E^\circ$ is the union of all open subsets of $X$ which are contained in $E$. By the definition of an open set, $E^\circ$ must also be open.

If $A\subset B$ then $A^\circ\subset B^\circ$.

Interiors of subsets in a topological space have the following properties:

* $E\supset E^\circ$

* $E^{\circ\circ}= E^\circ$

* $(A\cap B)^\circ=A^\circ\cap B^\circ$

* $X^\circ=X$

* $G$ is open in $X$ if and only if $G=G^\circ$.

Again let $A$ be the rationals and $B$ be the irrationals. Then $A\cup B=R$, and $R^\circ=R$. But $A^\circ=B^\circ=\emptyset$. So  $(A\cup B)^\circ\neq A^\circ\cup B^\circ$

I alluded to a boundary that is the difference between an open and a closed set. I will now make this precise:

If $X$ is a topological space, and $E\subset X$, then the boundaryboundary or frontierfrontier of $E$ written $Bd(E)$ is the set $Bd(E)=\bar{E}\cap\overline{(X-E)}.$

For any subset $E$ of a topological space $X$:

* $\bar{E}=E\cup Bd(E)$

* $E^\circ=E-Bd(E)$

* $X=E^\circ\cup Bd(E)\cup (X-E)^\circ$

To help you picture these results, consider Figure 2.2.1. The set $E$ consists of the small region including the solid but not the broken line. The closure $\bar{E}$ includes the broken  line as well. The interior $E^\circ$ is everything on the inside but does not include even the solid line. The frontier or boundary $Bd(E)$ is the broken and solid lines together. You should convince yourself of the last few theorems at least in this case.

Closure, Interior, and Frontier(Boundary)

In the remainder of this section, I will briefly discuss neighborhoods and bases. These generalize the open balls in a metric space.

If $X$ is a topological space, and $x\in X$, then a neighborhoodneighborhood of $x$ is a set $U$ which contains an open set $V$ containing $x$. So $U$ is a neighborhood if and only if $x\in U^\circ$. The collection $\textfrak{U}_x$ of all neighborhoods of $x$ is called a  neighborhood systemneighborhood system at $x$.

A neighborhood system can be used to define a topology on $X$.

The neighborhood system $\textfrak{U}_x$ at $x$ in a topological space $X$ has the following properties:

* If $U\in\textfrak{U}_x$, then $x\in U$.

* If $U, V\in\textfrak{U}_x,$ then $U\cap V\in\textfrak{U}_x.$

* If $U\in\textfrak{U}_x$, then there is a $V\in\textfrak{U}_x$ such that $U\in\textfrak{U}_y$ for each $y\in V.$

* If $U\in\textfrak{U}_x$ and $U\subset V$ then $V\in\textfrak{U}_x$.

* A subset $G$ of $X$ is open if and only if $G$ contains a neighborhood of each of its points.

Since any set containing a neighborhood is also a neighborhood, we will limit ourselves to a smaller collection called a neighborhood base.

If $X$ is a topological space, and $x\in X$, then a neighborhood baseneighborhood base at $x$ is a subcollection $\textfrak{B}_x$ taken from the neighborhood system  $\textfrak{U}_x$ having the property that each $U\in\textfrak{U}_x$ contains some $V\in\textfrak{B}_x$. An element  of a neighborhood base is a basic neighborhoodbasic neighbohood

For any topological space, the open neighborhoods of $x$ form a neighborhood base since if $U$ is a neighborhood of $x$, $U^\circ$ must also be one.

For $x$ in a metric space, the open balls $B_\delta(x)$ form a neighborhood base at $x$.

If $X$ has the discrete topology, the set $\{x\}$ is a neighborhood base at $x$ since every subset of $X$ containing $x$ is open and thus a neighborhood of $x$. If $X$ has the trivial topology, the only neighborhood base at any point is $\{X\}$ as $X$ is the only nonempty open set and thus the only neighborhood of any point $X$.

The neighborhood base $\textfrak{B}_x$ at $x$ in a topological space $X$ has the following properties:

* If $V\in\textfrak{B}_x$, then $x\in V$.

* If $U, V\in\textfrak{B}_x,$ then there is a $W\in\textfrak{B}_x$ such that $W\subset U\cap V$.

* If $V\in\textfrak{B}_x$ then there is some $V_0\in\textfrak{B}_x$ such that if $y\in V_0$, then there is some $W\in\textfrak{B}_y$ with $W\subset V$.

* A subset $G$ of $X$ is open if and only if $G$ contains a basic neighborhood of each of its points.

By property 4, a subset $G$ of a metric space $M$ is open if and only if for any $x\in G$, there is a $\delta>0$ such that the open ball $B_\delta(x)\subset G$. This the usual definition of an open set that you may have seen.

The next theorem characterizes some of the concepts we have seen in terms of neighborhood bases.

Let $X$ be a topological space and suppose we have fixed a neighbohood base at each point $x\in X$. Then we have:

* $G\subset X$ is open if and only if $G$ contains a basic neighborhood of each of its points.

* $F\subset X$ is closed if and only if each point $x\notin F$ has a basic neighborhood disjoint from $F$.

* $\bar{E}$ is the set of points $x$ in $X$ such that each basic neighborhood of $x$ meets $E$.

* $E^\circ$ is the set of points $x$ in $X$ such that some basic neighborhood of $x$ is contained in $E$.

* $Bd(E)$ is the set of points $x$ in $X$ such that every basic neighborhood of $x$ meets both $E$ and $X-E$.

A more global version of the above is a base for a topology.

If $X$ is a topological space with topology $\tau$, a basetopology!base for $\tau$ is a collection $\textfrak{B}\subset \tau$, such that $\tau$ is produced by taking all possible unions of elements in  $\textfrak{B}.$

For a metric space $X$,  the open balls $B_\delta(x)$ for $\delta>0$ and $x\in X$ form a base for the usual topology..

The connection with neighborhood bases is that for each $x\in X$, the sets in B which contain $x$ form a neighbohood base at $x$.

Finally, you may see a topology defined in terms of a subbase.

If $X$ is a topological space with topology $\tau$, a subbasetopology!subbase for $\tau$ is a collection $\textfrak{C}\subset \tau$, such that the set of all possible intersections of elements in  $\textfrak{C}$ is a base for $\tau$.

§ CONTINUOUS FUNCTIONS

As we will see in Chapter 3 as well, for each type set we describe, we will look at a privileged function that preserves the key defining property of the set. In abstract algebra, this function that preserves the algebraic structure is called a homomorphism. (Lots more on those later.) For a topological space, the special functions are called continuous.

If you remember continuous functions from calculus but hated epsilons and deltas, I am going to make you very happy. Continuous functions simply preserve the idea of open sets, although in the reverse direction.

Let $X$ and $Y$ be topological spaces and $f: X\rightarrow Y$. Then $f$ is continuouscontinuosus function at $x_0\in X$ if for each neighborhood V of $f(x_0)$ in Y, there is a neighborhood U of $x_0$ in X such that $f(U)\subset V$. We say that $f$ is continuous on $x$ if it is continuous at every point of $X$.

By what we have said about the metric space topology, you should convince yourself that the definition of continuity that you learned in calculus is equivalent to our definition here.

The next theorem gives a much more useful definition of continuity. It is the one we tend to use in practice.

Let $X$ and $Y$ be topological spaces and $f: X\rightarrow Y$. Then the following are equivalent:

* $f$ is continuous.

* for each open set $G$ in $Y$, $f^{-1}(G)$ is open in $X$.

* for each closed set $F$ in $Y$, $f^{-1}(F)$ is closed in $X$

* For each $E\subset X$, $f(\bar{E})\subset\overline{f(E)}$.

The characterization of a continuous function as a function having the property that the inverse image of an open set is open immediately implies the following:

If $X$, $Y$, and $Z$ are topological spaces, and $f:X\rightarrow Y$ and $g: Y\rightarrow Z$ are continuous, then the composition $gf: X\rightarrow Z$ is also continuous.

From now on, the terms function or map between topological spaces will always be assumed to be continuous unless otherwise specified.

Note that for a continuous function, we have not claimed that the image of an open set is always open. For example, let $f$ be a real valued function of one variable defined by $f(x)=0$. It is continuous as the inverse image of any open set containing $0$ is all of $R$, which is also open. The inverse image of an open set not containing $0$ is $\emptyset$ which is also open. But as an example $f(0,1)=\{0\}$ so $f$ takes the open set $(0,1)$ to the closed set$\{0\}$. The maps which preserve open sets in both directions are called homeomorphisms.

Let $X$ and $Y$ be topological spaces and $f: X\rightarrow Y$. Then $f$ is a homeomorphismhomeomorphism if $f$ is continuous, one-to-one, and onto and if $f^{-1}$ is continuous. In this case we say that $X$ and $Y$ are homeomorphic.

Let $X$ and $Y$ be topological spaces and $f: X\rightarrow Y$. Then the following are equivalent:

* $f$ is a homeomorphism.

* A set $G$ is open in $X$ if and only if $f(G)$ is open in $Y$

* A set $F$ is closed in $X$ if and only if $f(F)$ is closed in $Y$

* For each $E\subset X$, $f(\bar{E})=\overline{f(E)}$.

If $X$ and $Y$ are homeomorphic, then from the point of view of topology, they are basically the same object. Note that they may not seem exactly the same. For example, a circle, a square and a triangle are all homeomorphic. But they can be continuously deformed into each other without tearing or gluing anything. (Those terms will be more precise when we discuss connectedness.) The equivalent term for the algebraic objects we will discuss in chapter 3 is isomorphic. The relation of being homeomorphic is an equivalence relation. The main goal of algebraic topology is to classify topological spaces by whether they are homeomorphic to each other. In general, this is a very hard problem.

§ SUBSPACES, PRODUCT SPACES, AND QUOTIENT SPACES

Here are some new topological spaces you can create from old ones. These all have analogues in abstract algebra.

§.§ Subspaces

We get this one almost for free. When is a subset of a topological space another topological space? Always. You just need to define an open set in the right way.

Let $X$ be a topological space with topology $\tau,$ and let $A\subset X$. The collection $\tau^\prime=\{G\cap A|G\in\tau\}$ is a topology for $A$ called the relative topologyrelative topology for $A$. In this case, we call the subset $A$ a subspacesubspace of $X$.

So basically, we get our open sets in $A$ by taking the open sets of $X$ and intersecting them with $A$.

If $A$ is a subspace of a topological space $X$ then:

* $H\subset A$ is open in $A$ if and only if $H=G\cap A$ where $G$ is open in $X$.

* $F\subset A$ is closed in $A$ if and only if $F=K\cap A$ where $K$ is closed in $X$.

* for $E\subset A$, the closure of $E$ in $A$ is the intersection of $A$ with the closure of $E$ in $X$.

* If $x\in A$, then $V$ is a neighborhood of $x$ in $A$ if and only if $V=U\cap A$ where $U$ is a neighborhood of $x$ in $X$.

* If $x\in A$, and $\textfrak{B}_x$ is a neighborhood base at $x$ in $X$, then $\{B\cap A|B\in \textfrak{B}_x\}$ is a neighborhood base at $x$ in $A$.

* If $\textfrak{B}$ is a base for $X$, then $\{B\cap A|B\in \textfrak{B}\}$ is a base for $A$.

Note that we haven't talked about interiors or frontiers. The next example shows why.

Let $X$ be $R^2$ with the usual topology and let $A=E$ be the $x$-axis. Then the interior in $A$ of $E$ is $A$ while the interior in $X$ of $E$ is $\emptyset$, and $A\neq\emptyset\cap A$. It is always true, though that the interior of $E$ in $A$ is contained in the intersection of $A$ and the interior of $E$ in $X$.
In the same case, the frontier of $E$ in $A$ is $\emptyset$ while the frontier of $E$ in $X$ is $A$ and $A\neq\emptyset\cap A$. It is always true, though that the frontier of $E$ in $A$ is contained in the intersection of $A$ and the frontier of $E$ in $X$.

Finally, we mention that when restricted to subspaces, continuous functions stay continuous.

If $f: X\rightarrow Y$ and $A\subset X$, then the restriction of $f$ to $A$ written $f|A$ is the map of $A$ into $Y$ defined by $(f|A)(a)=f(a)$ for every $a\in A$.

If $A\subset X$ and $f:X\rightarrow Y$ is continuous, then $(f|A): A\rightarrow Y$ is continuous.

If $X=A\cup B$, where $A$ and $B$ are both open or both closed in $X$ and if  $f:X\rightarrow Y$ is a function such that both $(f|A)$ and $(f|B)$ are continuous, then $f$ is continuous.

§.§ Product Spaces

We discussed the cartesian product of two sets in Section 2.1.2. We repeat the definition here for reference.

If $X_1$ and $X_2$ are two sets then the Cartesian product Cartesian product (or simply the product) of  $X_1$ and $X_2$ is the set $X_1 \times X_2$ is the set of all ordered pairs $(x_1,x_2)$ such that $x_1 \in X_1$ and $x_2\in X_2$.

We will now loosen up the definition a bit. First of all, we will allow as many of these sets as we want, even infinitely many. For the product of $n$ sets, the product is
$$\prod_{i=1}^n X_i=\{(x_1,\cdots,x_n)\},$$
where $x_i\in X_i$ for $1\leq i\leq n.$ To define the product of infinitely many sets, we use the idea of an index setindex set. An index set is a set $A$ of objects where we have one term for each object in $A$. So here is the most general definition we will use:

Let $X_\alpha$ be a set for each $\alpha\in A$. The Cartesian product Cartesian product (or simply the product) of  the $X_\alpha$ is the set
$$\prod_{\alpha\in A} X_\alpha=\{x: A\rightarrow\bigcup_{\alpha\in A} X_\alpha|x(\alpha)\in X_\alpha {\rm\hspace{2.0 pt}  for\hspace{2.0 pt} each\hspace{2.0 pt}} \alpha\in A\}.$$

So basically, we define a point in the product as a function which picks out one element from each of the sets. In order to do this we need the Axiom of Choice. I won't go into a long discussion of this but informally, suppose you had infinitely many shoes. You could easily pick out one from each pair by just taking all of the left ones. But suppose you had infinitely many pairs of socks. It is not obvious that you could pick out one from each pair as this would keep you busy all morning and every other morning until the end of time. So the Axiom of Choice says that you can pick out one element from each of an infinite collection of sets. If you believe it or if you don't, all of the other axioms of set theory still hold.

The one case where we may be interested in an infinite Cartesian product is when talking about spaces whose points are actually functions. Consider a real valued function of one variable defined on all of $R$. Any such function is a point in the space $R^R$. This is the product of the reals taken infinitely many times, one for each real number. For example, take the function $f(x)=x^2$. If we think of a coordinate for every real number, then the coordinate corresponding to 3 will be $3^2=9$.

It will be helpful in what follows to picture products as finite to understand the results in this section but I will do this in more generality so you can understand the proofs in the paper on template functions that I will discuss in Chapter 6.

Since we are working with topological spaces, we want to know what open sets look like on a product of spaces. To get there we need a couple more terms. The value $x(\alpha)\in X_\alpha$ is usually denoted $x_\alpha$ and called the $\alpha$th coordinate of $X$. The space $X_\alpha$ is the $\alpha$th factor space.

The map $\pi_\beta:\prod X_\alpha\rightarrow X_\beta$ defined by $\pi_\beta(x)=x_\beta$ is called the $\beta$th projection map.

As an example, consider $R^3$ which is the product of the reals with itself three times. The index set $A$ is simply $\{1,2,3\}$. Let $x=(3,-4.5, 100)$ be a point in $R^3$. The three coordinates are $x_1=3$, $x_2=-4.5$, and $x_3=100$. The projection map $\pi_2$ takes a point in $R^3$ to the second coordiante so $\pi_2(3,-4.5, 100)=-4.5.$

Now we are ready to define a topology on a prodcut space.

The Tychonoff topology or product topologyTychonoff topologyproduct topology on $\prod X_\alpha$ is obtained by taking as a base for the open sets the sets of the form $\prod U_\alpha$ where

* $U_\alpha$ is open in $X_\alpha$ for each $\alpha$ in $A$.

* For all but finitely many coordinates, $U_\alpha=X_\alpha.$

In a finite product, we can dispense with the second condition, so open sets are unions of sets of the form $\prod_{i=1}^n U_\alpha$ where  $U_\alpha$ is open in $X_\alpha.$

If $X$ and $Y$ are topological spaces, and $f:X\rightarrow Y$, then $f$ is an open map (closed map)open mapclosed map if for each open (closed) set $A$ in $X$, $f(A)$ is open (closed) in $Y$.

An open map is almost the opposite of a continuous map. For an open map, the image of an open set is open while for a continuous map, the inverse image of an open set is open. If $F$ is one-to-one, onto, and open then $f^{-1}$ is continuous. So a one-to-one, onto, and continuous map is a homeomorphism. The same facts hold for closed maps.

The $\beta$th projection map $\pi_\beta:\prod X_\alpha\rightarrow X_\beta$ is continuous and open but need not be closed.

As an example, consider the graph of $y=\frac{1}{x}$ as a subset of $R^2$, Then $\pi_1$ is the projection onto the x axis. If $G=\{(x,\frac{1}{x})\}$ is this graph, then $G$ is closed in $R^2$, but $\pi_1(G)=(-\infty,0)\cup(0,\infty)$, which is an open set. So in this case $\pi_1:R^2\rightarrow R$ is not closed.

Finally, we have the following:

A map $f:Y\rightarrow\prod X_\alpha$ is continuous if and only if $\pi_\alpha\circ f$ is continuous for each $\alpha\in A$.

In abstract algebra, the analogue of a Cartesian product is a direct product.

§.§ Quotient Spaces

Here is where things will start to get sticky. By that, I mean that topologists love to glue things together. Twists and turns that would shred ordinary paper to pieces are totally legal in topology. In this section I will show you some examples and then define a quotient space (the result of gluing) in general. We will want to know how to define open sets and learn what happens to continuous functions. Also note, that there are analogous quotient objects in algebra. Especially quotient groups will play a vital role in algebraic topology.

Folded Rectangles

Here is an experiment you can try at home. Take a rectangular piece of paper and fold it in the four different ways shown in Figure 2.4.1. In the first example, we glue along both edges and get our old friend the torus. (See Figure 2.1.2.) In the second example, glue the short edges with a twist and leave the long ones alone. This gives a Moebius strip (also shown in Figure 2.1.2.). In the third case. glue the short ends with a twist and the long ones without one. This gives a Klein BottleKlein bottle shown in Figure 2.4.2. If you tried to do this, you would probably have a pretty hard time. A Klein bottle only fits in 4 dimensions, but in 3 dimensions, we can do an immersion. This means that it may intersect itself. So you have to imagine that the narrow tube is not hitting a wall as it comes up on the right. If you walked through a Klein bottle and started on the inside, you would end up on the outside and vice versa.

Klein Bottle [177]

This brings up two excuses for not doing your math homework:

* I put it in a Klein bottle and it fell out.

* I put it in a Klein bottle and a four dimensional dog ate it.

In the last case we have the real projective planereal projective plane. Here we twist both the long and short edges. Again, we have a four dimensional object and we picture a three dimensional immersion called Boy's surfaceBoy's surface in Figure 2.4.3. Another way to make the real projective plane is as follows: Take a (hollow) sphere. Two points on a sphere are antipodal if the lie on a line through the center. So for example, the North Pole and the South Pole are antipodal. Now glue together every pair of antipodal points. Before you get to the Equator, you are fine. For example, just glue the Southern hemisphere to the Northern one. Once you start trying to stick the points on the Equator together, you will have the same trouble (as you would expect.) Projective spaces provide important examples in algebraic topology

Boy's Surface [177]

One final example will be important later. Let $X$ be a topological space and $I=[0,1]$. The it conecone $CX$ of $X$ is the result of taking $X\times I$ and identifying the points $(x,1)$ to a single point. If $X$ is a circle, then $CX$ is an actual cone. Another way of thinking of a cone is to take every point in $X$ and connect it with a straight line to a fixed point outside of $X$. Suppose instead we have two fixed outside points and we connect every point of $X$ to each of them with a straight line. (It is easier to picture if you think of a point above and a point below.) This is  $X\times I$ where the points $(x, 0)$ are all identified and the points $(x,1)$ are all identified. This is called the suspensionsuspension and is written $SX$ or $\Sigma X$. Assuming everything is made of silly putty you can think of a cone as plugging up holes and a suspension as raising the dimension of a sphere by one. So you can flatten a cone to be a filled in circle or deform a suspension of a circle to be a sphere. Figure 2.4.4 helps illustrate this where the top or bottom half is a cone and the entire object is a suspension of a circle. (Two ice cream cones stuck together at their open ends).

Suspension of a Circle [180]

In practice we do the gluing by taking the original space to the new one with a function that is onto but not one-to-one as points we want to identify will be sent to the same place as each other. We define the topology on the new space in a way which makes this map continuous. The new space will be called the quotient space.

If $X$ is topological space, $Y$ is a set, and $g:X\rightarrow Y$ is an onto mapping, then $G$ is defined to be open in $Y$ if and only if $g^{-1}(G)$ is open in $X$. The topology on $Y$ induced by $g$ and defined in this manner is called the quotient topologyquotient topology and $Y$ is called a quotient spacequotient space of $X$. The map $g$ is called a quotient mapquotient map.

Now suppose $Y$ was already a topological space. Are open sets in $Y$ the same as those defined in the quotient topology? If $g$ is continuous, then an open set in the original topology has to be open in the quotient topology by definition. To go the other way, we need $g$ to be open or closed.

§ SEPARATION AXIOMS

The separation algorithms form a hierarchy among topological spaces. They are classified by how well open sets can separate points in these spaces. The classification is denoted by the names $T_0, T_1, T_2, T_3,$ and $T_4$. In this section, I will define these types and show the relationships between them. I will also give some examples of weird spaces that fulfill some but not all of the conditions. This will help make sure you understand the concepts. Also, imagining weird spaces is part of the fun of point-set topology or point-set pathology as it is nicknamed. If you want to see more of these, I refer you to [154]. The material in this section is taken from there as well as from [174]. Note that in algebraic topology, we almost always deal with spaces that are $T_2$. In data science applications, the spaces we deal with will always be $T_4$.

A topological space $X$ is $T_0$$T_0$  if whenever $x$ and $y$ are distinct points in $X$, there is an open set containing one and not the other.

A space with at least two points having the trivial topology is not even $T_0$. The only nonempty open set is the entire space which has to contain both of these points.

A topological space $X$ is $T_1$$T_1$  if whenever $x$ and $y$ are distinct points in $X$, there is an open set containing each one and not the other.

This example will illustrate the difference between $T_0$ and $T_1$. Let $X=\{a,b\}$ be a space consisting of two points and suppose that the opens sets are $\tau=\{X,\emptyset,\{a\}\}$. (Check that this satisfies the definition of a topology.) Then $X$ is $T_0$ since there is an open set containing $a$ and not $b$, namely $\{a\}$. But  $\{b\}$ is not open (note that it is closed though being the complement of $\{a\}$.) The smallest open set containing $b$ is all of $X$ which also contains $a$. So $X$ is $T_0$ but not $T_1$

It should be obvious that any $T_1$ space is $T_0$. Here is an interesting fact about $T_1$ spaces. I will provide the proof which is short and instructive.

The following are equivalent for a topological space $X$:

* $X$ is $T_1$

* Each one point set in $X$ is closed.

* Each subset of $X$ is the intersection of the open sets containing it.

$(1)\Rightarrow (2)$: If $X$ is $T_1$ and $x\in X$ then each $y\neq x$ is contained in an open set disjoint from $x$, so $X-\{x\}$ is a union of open sets and thus open. So $x$ is closed.

$(2)\Rightarrow (3)$: If $A\subset X$ then $A$ is the intersection of all sets of the form $X-\{x\}$ for $x\notin A$. Each of these is open since one point sets are closed.

$(3)\Rightarrow (1)$: If (3) holds then $\{x\}$ is the intersection of all open sets containing it, so for any $y\neq x$, there is an open set containing $x$ and not $y$. $\blacksquare$

The next level is $T_2$. Another name for a $T_2$ space is a Hausdorff space. I will feel free to use the two terms interchangeably. In algebraic topology, we work almost exclusively with Hausdorff spaces. They were named after Felix Hausdorff, whose 1914 book Set Theory was the first textbook on point-set topology. The original version is in German, but see [64] for an English translation.

A topological space $X$ is $T_2$ or Hausdorff $T_2$Hausdorff  if whenever $x$ and $y$ are distinct points in $X$, there are disjoint open subsets $U$ and $V$ of $X$ such that $x\in U$ and $y\in V$.

Any metric space $M$ is Hausdorff. Let $x$ and $y$ be in $X$ and let $\rho(x,y)=\delta$. (Recall that  $\rho(x,y)$ is the distance between $x$ and $y$. Then letting $U(x,\epsilon)$ be an open ball centered at $x$ of radius $\epsilon$, we have that $U(x,\delta/2)$ and $U(y,\delta/2)$ are disjoint open sets containing $x$ and $y$ respectively.

It should be obvious that a Hausdorff space is $T_1$, but there are $T_1$ spaces that are not Hausdorff as the next example shows.

Let $X$ be an infinite set with the cofinite topologytopology!cofinite. In this topology, open sets are those whose complements are finite, i.e. the complements of open sets have finitely many points. We also add in $X$  and $\emptyset$. (Check that this satisfies the definition of a topology.) This means that the closed sets are the finite subsets of $X$, with the exception of $X$ itself.  Then one point sets are closed so by Theorem 2.5.1, $X$ is $T_1$. But $X$ is not $T_2$. Now it is a fact that the complement of an intersection of two sets is a union of their complements. (Try to prove this or convince yourself using a Venn diagram.) So if $U$ and $V$ are open sets and $U\cap V=\emptyset$, then the union of their complements is all of $X$. But this is impossible since $X-U$ and $X-V$ are both finite, but $X$ is infinite. Thus, $X$ is not $T_2$.

* Every subspace of a $T_2$ space is $T_2$.

* A nonempty product space is $T_2$ if and only if each factor is $T_2$.

* Quotients of $T_2$ spaces need not be $T_2$.

Things are even worse then part 3 of the previous theorem. A continuous open image of a Hausdorff space need not be Hausdorff. Let $A$ consist of the two horizontal lines in $R^2$, $y=0$ and $y=1$. Let $f:A\rightarrow B$ be a quotient map which identifies $(x,0)$ and $(x,1)$ for $x\neq 0$. So every point on the lower line except for $(0,0)$  is glued to the point directly above it. Then the space $B$ is one line except that the points $(0,0)$ and $(0,1)$ are still separated. But any open neighborhood containing one of these points has to intersect any open neighborhood containing the other. So $B$ is not Hausdorff.

For our next trick, we will try to replace points by arbitrary closed sets and separate them.

A topological space $X$ is regularregular  if whenever $A$ is closed in $X$, and $x\notin A$, there are disjoint open subsets $U$ and $V$ of $X$ such that $x\in U$ and $A\subset V$. A regulat $T_1$ space is called a $T_3$ $T_3$space.

Note that we have not entirely preserved our hierarchy. A regular space is not necessarily Hausdorff. For example, let $X$ have the trivial topology. Let $A=\emptyset$ and $x\in X$. Then since $A$ is empty, $x\notin A$. Let $U=X$ and $V=A$. Then $U$ and $V$ are both open, $x\in U$, $A\subset V$, and $U\cap V=\emptyset$. So $X$ is regular. (Note that we have not insisted that $A$ is a proper subset of $V$ and in general we won't as we describe separation axioms.) $X$ is obviously not Hausdorff as the only open set which contains $x$ or $y$ in $X$ is all of $X$. So a regular space need not be Hausdorff.

To fix this, we defined a $T_3$ $T_3$space to be a regular $T_1$ space. Then since we saw that in a $T_1$ space, one point sets are closed, we automatically get that a $T_3$ set is Hausdorff ($T_2$). So it is important to remember that $T_2$ and Hausdorff mean the same thing, but $T_3$ and regular do not.

Not every $T_2$ space is $T_3$. Let $X$ be the real line with neighborhoods of nonzero points as in the usual topology, but neighborhoods of $0$ are in the form $U-A$ where $U$ is a neighborhood of 0 in the usual topology and
$$A=\{1/n|n=1, 2, \cdots\}.$$
Then $X$ is obviously Hausdorff (draw small enough balls around $x$ and $y$). But $X$ is not $T_3$ since $A$ is closed in $X$, but can't be separated from $0$ by disjoint open sets.

The next two theorems state some properties of regular spaces.

The following are equivalent for a topological space $X$:

* $X$ is regular.

* If $U$ is open in $X$ and $x\in U$, then there is an open set $V$ containing $x$ such that $\overline{V}\subset U$.

* Each $x\in X$ has a neighborhood base consisting of closed sets.

* Every subspace of a regular ($T_3$) space is regular ($T_3)$.

* A nonempty product space is regular  ($T_3$) if and only if each factor space is regular ($T_3)$.

* Quotients of $T_3$ spaces need not be regular.

At the next level, we can start to talk about separation with the use of real valued functions. This will eventually lead to our first result on extending continuous functions. I will get much more into this when I talk about obstruction theory.

A topological space $X$ is completely regularcompletely regular  if whenever $A$ is closed in $X$, and $x\notin A$, there is a continuous function $f: X\rightarrow I$ such that $f(x)=0$ and $f(A)=1$. (Recall that $I=[0,1]$ is the closed unit interval.) Equivalently, we can find a continuous function  $f: X\rightarrow R$ such that $f(x)=a$ and $f(A)=b$, wher $a$ and $b$ are real numbers with $a\neq b$. Any such function $f$ is said to separate $A$ and $x$. A completely regular $T_1$ space is called a Tychonoff spaceTychonoff space.

Note that completely regular spaces are regular. If $A$ is closed, $x\notin A$, and  $f: X\rightarrow I$ such that $f(x)=0$ and $f(A)=1$, then $f^{-1}([0,\frac{1}{2}))$ and $f^{-1}((\frac{1}{2},1])$ are disjoint open sets containing $x$ and $A$ respectively.

Since the symbol $T_4$ is used for normal spaces, which we will cover next, some books refer to Tychonoff spaces as $T_{3\frac{1}{2}}$$T_{3\frac{1}{2}}$ spaces.

Every metric space is Tychonoff. Let $X$ be a metric space with distance function $\rho$, $A$ be closed in $X$, and $x\notin A$. For $y\in X$, let $f(y)=\rho(y,A)=\min_{a\in A}\rho(y,a)$. Then $f$ is a continuous function from $A$ to $R$, $f(A)=0$, and $f(x)>0.$ Thus, $X$ is Tychonoff.

* Every subspace of a completely regular (Tychonoff) space is completely regular (Tychonoff).

* A nonempty product space is completely regular  (Tychonoff) if and only if each factor space is completely regular (Tychonoff).

* Quotients of Tychonoff spaces need not be regular or even $T_2$.

Here is a result that is useful in homotopy theory,

A topological space is a Tychonoff space if and only if  it is homeomorphic to a subspace of some cube. (Here a cubecube is a product of copies of I.)

I will stop at the fourth level of our heirarchy, normal spaces. These are the logical next step but much less well behaved. Even subspaces of normal spaces are not normal. I will state some results but avoid the proofs and most of the counterexamples which will take us too far afield. I encourage you to look at [174], [154], and [111]  if you are curious.

A topological space $X$ is normalnormal space  if whenever $A$ and $B$ are disjoint closed sets in $X$, there are disjoint open subsets $U$ and $V$ of $X$ such that $A\subset U$ and $B\subset V$. A normal $T_1$ space is called a $T_4$  $T_4$space.

Here are two relatively easy examples.

A normal space need not be regular. Let $X$ be the real line and let the open sets be the sets of the form $(a, \infty)$ for $a\in R$. Then $X$ is normal as no two nonempty closed sets are disjoint. But X is not regular since the point $\{1\}$ can not be separated from the closed set $(-\infty, 0]$ by disjoint open sets.

If $X$ is a metric space, then $X$ is normal. Let $\rho$ be the distance function and let $A$ and $B$ be two disjoint closed sets in $X$. Since we already know that a metric space is Hausdorff, for each $x\in A$, we can pick $\delta_x>0$ such that the open ball $U(x,\delta_x)$ centered at $x$ of radius $\delta_x$ does not meet $B$. Also, for each $y\in B$, we can pick $\epsilon_y>0$ such that $U(x,\epsilon_y)$  does not meet $A$. Let
$$U=\bigcup_{x\in A} U(x, \delta_x/3), V=\bigcup_{y\in B} U(y, \epsilon_y/3).$$
Then $U$ and $V$ are open sets in $X$ containing $A$ and $B$ respectively. To see that $U$ and $V$ are disjoint, suppose $z\in U\cap V$. Then for $x\in A$, and $y\in B$, $\rho(x,z)<\delta_x/3$ and $\rho(y,z)<\epsilon_y/3$, Without loss of generality we can assume that $\delta_x=\max\{\delta_x,\epsilon_y\}$. Then by the triangle inequality, $\rho(x,y)<\delta_x/3+\epsilon_y/3<\delta_x$. But then $y\in U(x,\delta_x)$ which is impossible. Thus $U$ and $V$ must be disjoint so $X$ is normal.

* Closed subspaces of normal spaces are normal.

* Product spaces of normal spaces need not be normal.

* The closed continuous image of a normal ($T_4$) space is normal ($T_4$).

Our main interest in normal spaces is Tietze's Extension Theorem, our first example of the solution to an extension problem. The proof involves Urysohn's Lemma which is interesting in its own right.

Urysohn's Lemma
A space $X$ is normal if and only if whenever $A$ and $B$ are disjoint closed sets in $X$, there is a continuous function $f: X\rightarrow [0,1]$ with $f(A)=0$ and $f(B)=1$. An immediate consequence is that every $T_4$ space is Tychonoff.

Let $X$ and $Y$ be topological spaces, and $A\subset X$. Let $f:A\rightarrow Y$ be continuous. The extension problem asks if we can extend $f$ to a continuous function $g:X\rightarrow Y$ whose restriction to $A$, $g|A: A\rightarrow Y$ is equal to $f$. One of the main goals of homotopy theory is to answer this question. The next theorem provides an answer in the special case where $A$ is closed in $X$ and $Y=R$.

Tietze's Extension Theorem
A space $X$ is normal if and only if whenever $A$ is a closed subset of $X$, and $f:A\rightarrow R$ is continuous, there is a continuous function $g: X\rightarrow R$ such that $g|A=f$.

§ TWO WAYS TO BE INFINITE

In this section, we will discuss different sizes of infinity. The argument came from the work of Georg Cantor and was originally pretty controversial. It is pretty much accepted now and resolves a big paradox in probability theory. This will be a digression back to set theory, but it will be needed in the next section as well as many other areas of mathematics.

Let $A$ be a set. Then the cardinalitycardinality of $A$, written $|A|$ is the number of elements in $A$.

So if $X=\{{\rm cat, dog, horse}\}$, then $|X|=3$. So two sets with the same cardinality have the same number of elements. We can show that two sets have the same cardinality by exhibiting a one-to-one correspondence. For every element of set $A$ we pair it with exactly one element of set $B$. We will do the same thing whether these sets are finite or infinite. For infinite sets you just need to keep this in mind even though things will go against your intuition if you have never seen these arguments before.

Let $A$ be a set. Then $A$ is countablecountable if there is a one-to-one correspondence between the elements of $A$ and the positive integers. If $A$ is countable, we write the cardinality of $A$ as $|A|=\aleph_0$.$\aleph_0$

So a set is countable if you can count it: 1, 2, 3, 4, $\cdots$

The positive integers are obviously countable. So are the integers. To see this we write them as 0, -1, 1, -2, 2, -2, 3, $\cdots$. Then we have the correspondence $1\leftrightarrow 0$,  $2\leftrightarrow -1$,$3\leftrightarrow 1$,$4\leftrightarrow -2$,$5\leftrightarrow 2$, $\cdots$ You might think that there are more integers than positive integers, but we can match them up.

An illustration of this is in Hilbert's paradox of the Grand Hotel. There have been several versions of this, but see [52] for one of them. This will be my own version. Suppose there is a hotel with infinitely many rooms. There is a single hallway and the rooms are numbered, 1, 2, 3, $\cdots$. Suppose you come to the hotel and find out that all of the rooms are full. There is an easy solution. Just have everyone move down one room and you can get room 1. The next day, turns out to be the first day of IICI, the Infinite International Convention on Inifinte International Conventions on Infinite International Conventions on .... The conference is very popular and there are countably infinite many attendees. There is still no problem, have everyone move to the room that is double their current number. Now there are countably many empty rooms.

It turns out that there are also countably many rational numbers. To see this, consider the following array. I have represented every rational number at least once with a lot of duplicates. Now just count them following the arrows:

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

0     -1     1     -2     2    -3     3     ⋯

0/2     -1/2     1/2     -2/2     2/2    -3/2     3/2    ⋯

0/3     -1/3     1/3     -2/3     2/3    -3/3     3/3      ⋯

0/4     ⋯    ⋯    ⋯    ⋯   ⋯    ⋯     ⋯
(m-1-1) edge (m-2-1)
(m-2-1) edge (m-1-2)
(m-1-2) edge (m-1-3)
(m-1-3) edge (m-2-2)
(m-2-2) edge (m-3-1)
(m-3-1) edge (m-4-1)
(m-4-1) edge (m-3-2)
(m-3-2) edge (m-2-3)
(m-2-3) edge (m-1-4)
(m-1-4) edge (m-1-5)
(m-1-5) edge (m-2-4)
(m-2-4) edge (m-3-3)

By continuing the zig-zag pattern and letting each row $i$ have $i$ in the denominator, we can be sure that we count all of the rationals at least once.

If we replace row $i$ in the diagram with the set $X_i=\{x_{i1},x_{i2}, x_{i3},\cdots\}$ the same argument shows that $\cup_{i=1}^{\infty}X_i$ is countable. So we have shown the following:

A countable union of countable sets is countable.

Now I will claim that the real numbers are uncountable, in other words, that there are somehow more of them. So what would that actually mean for infinite sets? It has to do with matching.

Suppose you bought your silverware as a set and you started with the same number of forks and spoons. But you suspect that there is a small black hole in your kitchen and that your spoons are being pulled into a parallel universe. You have a big dinner party planned for that night. (This is post-COVID.) When you set the table, you find that there are places with forks but no spoons. Since you ran out of spoons but had forks left over, you can conclude that there are more forks than spoons. So our plan is to match real numbers up with positive integers and still have some left over.

Construct a sequence $x_1, x_2, x_3, \cdots$ where each $x_i\in[0,1]$ is written as a binary expansion. Then let $x$ be the number where the $i$-th bit is complemented from $x_i$. Then $x$ differs from every $x_i$ on the list and can't appear on it. So any countable sequence of numbers in $[0,1]$ has to leave something out, like the fork with no spoon. So the numbers in $[0,1]$ and hence the reals are not countable.

So how many real numbers are there? To find out, we use the concept of a power setpower set.

Let $A$ be a set. Then the power set of $A$ denoted $P(A)$ is the set of all subsets of $A$.

Let $A=\{a,b,c\}.$ Listing all of the subsets of $A$ we get:

* $\emptyset$

* $\{a\}$

* $\{b\}$

* $\{c\}$

* $\{a,b\}$

* $\{a,c\}$

* $\{b,c\}$

* $\{a,b,c\}=A$

So $|P(A)|=8.$

In general, if $|A|=n$, then $P(A)=2^n$. To see this, if $A=\{a_1,a_2,\cdots,a_n\}$, then for each $i$ where $1\leq i\leq n$, we can include $x_i$ in our subset or exclude it. So this makes the number of subsets $2^n$.

Now looking at real numbers in $[0,1]$ we write the binary expansion as $.x_1x_2x_3\cdots$. We are in the situation above if 0 means exclude a member of a set and 1 means to include it. Since the binary digits map to the positive integers, they form a set of cardinality $\aleph_0$, so the cardinality of their power set is $2^{\aleph_0}$. We sometimes write $2^{\aleph_0}=\textfrak{C}$, where $\textfrak{C}$ stands for continuum. The continuum hypothesis$\textfrak{C}$continuum hypothesis states that there is no set with cardinality $c$ such that $\aleph_0<c<2^{\aleph_0}$. It has never been proven or disproven and whether it is true or false is independent of the other axioms of set theory.

A related concept which appears in many topology examples is the set of ordinals $\Omega.$ordinals Note that this means something different than the usual definition of ordinal numbers (first, second, third, etc.) $\Omega$ is an uncountable linearly ordered set with a largest element $\omega_1$. (A set is $A$ is linearly ordered if it is partially ordered and has the property that for $a, b\in A$, either $a\leq b$ or $b\leq a$.) You can think of $\Omega$ as the set starting with positive integers 1, 2, 3, 4, $\cdots$. There is a smallest ordinal larger than all of these which we call $\omega_0$, the first infinite ordinal. Then we have $\omega_0+1$, $\omega_0+2$, $\omega_0+3$, $\cdots$ until we reach $2\omega_0$.Eventually we get to $\omega_0^2$, $\omega_0^3$, $\cdots$ until we finally get to the first uncountable ordinal $\omega_1$ and stop. We define $\Omega_0=\Omega-\omega_1$ and call it the set of countable ordinals.

Now we can build one of my favorite weird spaces. First attach 0 to $\Omega$ and insert a copy of $(0,1)$ between any successive pair of ordinals. This makes a very long number line called the long linelong line. I will follow [154] and let the long line $L$ only include the countable ordinals. If we extend all the way to $\omega_1$ we have the extended long line $L^*$.

So next time you are frustrated by standing in a long line, be grateful it isn't as long as the long line.

§ COMPACTNESS

If you ever took a class in Real Analysis/Advanced Calculus, you probably learned something about compactness. I found it a little confusing the first time, so hopefully I can make it clearer. In $R^n$, compactness is equivalent to being closed and bounded (pairs of points are closer than some fixed number.) Since we live in $R^3$, this is the case in our world. This is convenient as if a compact car was not closed and bounded the edges would be kind of fuzzy and it would be very hard to fit into a parking space. And if you had a compact disc (anyone remember what those are?) it would be hard to find something that could play them. But unless you are in $R^n$ with the usual metric space topology, this is not the case. Later we will see a space that is closed and bounded but not compact.

Since we now understand what a countable set is, I will start with a little more generality.

A subset $D$ of a set $X$  is densedense in $X$ if $\overline{D}=X$. An equivalent definition is that every open set in $X$ contains an element of $D$.

A topological space $X$ is separableseparable if it has a countable dense subset.

It is obvious that every open interval in $R$ contains a rational. Since these form a base for the topology on $R$, we know that every open set in $R$ contains a rational. So the rationals are dense in $R$. Since we know that the rationals are countable, $R$ is separable.

* A continuous image of a separable space is separable.

* Subspaces of a separable space need not be separable. But an open subspace of a separable set is separable.

* A product of separable spaces is separable provided each factor is separable, Hausdorff, and contains 2 points and that there are no more than $2^{\aleph_0}$ of them.

An open coveropen cover of a topological space $X$ is a collection of subsets of $X$ such that $X$ is contained in their union. We say that this collection of open sets covers $X$. A subcover is a subcollection of a cover which still covers $X$.

A topological space $X$ is LindelöfLindelöf space if every open cover of $X$ has a countable subcover. A topological space $X$ is compactcompact space if every open cover of $X$ has a finite subcover.

Be careful here. I didn't say for example that a space is compact if there is some open cover with a finite subcover. That is always true. Just cover $X$ with itself. But if I give you any open cover, you need to pick out finitely many which still cover $X$.

We will start with Lindelöf spaces.

The real line $R$ with the usual topology is Lindelöf. Let $\{U_\alpha\}$ be an open cover of $R$. For each rational, choose an element of $\{U_\alpha\}$ containing it. Then there are countably many of these (at most) and they must still cover $R$ since the rationals are dense in $R$. So every open cover has a countable subcover.

* A continuous image of a Lindelöf space is Lindelöf.

* Closed subspaces of  Lindelöf spaces are Lindelöf. Arbitrary subspaces of  Lindelöf spaces need not be Lindelöf.

* Products of even two Lindelöf spaces need not be Lindelöf.

I will prove 1. and the first part of 2.

Proof:1) Let $f: X\rightarrow Y$ be continuous and onto and $X$ is  Lindelöf. Let $\{U_\alpha\}$ be an open cover of $Y$. Then $\{f^{-1}(U_\alpha)\}$ is an open cover of $X$. Since $X$ is Lindelöf, we can choose a countable subcollection $\{f^{-1}(U_1), f^{-1}(U_2),\cdots\}$ which covers $X$. Then $\{U_1, U_2,\cdots\}$ is a countable subcolection which covers $Y$, and $Y$ is  Lindelöf.$\blacksquare$

2) Let $F$ be closed in a Lindelöf space $X$. If $\{U_\alpha\}$ is an open cover of $F$, we have for each $\alpha$ an open subset $V_\alpha$ of $X$ such that  $U_\alpha=F\cap V_\alpha$. Then $X-F$ together with $\{V_\alpha\}$ form an open cover of $X$. Since $X$ is Lindelöf,there is a countable subcover $\{X-F, V_1, V_2,\cdots\}$. Then the corresponding $\{U_1, U_2,\cdots\}$ form a countable subcover of $F$.$\blacksquare$

As an example of a subset of a  Lindelöf space that is not  Lindelöf, we let $\Omega$ be the set of ordinals, and $\Omega_0=\Omega-\omega_1$, where $\omega_1$ is the first uncountable ordinal. We provide $\Omega$ with the order topology in which a basic neighborhood of $\alpha\in\Omega_0$ is of the form $(\alpha_1,\alpha_2)$ where $\alpha_1<\alpha<\alpha_2$. A basic neighborhood of $\omega_1$ is of the form $(\gamma, \omega_1]$. Then $\Omega$ is a  Lindelöf space. To see this, given any open cover of $\Omega$ one of the elements, say $U$,  contains $\omega_1$. Then $U$ contains an interval  $(\gamma, \omega_1]$ for some $\gamma$. But then we only need to cover $[1,\gamma]$ which is a countable set, so we have a countable subcover and $\Omega$ is a  Lindelöf space.

But the subspace $\Omega_0$ is not  Lindelöf. Let $U_\alpha=[1,\alpha)$ for $\alpha\in\Omega_0$. Then the set of $U_\alpha$ is an open cover of $\Omega_0$. But there is no countable subcover. If there were, let $\{U_{\alpha1}, U_{\alpha2},\cdots\}$ be this subcover. Then we would have that the least upper bound of $\{\alpha1,\alpha2,\cdots\}$ is $\omega_1$. But any element of $\Omega$ larger than any number in this set would have a countable number of predecessors and would need to be strictly less than $\omega_1$. So we have a contradiction and $\Omega_0$ is not  Lindelöf.

Now we move on to the much more important compact spaces. It should be obvious that a compact space is always Lindelöf. The first example shows that not every  Lindelöf space is compact.

The real line $R$ with the usual topology is not compact.Consider the open intervals $\{(-n,n)\}$ , where $n=1, 2, 3, \cdots$. Then these intervals cover $R$ but there is no finite subcover. If there were, then there would be a largest interval $(-N, N)$ and it would not include any $x\in R$ with $|x|>N$.

* A continuous image of a compact space is compact.

* Closed subspaces of  a compact space are compact.

We get these for free from Theorem 2.7.2 by replacing "countable" with "finite" in the proofs.

A compact subset of a Hausdorff space is closed.

To see a compact subset of a space which is not closed, consider the two point space $X=\{a, b\}$ where $\{a\}$ is open but $\{b\}$ is not. Then  $\{a\}$ is not closed in $X$ but it is compact as there are only finitely many open sets in $X$. Of course, $X$ is not Hausdorff.

The next result which you may know from real analysis gives us lots of examples of compact sets:

Heine-Borel Theorem A subset of $R^n$ (with the usual topology) is compact if and only if it is closed and bounded.

So in particular, the unit interval $I$ is compact as is the n-cube $I^n$.

To see a closed and bounded set which is not compact, let $X$ be the discrete metric space with infinitely many points. Recall that for any $x\neq y$, $\rho(x,y)=1$. Then $X$ is bounded as the distance between any two points is bounded by 1 and $X$ is closed as it is equal to a closed ball of radius 1. But $X$ is not compact. Take as the open cover, open balls of radius $\frac{1}{2}$ centered on each point of $X$. Then each of these sets consist of a single point and no subset of them (finite or not) can cover $X$. So $X$ is closed and bounded but not compact.

Finally, products of compact spaces are particularly nice.

Tychonoff Theorem A product of compact spaces is compact.

§ CONNECTEDNESS

Everything grows together, because you're all one piece.–Fred Rogers, Mister Rogers Neighborhood.

This brings up some serious questions. What does it mean to be one piece. Are you really in one piece? What about the cells, molecules, atoms, subatomic particles, etc. Fortunately, for topological spaces, it is easy to define being in one piece.

While we are on the subject of Mister Rogers, what do you call an open subset of the complex plane containing the number $i$? The Neighborhood of Make Believe.

Actually, connectedness and its variants form one of the most important concepts in algebraic topology. Here is the definition:

An topological space $X$ is disconnectedconnected if there are nonempty disjoint open subsets $H$ and $K$ of $X$ such that $X=H\cup K$. We say that $H$ and $K$ disconnect $X$. If these subsets do not exist, we say that $X$ is connected.

We could replace open with closed in this definition. So a space $X$ is connected if the only subsets that are both open and closed are $X$ and $\emptyset.$

If $x\in X$, the largest connected subset of $X$ containing $x$ is called the (connected) componentcomponent of $x$. We will denote it as $C_x$. It is the union of all connected subsets of $x$ containing $X$.

So you can think of components as the individual pieces of $X$.

Let $X\subset R$ where $X=[0,1]\cup (4,5)$. Then $[0,1]$ and $(4,5)$ are the two components of $X$.

If $x, y$ are two distinct points in $X$, then either $C_x=C_y$ or $C_x\cap C_Y=\emptyset$. If this was not the case, then $C_x\cup C_Y$ would be a connected set containing both $x$ and $y$ which is larger than both $C_x$ and $C_y$ which is impossible. So components of $X$ form a partition of $X$ into maximal connected subsets. (A partition means a collection of disjoint subsets whose union is all of $X$.)

Here are some examples of connected and disconnected spaces.

The Sorgenfrey line $E$ is the real line with an alternate topology. Here the basic neighborhoods of $x\in E$ are of the form $[x,z)$, where $z>x$. Then $E$ is disconnected. If we let $H=\cup_{x<0}[x,0)$ and $K=\cup_{z>0}[0,z)$ then $H$ and $K$ are both open, $H\cap K=\emptyset$, and $H\cup K=E$. So $E$ is disconnected.

The discrete metric space is disconnected if it has at least 2 points. Since each point is an open set, any 2 subsets of the space form a disjoint union of open sets.

The unit interval $I=[0,1]$ is connected. Suppose it was disconnected by $H$ and $K$. Let $1\in H$. Then $H$ contains a neighborhood of $1$, so let $c=\sup K$. (The term $\sup$ means least upper bound or the smallest number that is greater than or equal to everything in $K$. The greatest lower bound is denoted $\inf$.) We know that $c\neq 1$ since $H$ contains a neighborhood of $1$. Since $c$ belongs to $H$ or $K$ and both of these are open, some neighborhood of $c$ is contained in $H$ or $K$. But any neighborhood of $c$ must contain points of $K$ to the left and points of $H$ to the right. This is a contradiction so $I$ is connected. By the same argument, so is any closed interval in $R$.

Connected sets are preserved under continuous functions.

The continuous image of a connected set is connected.

Proof: Let $X$ be connected and $f$ be a continuous function of $X$ onto $Y$.Then if $H$ and $K$ disconnect $Y$, $f^{-1}(H)$ and $f^{-1}(K)$ disconnect $X$ which is a contradiction. so $Y$ is connected. $\blacksquare$.

Now I will show you something really cool. Do you remember the Intermediate Value Theorem from calculus. Your book probably didn't even try to prove it. With topology, the proof is two lines.

Intermediate Value Theorem: Let $f$ be a real valued function of a single real variable which is continuous on $[a,b]$. (Without loss of generality we can assume $f(b)\geq f(a)$ or we can make the obvious modification.) Then for every $y$ such that $f(a)\leq y\leq f(b)$, there is an $x\in[a,b]$ such that $f(x)=y$.

Proof: Since $[a,b]$ is connected, $f([a,b])$ is also connected by the previous theorem. So if $f(a)\leq y\leq f(b)$ but $y$ is not in the image of $f$ then the image of $f$ is disconnected which would be a contradiction. $\blacksquare$.

The next set of results deal with subsets of connected spaces. These need not be connected as $X=[0,.1]\cup (.3,.5)$ is a subset of the connected set $I$ which is not connected.

Sets $H$ and $K$ are mutually separatedmutually separated in $X$ if

A subspace $E$ of $X$ is connected if and only if there are no nonempty mutually separated sets $H$ and $K$ in $X$ with $E=H\cup K$.

If $H$ and $K$ are mutually separated in $X$ and $E$ is a connected subset of $H\cup K$ then $E\subset H$ or $E\subset K$.

We now have some more ways of proving a space is connected.

* If $X=\cup X_\alpha$ where each $X_\alpha$ is connected and $\cap X_\alpha\neq\emptyset$, then $X$ is connected.

* If each pair of points in $X$ lies in some connected subset of $X$ then $X$ is connected.

* If $X=\cup_{i=1}^n X_i$ where each $X_i$ is connected and $X_i\cap X_{i+1}\neq\emptyset$ for all $i$, then $X$ is connected.

If $E$ is a connected subset of $X$ and $E\subset A\subset\overline{E}$ then $A$ is connected.

Proof: It is enough to show that $\overline{E}$ is connected since if $E\subset A\subset\overline{E}$ then $A$ is equal to the closure in $A$ of $E$, so we can replace the closure in $X$ of $E$ (i.e. $\overline{E}$) by the closure in $A$ of $E$. Suppose $\overline{E}=H\cup K$  where $H$ and $K$ are disjoint nonempty open sets in  $\overline{E}$. Then $E=(H\cap E)\cup(K\cap E)$ and so the union of disjoint nonempty open sets in $E$. So if $\overline{E}$ is disconnected, so is $E$. $\blacksquare$.

The real line $R$ is connected. To see this, we know that $R=\cup_{n=1}^\infty[-n, n]$, and each interval $[-n, n]$ is homeomorphic to $I$ and thus connected. Since their intersection is nonempty (it contains 0), part 1 of Theorem 2.8.5 shows that $R$ is connected.

$R^n$ is connected by the same theorem. $R^n$ is the union of all straight lines through its origin, and each of these is homeomorphic to $R$ which is connected by the last example. Also, the origin lies in their intersection. So $R^n$ is connected.

$R^2$ and $R^1$ are not homeomorphic. To see this, remove a point from both of them. Then $R^2$ is still connected, but $R^1$ becomes disconnected. When we do homology theory in Chapter 4, I will show you why $R^n$ and $R^m$ are not homeomorphic if $n\neq m$. We don't yet have the tools for it now, but it is an easy consequence of homology theory.

Connectivity behaves well with product spaces due to continuity of projection maps.

A nonempty product space is connected if and only if each factor space is connected.

This follows from the continuity of projection maps and the fact that the continuous image of a connected space is connected.

Finally, we have the following result on components of a space.

The components of $X$ are closed sets.

Proof: If $C_x$ is the component of $x$ in $X$, then $\overline{C_x}$ is a connected set containing $x$. So $\overline{C_x}\subset C_x$ and $C_x$ is closed.$\blacksquare$.

Now that we have defined connectedness, you may wonder if you can always get there from here. Is there a "path" connecting any two points? In homotopy theory you learn to love paths and especially "loops" which are paths that start and end at the same place. We will now define the notion of pathwise connectedness.

A space $X$ is pathwise connectedpathwise connected if for any two points $x,y\in X$, there is a continuous function $f: I\rightarrow X$ such that $f(0)=x$ and $f(1)=y$. The function as well as its range $f(I)$ is called a pathpath from $x$ to $y$ with initial pointinitial point $x$ and terminal pointterminal point $y$. A continuous function $f: I\rightarrow X$ such that $f(0)=f(1)=x$ is called a looploop.

You will frequently see the term arcwise connectedarcwise connected which means that for a pair of points we can find a path is a homeomorphism onto its image. (So it doesn't intersect itself.) It turns out that a Hausdorff space is arcwise connected if and only if it is pathwise connected. (See [174] for a proof.) Since we won't need spaces that are not Hausdorff in data science applications, we can treat these terms as interchangeable when you see them in books and papers. I will use the term pathwise connected in the rest of this paper.

Every pathwise connected space is connected.

Proof: If $H$ and $K$ disconnect the pathwise connected space $X$, let $f:I\rightarrow X$ be a path between $x\in H$ and $y\in K$. Then $f^{-1}(H)$ and $f^{-1}(H)$ disconnect $I$ which is a contradiction.$\blacksquare$.

Not every connected space is path connected.  Figure 2.8.1 shows the topologist's sine curvetopologist's sine curve which is the union of the graph of $\sin(\frac{1}{x})$ for $x>0$ and the $x$-axis for $x\leq 0$. The right hand side, oscillates between -1 and 1 and the oscillation gets faster and faster as you approach 0.  This set is connected as any neighborhood of 0 contains points on both pieces of the graph, so it cannot be disconnected by open sets. But there is no path from $(0,0)$ to $(x, \sin(\frac{1}{x})$ for any $x>0$. So the topologist's sine curve is connected but not path connected.

In the discrete metric space, every point is both open and closed, so every point is its own connected component. Such a space is called totally disconnectedtotally disconnected. In this space, there is no path between any pair of points as this would disconnect the unit interval $I$. So if you lived in this space, even though you would have a short commute to work (only 1 unit), you would have no way to get there. And you wouldn't be all one piece, but infinitely many.

Topologist's Sine Curve

Now you should know enough topology to handle algebraic topology. Next we will focus on the algebra.

CHAPTER: ABSTRACT ALGEBRA BACKGROUND

Like point-set topology, abstract algebra is a huge area. I took an entire year of it in college and an additional year in graduate school. Fortunately, the amount you need for algebraic topology is not nearly as extensive. So in this chapter, I will present the amount you need to have a basic understanding of homology theory. We can add a little more as we need it when we go into more advanced topics.

In topology, we give sets additional structure by defining a distinguished class of subsets, the open sets. In algebra, by contrast, the structure relates to operations where a subset of elements point to another element in a set. In a binary operation we take two elements and produce a third. A group is a set in which there is a single operation called addition or multiplication. It doesn't really matter which one as the operation may not resemble what we do to numbers. But we want to write the operations in a group in a familiar form, so for example, if we are adding, the identity element (which leaves the other fixed) is written as a 0, and in multiplication, it is written as a 1. The elements could be numbers but could also be rocks, flowers, or people as long as you can multiply or add them in a way which follows a fixed set of rules. So in Section 3.1, I will discuss the basics of groups. In algebraic topology, groups have an especially nice structure which is very easy to visualize.

Section 3.2 will deal with the idea of an exact sequence. This is a chain of groups and maps between them with some very nice properties. You can often compute the structure of groups in an exact sequence if you know the structure of their neighbors. In algebraic topology this is one of your most effective tools.

In Section 3.3, we will introduce rings which have two binary operations, both addition and multiplication. Now there is a big difference between them. For example, if $r$ is and element of a ring $R$, then $0+r=r$, but $0r=0.$ What ties them together is a distributive law. A very special type of ring is a field. The real, rational, and complex numbers are all fields. An important example of a ring that is not a field is the integers.

In Section 3.4, we introduce a new operation called scalar multiplication. A vector space is a group under addition with a way to multiply elements by elements of an external field called the field of scalars. Vector spaces should be familiar to you if you have ever taken a class in linear algebra. If we use a ring instead of a field, we get a module. So a vector space is just a special case of a module. Therefore, a vector space on the moon is a lunar module. If you have addition, multiplication, and scalar multiplication, you get an algebra. Square matrices are an example.

So now you are going to object and say, "None of this is abstract enough for me." Well you don't have to worry because we will finish this chapter off with a section on category theory. As I pointed out when we were discussing set theory, Russell's paradox doesn't allow for the set of all sets. So we can talk about the category of sets. Categories consist of objects and special maps between them called morphisms. Examples are the categories of sets, topological spaces, groups, and rings. Maps between categories that take objects to objects and morphisms to morphisms are called functors. Homology is a functor that takes a geometric object (actually a topological space) and replaces it by a group in each dimension up to the highest dimension of the space. (I will make this more precise in Chapter 4, but we can always think of these spaces as subsets of some $R^n$ so $n$ is their dimension.)

There are lots of textbooks on abstract algebra, but my personal favorite to start with is Herstein's Topics in Algebra [66]. This book seems to be out of print and hard to find now. It has been replaced by the posthumously published Abstract Algebra, 3rd Edition [67], which covers somewhat less material. Most of Sections 3.1, 3.2, and 3.4 will come from  [66], with some additional material from Munkres [110]. Section 3.2 is entirely from [110]. Another one of my favorites is Jacobson's Basic Algebra. The only problem is that the name is a misnomer and it is almost embarrassing to walk around with it as people will think I never learned my high school algebra. In actuality, though, if you know all the material in this two volume set, you will be well prepared for any Ph.D. qualifying exam in algebra. There is a good short chapter on category theory in the second volume which I will use in Section 3.5. If you want to learn more, the classic book by one of the inventors of category theory is MacLane's Categories for the Working Mathematician [91].

§ GROUPS

Since as mentioned in the introduction, a group's operation can either be multiplication or addition, I will define it in both cases.

A nonempty set $G$ is a groupgroup if there is a binary operation sum which is denoted by $+$  or product which is denoted by $\cdot$ which takes two elements of $G$ and produces a third and obeys the rules listed in Table 3.1.1. (Here we write $ab$ for $a\cdot b$.)

Rule      Addition

Closure     $a, b\in G$ implies that $a+b\in G$

Associative Law     $a+(b+c)=(a+b)+c$

Identity     There  exists an element $0\in G$ such that for every $a\in G$, $0+a=a+0=a$

Inverse     For every $a\in G$ there exists $-a\in G$ such that $a+(-a)=(-a)+a=0$

Rule      Multiplication

Closure     $a, b\in G$ implies that $ab\in G$

Associative Law     $a(bc)=(ab)c$

Identity     There  exists an element $1\in G$ such that for every $a\in G$, $1a=a1=a$

Inverse      For every $a\in G$ there exists $a^{-1}\in G$ such that $aa^{-1}=a^{-1}a=1$

Group Laws.

Arranging the rules in a table shows the explicit parallels betwen groups under addition and multiplication. They are the same thing other than a difference in notation.

Note that there is something missing from the rules you learned about numbers in high school algebra. There is no commutative law. This law only holds for a special type of group.

A group $G$ is called an abelian groupabelian group if the commutative law holds. It is written $a+b=b+a$ for addition or $ab=ba$ for multiplication.A group which is not abelian is a non-abelian group.

What is purple and commutes? An abelian grape.

A group can be either finite or infinite. If $G$ is finite, the number of elements in $G$ is called the order of $G$ and is written as $|G|$.

The trivial group having only one element is $\{1\}$ written multiplicatively or $\{0\}$ written additively.We will write these simply as 1 and 0.

Let $G=Z$, the set of integers. Then $G$ is a group under addition. In fact, it is an abelian group. But $Z$ is not a group under multiplication. No integer other than $1$ and $-1$ have inverses that are also integers. The nonzero integers are an example of a monoidmonoid. You may remember a monoid as the one-eyed giant that Odysseus met. (Or was that a Cyclops?) Actually a monoid is a similar to a group except that it might not have inverses. As we will see, a ring is an abelian group under addition and its nonzero elements form a monoid under multiplication.

Let $G=R$, the set of real numbers. Then $R$ is a group under addition and the nonzero elements of $R$ form a group under multiplication. The same holds if $R$ is replaced by the set $Q$ of rationals.The irrationals are not a group under addition and the nonzero irrationals are not a group under multiplication as they are missing both $0$ and $1$.

An example of a finite group is the integers mod $n$ written as $Z_n$. $Z_n=\{0, 1, 2, \cdots, n-1\}$ which is a group under addition. Addition is done in the usual way, but $(n-1)+1=0$. Think of a clock with a $0$ where the 12 usually goes. Then for example, $11+3=2$.

An example of a non-abelian group is the set of invertible $n\times n$ matrices with real entries for a fixed $n$. The operation is matrix multiplication which we know is not commutative. The set of all $n\times n$ matrices with real entries is a group under addition.

A more exotic yet important group is the permutation grouppermutation group $S_n$. (Don't confuse this with the sphere $S^n$.) This group consists of all possible permutations of $n$ objects where permutations are multiplied by taking them in succession. $|S_n|=n!$ as can be seen from the fact that a permutaion can put the first object in $n$ positions, the second in $n-1$ positions, etc. Also, this group is non-abelian for $n\geq 3$. In fact, $S_3$ is the smallest non-abelian group.

As an example, suppose you are the zookeeper in a small zoo which has only 3 animals: a lion, an elephant, and a giraffe. Your boss likes to constantly move animals around to confuse any potential visitors. So he gives you a card every day with instructions on moving animals. The cards are written in cycle notation. If two objects are enclosed in the same set of parentheses, you move each object to the one on its right and circle around if necessary. So for example, if the cages are in a row in the order [Lion, Elephant, Giraffe] or $[L,E,G]$ and the card says $(E) (L,G)$ this means to leave the elephant in its place and switch the lion and the giraffe resulting in the new configuration $[G, E, L]$. We usually omit a cycle with one element so we write the previous permutation as $(L,G)$. If we have the cycle $(L)$ or equivalently either of the other two letters, this means leave everything alone. We multiply permutations by doing then in succession so $(E,L)(L,E,G)$ means first switch the elephant and the lion, then lion to elephant, elephant to giraffe, and giraffe to lion. So $[L,E,G]$ becomes $[E, L, G]$ and then $[L, G, E]$. Note that reversing the order is $(L,E,G)(E,L)$ so we do the circular switch first and then switch the elephant and the lion. So $[L, E, G]$ becomes, $[G,L, E]$ and then $[G,E,L].$ So reversing the order gives a different configuration, and $S_3$ is non-abelian. To show it is an actual group, we can undo a cycle with two elements by doing it again. So applying $(L,E)$ twice switches the lion and the elephant and then switches them back. We undo $(L,E, G)$ with $(G, E, L)$.

Note that $Z_n$ is a group formed by taking an element and all multiples until one of them becomes 0. An equivalent multiplicative group is the group $G=\{1, a, a^2, a^3, \cdots, a^{n-1}\}$ where $a(a^{n-1})=1.$ This type of group is generated by a single element and is called a cyclic groupcyclic group of order $n$. The integers form an infinite cyclic group under addition. An equivalent multiplicative group is a group of the form $\{g^i\}$ where $i$ is any integer and $g^0=1$. I will make precise what I mean by equivalent a little later.

What do you call 5 friends who all like to ride bicycles together? A cyclic group of order 5.

Recall that topological spaces had subspaces, product spaces, and quotient spaces. I will now describe the analogues for groups. These will be critical in algebraic topology. I will start with subgroups. Unlike the case of topological spaces, not every subset of a group is a subgroups. We need this subset to be a group itself.

A nonempty subset $H$ of a group $G$ is a subgroupsubgroup of $G$ if it is itself a group.

$H$ inherits the binary operation from $G$ so it is additive if $G$ is additive and multiplicative if $G$ is multiplicative.

I am going to use multiplicative notation for the next part of the discussion. Later I will assume we are dealing with abelian groups which are traditionally represented as additive. Homology and cohomology only involve abelian groups. Non-abelian groups can come up in homotopy theory, though, so I will have more to say about them when we get to Chapter 9. I will always specify when the groups being discussed are restricted to being abelian.

So what does $H$ need to be a group itself? It will automatically have the associative law. So we need closure, the identity, and inverses. We can drop the requirement that the identity be in $H$ if we have closure and the existence of inverses since $h\in H$ implies $h^{-1}\in H$, so by closure, $h\cdot h^{-1}=1\in H$. So we have shown:

A nonempty subset $H$ of a group $G$ is a subgroup of $G$ if and only if $a, b\in H$ implies $ab\in H$ and $a\in H$ implies $a^{-1}\in H$.

If $Z$ is the integers under addition, then let $3Z$ be the multiples of 3. Then since the sum of multiples of 3 is always a multiple of 3, and $a$ is a multiple of 3 if and only if $-a$ is a multiple of $3$, we have that $3Z$ is a subgroup of $Z$.

If $Z$ is the integers under addition, then the even numbers are equal to $2Z$ so they form a subgroup by the argument in the last example. The odd numbers, do not form a subgroup. For example, 3 and 5 are odd, but 3+5=8 which is an even number, so closure fails. And the odd numbers do not contain the identity element 0.

The integers form a subgroup of the reals under addition.

Let $G$ be the nonzero real numbers under multiplication. Then the nonzero rationals form a subgroup as do the nonzero positive rationals.

If our group is finite, there is an important relationship between the order of $G$ and the order of its subgroups. We start with the idea of a coset.

If $H$ is a subgroup of $G$, and $a\in G$ then we define the right cosetcoset $Ha=\{ha|h\in H\}$. The left coset aH has an analogous definition. If $G$ is additive, cosets are of the form $H+a$.

Any two right cosets of $H$ in $G$ are either identical or disjoint. Since $H=H1$, $H$ is itself a coset and the theorem implies that the cosets partition $G$.

Proof: Suppose $Ha$ and $Hb$ have a common element $c$. Then $c=h_1a=h_2b$ for some $h_1, h_2\in H$. So $h_1^{-1}h_1a=h_1^{-1}h_2b$. So $a=h_1^{-1}h_2b$ which implies that $a\in Hb$. This implies $Ha\subset Hb$. A similar argument shows $Hb\subset Ha$. So $Ha=Hb$. $\blacksquare$

Note that the above argument shows that $Ha=Hb$ if $ab^{-1}\in H$.

Now every coset is the same size as $H$. This is true since for any two distinct elements of $h_1, h_2 \in H$, $h_1a$ and $h_2a$ are distinct as we can see by multiplying both by $a^{-1}$ on the right. So $G$ is a union of disjoint sets of size $|H|$. So we have proves the very important result:

Langrange Theorem If $G$ is a finite group, then $H$ is a divisor of $G$.

So for a group of prime order, the only subgroups are $G$ itself and the trivial subgroup $1$.

If $H$ is a subgroup of $G$, then the index of $H$ in $G$ written $[G:H]$ is the number of right cosets of $H$ in $G$.

If $H$ is a subgroup of $G$, then $[G:H]=|G|/|H|$.

Let $G=Z_{10}$ and $H=\{0,5\}$. Then $|G|=10$ and $|H|=2$. $H$ is a subgroup of $G$ since in $Z_{10}$, $5+5=0$. The cosets of $H$ are $H+0=\{0,5\}$,  $H+1=\{1,6\}$,  $H+2=\{2,7\}$,  $H+3=\{3,8\}$,  $H+4=\{4,9\}$.These exhaust $Z_{10}$ and there are 5 of them, so $[G:H]=5=10/2=|G|/|H|$ as we expect. Note that for an additive group, $H+a=H+b$ if $a-b\in H$. For example $H+2=\{2,7\}$, and $H+7=\{7,2\}=H+2$. We check that $7-2=5\in H$.

An infinite group can have a subgroup with finite index. An easy example is letting $G$ be the integers and $H$ the even integers under addition. $H+1$ is the set of odd integers, and $G=H\cup (H+1)$. So we have that the index is $[G:H]=2.$

We will talk about the order of an element of a group.

If $G$ is a group and $g\in G$, then the order of $g$, written $o(g)$ is the smallest power $m$ of $g$ such that $g^m=1$. This is finite for every element if $g$ is finite. the analogue for an additive group is $mg=0$.

If $g\in G$ has finite order $m$, then $\{1, g, g^2, \cdots, g^{m-1}\}$ is a subgroup of $G$. So we have:

If $G$ is a finite group and $g\in G$ has order $m$, then $m$ divides $|G|$.

If a group is abelian, left and right cosets coincide. In general, though, we want to only look at subgroups where the cosets behave nicely. Such a subgroup is called normal.

A subgroup $N$ of a group $G$ is called normalnormal subgroup if for any $g\in G$, $n\in N$, we have $gng^{-1}\in N$.

Be careful. We are not saying that $gng^{-1}=n$. That would happen if the group was abelian. But we do have the following:

$N$ is a normal subgroup of $G$ if and only if $gNg^{-1}=N$ for all $g\in G$.

This says that for $n\in N$, $gng^{-1}=n_1$ for some $n_1\in N$. For a normal subgroup, a right coset $Ng$ is the left coset $gN$ for the same $g$. This gives us a way to multiply right cosets. For a normal subgroup $N$ of $G$ and $g_1, g_2\in G$, $Ng_1Ng_2=N(g_1N)g_2=N(Ng_1)g_2=Ng_1g_2.$ With this multiplication, $N=N1$ the identity, and the inverse of $Ng$ equal to $Ng^{-1}$, the right cosets form a group.

If $N$ is a normal subgroup of $G$, the set of right cosets with the multiplication written above is called a quotient groupquotient group and written $G/N$. By our comments above, $|G/N|=|G|/|N|$

I can't overemphasize how important quotient groups are in algebraic topology. Homology is defined as a quotient group, and every TDA paper I have ever seen assumes you already know what a quotient group is.

If $G$ is written additively, then the cosets are of the form $N+a$. $N+0=N$ is the identity, $(N+a)+(N+b)=N+(a+b)$, and the inverse of $N+a$ is $N+(-a)=N-a$.

If $G$ is abelian, then every subgroup is normal but this is not true if $G$ is non-abelian.

Let $G=Z_{10}$ and $H=\{0,5\}$. We listed the cosets of $H$ in $G$ in Example 3.1.11 above. The quotient group $G/H$ is formed by adding the cosets $(H+a)+(H+b)=H+(a+b)\mod 10$. (Recall $a\mod b$ is the remainder you get when dividing $a$ by $b$.)

Let $G=Z$ under addition, and $H=nZ$ which is the set of multiples of $n$. We saw that $H$ is a subgroup of $G$. The cosets of $H$ are $H+0=H, H+1, H+2, \cdots, H+(n-1)$. These exhuast $Z$ since a multiple of $n$ plus $n$ is still a multiple of $n$, so $H+n=H$. We can write out $G/H$ as $\{0,1,2,\cdots,n-1\}$ so we see that $Z/nZ$ is just $Z_n$. That is why you will often see $Z_n$ written as $Z/nZ$ or even $Z/n$ in books. I will stick to the $Z_n$ notation.

A group $G$ is simplesimple group if it has no normal subgroups except $G$ itself and the trivial group $1$.

An abelian group can only be simple if it is a cyclic group of order $p$ where $p$ is a prime. Non-abelian groups can be simple and very complicated. There was a big project in hte 1960s-1980s to classify all finite simple groups, and the proof is about 10,000 pages long. There are a few families and 26 sporadic ones. The largest of these is the Fischer-Griess Monster Group, also known as the ”Friendly Giant" or simply the "Monster."  Its order is 808,017,424,794,512,875,886,459,904,961,710,757,005,754,368,000,000,000.  If you are curious about where it comes from see [60] for the original 100 page construction or [36] for the simpler 30 page version.

Now that we have seen subgroups and quotient groups, you may wonder if there is an analogue to Cartesian products. There are a few constructions that are useful but the one we will be concerned with is a direct productdirect product.

Let $G$ and $H$ be groups. Then the direct product of $G$ and $H$ denoted $G\times H$ has an underlying set which is the cartesian product of the underlying sets of $G$ and $H$ and $(g_1, h_1)(g_2, h_2)=(g_1g_2, h_1h_2)$. If $G$ and $H$ are written additively, we write $G\oplus H$ and use the term direct sumdirect sum.

We can think of $G$ and $H$ as subgroups of $G\times H$ by writing $G=\{(g,1)\}$ for $g\in G$ and $H=\{(1,h)\}$ for $h\in H$. Then we have the following properties:

* $G\cap H=1$

* Every element of $G\times H$ can be written uniquely as the product of an element of $G$ and an element of $H$.

* Every element of $G$ commutes with every element of $H$.

* Both $G$ and $H$ are normal subgroups of $G\times H$.

* The order of $G\times H$ is the product of the order of $G$ and the order of $H$.

There can only be one group of order 2, order 3, and order 5. These are the cyclic groups $Z_2$, $Z_3$, and $Z_5$ respectively. We know that there are no others as these are of prime order so the can not have any nontrivial subgroups.

There are two distinct groups of order 4. The group $Z_4$ is the familiar cyclic group. We also have the group $Z_2\oplus Z_2$. This group contains the identity $(0,0)$ and three elements of order two: $(1,0)$, $(0,1)$, and $(1,1)$ have order 2, since in $Z_2$, $1+1=0.$This group is called the Klein four group.

For order 6, there are 3 groups. They are $Z_6$, $Z_3\oplus Z_2$ and the non-abelian permutation group $S_3$ that we saw earlier. As we will see later, though, $Z_6$, $Z_3\oplus Z_2$  can be thought of as the same group.

Now we want to know what it means for two groups to be the same. The analogue of a continuous function from topology is a homomorphism. This preserves the algebraic structure, this time in the forward rather than the reverse direction. The analogue of a homeomorphism is an isomorphism. Two groups that are isomorphic are basically the same group. I will now make these concepts precise.

A mapping $f$ from a group $G$ to a group $H$ is a homomorphismhomomorphism if $f(g_1g_2)$=$f(g_1)f(g_2)$ for all $g_1, g_2\in G$. (In additive notation, $f(g_1+g_2)$=$f(g_1)+f(g_2)$.) A homomorphism $f$ is a monomorphismmonomorphism if it is one to one. It is a  epimorphismepimorphism if it is onto. If the homomorphism $f$ is both one to one and onto (implying the existence of an inverse), then $f$ is called an isomorphismisomorphism and we say that $G$ and $H$ are isomorphic.

Two groups that are isomorphic are pretty much indistinguishable in the way that two topological spaces are indistinguishable if they are homeomorphic.

One easy example of a homomorphism is defined as  f(g)=1 for all $g\in G$. In additive notation, $f(g)=0$, and this is called the zero homomorphism. We see it often in algebraic topology.

If $f: G\rightarrow G$, then $f$ is the identity homomorphism if $f(g)=g$ for $g\in G$.

Let $G$ be the group of real numbers under addition and $H$ the group of nonzero real numbers under multiplication. Let $f: G\rightarrow H$, be defined by $f(x)=2^x$. This is a homomorphism since $f(a+b)=2^{a+b}=2^a2^b=f(a)f(b).$

Let $f: Z\rightarrow Z$, be defined by $f(x)=2x$. This is a homomorphism since $f(a+b)=2(a+b)=2a+2b=f(a)f(b).$

Let $G=\{0,1\}=Z_2$ under addition and $H=\{1,-1\}$ under the usual multiplication. Let $f: G\rightarrow H$ with $f(0)=1$ and $f(1)=-1$. This is one to one and onto and you can check that f is a homomorphism. For example, $f(1+1)=f(0)=1$ and $f(1)f(1)=(-1)(-1)=1.$ Checking the other possibilities gives that $f(a+b)=f(a)f(b)$. So f is a homomorphism and we have defined it to be one to one and onto. So $G$ and $H$ are isomorphic.

As mentioned above, $Z_6$ is isomorphic to $Z_3\oplus Z_2$. To see this, let $g\in Z_6$. Let $f(g)=(a,b)\in Z_3\oplus Z_2$, where $g=3b+a$. (I.e. $b$ and $a$ arer the quotient and remainder respectively when $g$ is divided by $3$. We have $f^{-1}((a,b))=3b+a$. It is easily checked that $f(g+h)=f(g)+f(h)$ and that $f^{-1}$  is actually the inverse of $f$. So $Z_6$ is isomorphic to $Z_3\oplus Z_2$.

Let $f: G\rightarrow H$ be a homomorphism. Then the kernelkernel $K$ of $f$ is $\{g\in G| f(g)=1\}$. (In additive notation $f(g)=0$.) The image $f(G)$ of $f$ is $\{h\in H| h=f(g){\rm \hspace{.02 in} for\hspace{.02 in}some\hspace{.02 in}} g\in G\}$.

Let $f: G\rightarrow H$ be a homomorphism. Then $f(1_G)=1_H$ and $f(g^{-1})=f(g)^{-1}$, where $1_G$ and $1_H$ are the identity elements of $G$ and $H$ respectively.

Proof: Let $g\in G$. Then $f(g)=f(g1_G)=f(g)f(1_G)$. Multiplying both sides by $f(g)^{-1}$ on the left gives $1_H=f(1_G)$. So $1_H=f(1_G)=f(gg^{-1})=f(g)f(g^{-1})$ So multiplying on the left by $f(g)^{-1}$ on both sides gives $f(g)^{-1}=f(g^{-1})$. $\blacksquare$

Using the above result it is easy to show the following:

Let $f: G\rightarrow H$ be a homomorphism. Then the kernel of $f$ is a normal subgroup of $G$.

Try this one yourself using the formulas.

Let $f: G\rightarrow H$ be a homomorphism. Then $f$ is one to one if and only if the kernel of $f$ is 1.

Proof: Supose the kernel of $f$ is 1. Let $g_1, g_2\in G$, and suppose $f(g_1)=f(g_2)$. Then $1=f(g_1)f(g_1)^{-1}=f(g_1)f(g_2)^{-1}=f(g_1g_2^{-1}).$. Since the kernel of $f$ is 1, $g_1g_2^{-1}=1$, so $g_1=g_2$ and $f$ is one to one. If $f$ is one to one and $g$ is in the kernel of $f$, then  $1=f(g)=f(1)$ so we must have $g=1$. $\blacksquare$

The next theorem is very important. See [66] for the proof.

Let $f: G\rightarrow H$ be a homomorphism with kernel $K$. Then $G/K\approx H$. (Here $\approx$ denotes an isomorphism.)

Now let $G$ and $H$ be abelian. We will always write abelian groups additively. So the above result says that $f$ is one to one if the kernel $K=0.$ Also, recall that every subgroup of an abelian group is normal. So the image $f(G)$ is a normal subgroup of $H$ and can form the quotient group $H/f(G)$. We call this group the cokernelcokernel of $f$.If $f$ is onto, then $f(G)=H$, so $H/f(G)=H/H=0$. So we have:

Let $f: G\rightarrow H$ be a homomorphism of abelian groups. Then $f$ is onto if and only if the cokernel of $f$ is 0. $f$ is an isomorphism if the kernel and the cokernal of $f$ are both 0.

In both homology and cohomology theory, all of the groups we care about have an especially nice form. To understand this, we will need a couple more definitions.

Let $G$ be a group. A set $S$ of generatorsgenerators for $G$ is a set of elements of $G$ such that every element of $G$ can be expressed as a product of finitely many of the elements of $S$ and their inverses. If $G$ is generated by a finite set $S$, then $G$ is finitely generatedfinitely generated. If $S$ consists of a single element $g$ then $G$ is a cyclic group generated by $g$.

Let $G$ be a group. A set $R$ of relations is a set of strings $g_1^{r_1}g_2^{r_2}\cdots g_n^{r_n}$ of generators $g_i$ and integers $r_i$ whose product is 1. Every group has the relation $gg^{-1}=1$ for every generator $g$, but there may be others as well. A group with no other relations is called a free groupfree group. A group with only finitely many relations is called finitely presentedfinitely presented.

Let $G$ be the free group with two generators $x$ and $y$. Then elements of $G$ are the element 1 along with strings of $x$, $y$, $x^{-1}$ and $y^{-1}$. Some examples are $x^8$, $x^6y^3$, and $x^3({y^{-1}})^5y^3x^8$.

In homology and cohomology, every group we will ever deal with is finitely generated and abelian. In homotopy theory, there is one exception called the fundamental group that could be non-abelian. We will deal with it in Chapter 9.

What's purple, commutes, and is worshiped by a limited number of people? A finitely venerated abelian grape.

What's purple, commutes, and given gifts by a limited number of people? A finitely presented abelian grape.

Let $G$ be a finitely generated group.Then $G$ is a free abelian groupfree abelian group, if $G=Z\oplus Z\oplus\cdots\oplus Z$. The number of summands of $Z$ is called the rank of $G$. In algebraic topology, the rank is also called the betti number.betti number

Warning: Do not confuse a free group and a free abelian group. A free group is about as non-abelian as you can get.

A free abelian group of rank $n$ has a basis $\{g_1,\cdots, g_n\}$ which is defined to be a set of elements of $G$ such that every element of $G$ can be written uniquely as a sum $\sum_{i=1}^n c_ig_i$ where $c_i\in Z$ for $1\leq i\leq n.$

One way of constructing a free abelian group from a finite set of generators is called a formal sumformal sum. In this case, we start with a generating set $S=\{g_1,\cdots, g_n\}$ and a function $\phi: S\rightarrow Z$, so the elements of our group are of the form $\sum_{i=1}^n\phi(g_i)g_i$

Suppose you go to a fruit stand that has apples, bananas, and cherries. You buy 2 apples, 4 banananas and 12 cherries. This represents the element $2a+4b+12c$, where $\{a, b, c\}$ is the generating set. You could also have an element like $-6a$ where you sell them 6 apples. You can add and subtract peieces of fruit of the same kind, but for different kinds, we just put a plus or minus sign between them.

When we build homology groups, we will start with the group of chains which will be a set of formal sums. We will discuss these in Chapter 4.

Recall that for an additive group, the order of an element $g$ is $m$ if $m$ is the smallest positive integer such that $mg=0$. The set of all elements of $G$ of finite order is called the torsion subgrouptorsion subgroup. If $T=0$, we say that $G$ is torsion freetorsion free.

We conclude this section with an important result which is the basis of homology theory. The good news is that it means that homology groups take a very simple form. See [110] for a proof.

The Fundamental Theorem of Finitely Generated Abelian Groups: Let $G$ be a finitely generated abelian group. Then we can write $G$ uniquely as
$$G\equiv(Z\bigoplus\cdots\bigoplus Z)\bigoplus Z_{t_1}\bigoplus\cdots\bigoplus Z_{t_k}$$
with $t_i>1$ and $t_1|t_2|\cdots|t_k$ where $a|b$ means that $a$ divides $b$. The number of summands $Z$ is called the betti number $\beta$ of $G$. The torsion subgroup is $Z_{t_1}\bigoplus\cdots\bigoplus Z_{t_k}$.

$G\equiv(Z\bigoplus Z\bigoplus Z)\bigoplus Z_3\bigoplus Z_6 \bigoplus Z_{12}$. Then $g$ is the set of $6-$tuples $(a, b, c, d, e, f, g)$ where addition is coordinatewise and $a, b, c\in Z$, $d\in Z_3$, $e\in Z_6$, $f\in Z_{12}$. A typical element could be $(1, 5, -3, 2, 4, 8)$. Note that $3|6|12$.

Note that for $m$ and $n$ relatively prime, $Z_m\bigoplus Z_n\equiv Z_{mn}$ (prove this yourself), so any finite cyclic group can be written as a direct sum of cyclic groups whose orders are powers of primes. So we can also write $G$ uniquely as
$$G\equiv(Z\bigoplus\cdots\bigoplus Z)\bigoplus Z_{a_1}\bigoplus\cdots\bigoplus Z_{a_p}$$
where the $a_i$ are powers of distinct primes.

So that was a rather long section, but it barely scratched the surface of group theory. It is pretty much most of what you need to know for algebraic topology. The next section will be a first taste of a branch of abstract algebra called homological algebra which is specialized for algebraic topology while being a subject in its own right. You will see a lot more of it in Chapter 4.

§ EXACT SEQUENCES

Exact sequences are a key tool in computation in homology, cohomolgy, and homotopy theory. This topic really belongs in Chapter 4, but I am including it here as it illustrates some of the group theory concepts we have just learned.

In this section, all groups will be abelian and written additively, but there is no reason we can't have an exact sequence of non-abelian groups.

Consider a sequence (finite or infinite) of abelian groups and homorphisms.

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

⋯    A_1     A_2     A_3     ⋯
(m-1-1) edge[dashed]  (m-1-2)
(m-1-2)  edge node [above] $\phi_1$ (m-1-3)
(m-1-3)  edge node [above] $\phi_2$ (m-1-4)
(m-1-4) edge[dashed]  (m-1-5);

The sequence is exact at $A_2$ if image $\phi_1$=kernel $\phi_2$. If this happens at every group (except the left and right ends if they exist), then the sequence is an exact sequenceexact sequence.

We will use some of what we have learned in the last section about homomorphisms to prove some facts about exact sequences.

The sequence

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

A_1     A_2     0
(m-1-1)  edge node [above] $\phi$ (m-1-2)
(m-1-2)  edge  (m-1-3);
is exact if and only if $\phi$ is an epimorphism.

Proof: Since the second map is the zero homomorphism, its kernel is all of $A_2$. So the image of $\phi$ is also all of $A_2$,and $\phi$ is an epimorphism. If $\phi$ is an epimorphism, then the image of $\phi$ is all of $A_2$, so the second map has all of $A_2$ as its kernel and is the zero homomorphism. $\blacksquare$.

The sequence

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

0     A_1     A_2
(m-1-1)  edge (m-1-2)
(m-1-2)  edge  node [above] $\phi$ (m-1-3);
is exact if and only if $\phi$ is an monomorphism.

Proof: Since the first map is the zero homomorphism, its image is 0. So the kernel of $\phi$ is 0, and $\phi$ is a monomporphism by Theorem 3.1.9.  If $\phi$ is a monomorphism, then the kernel of $\phi$ is 0 so the first map is the zero homomorphism. $\blacksquare$.

You should be very happy whenever you see this as a piece of an exact sequence:

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

0     A_1     A_2     0
(m-1-1) edge  (m-1-2)
(m-1-2)  edge node [above] $\phi$ (m-1-3)
(m-1-3)  edge (m-1-4);

By the last two theorems, the map $\phi$ is both a monomorphism and an epimorphism. So $\phi$ is an isomorphism and $A_1\equiv A_2$, and if you already know one of the groups, you also know the other. This is a very common situation in algebraic topology and this gives exact sequences a lot of their power.

I will give you two more results to try to prove on your own. We will need two new definitions.

Let $G$ be an abelian group with subgroup $H$. Then the homomorphism $i: H\rightarrow G$ is an inclusion if $i(h)=h$ for $h\in H$. (Recall the analogous definition for topological spaces.)  The homomorphism $p: G\rightarrow G/H$ with $p(g)=g+H$ is called a it projection. For nonabelian groups we modify the definition of a projection by having $H$ be a normal subgroup of $G$ and $p(g)=Hg=gH$. (In some mathematical word reuse, if $G=H\oplus K$, the maps of $(h, k)$ to either the first or the second coorcinate are also called projections.)

An exact sequence of the form

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

0     A_1     A_2     A_3     0
(m-1-1) edge  (m-1-2)
(m-1-2)  edge node [above] $\phi$ (m-1-3)
(m-1-3)  edge node [above] $\psi$ (m-1-4)
(m-1-4) edge  (m-1-5);

is called a short exact sequenceshort exact sequence.

Short exact sequences are also very common. Try to prove the next two results with the facts we have learned.

For the short exact sequence defined above, $\psi$ induces an isomorphism between $A_2/\phi(A_1)$ and $A_3$. Conversely, if $\psi: A\rightarrow B$ is an epimorphism with kernel $K$, then the sequence

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

0     K     A     B     0
(m-1-1) edge  (m-1-2)
(m-1-2)  edge node [above] $i$ (m-1-3)
(m-1-3)  edge node [above] $\psi$ (m-1-4)
(m-1-4) edge  (m-1-5);

is exact, where $i$ is inclusion.

Suppose we have an exact sequence

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

A_1     A_2     A_3     A_4
(m-1-1)  edge node [above] $\alpha$  (m-1-2)
(m-1-2)  edge node [above] $\phi$ (m-1-3)
(m-1-3)  edge node [above] $\beta$ (m-1-4);

then the following are equivalent:

* $\alpha$ is an epimorphism.

* $\beta$ is a monomorphism.

* $\phi$ is the zero homomorphism.

We can get even more information from a short exact sequence if it is split.

Consider a short exact sequence

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

0     A_1     A_2     A_3     0.
(m-1-1) edge  (m-1-2)
(m-1-2)  edge node [above] $\phi$ (m-1-3)
(m-1-3)  edge node [above] $\psi$ (m-1-4)
(m-1-4) edge  (m-1-5);

The sequence is splitsplit exact sequence if the group $\phi(A_1)$ is a direct summand of $A_2$.

In this case the sequence is of the form

(m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]

0     A_1     ϕ(A_1)⊕B     A_3     0.
(m-1-1) edge  (m-1-2)
(m-1-2)  edge node [above] $\phi$ (m-1-3)
(m-1-3)  edge node [above] $\psi$ (m-1-4)
(m-1-4) edge  (m-1-5);

where $\phi$ is an isomorphism of $A_1$ and $\phi(A_1)$, and $\psi$ is an isomorphism of $B$ and $A_3$.

Here are two more facts about split exact sequences.

Suppose we have an exact sequence