Last time we investigated the (very unintuitive) concept of a topological space as a set of “points” endowed with a description of which subsets are open. Now in order to actually arrive at a discussion of interesting and useful topological spaces, we need to be able to take simple topological spaces and build them up into more complex ones. This will take the form of *subspaces *and* quotients**, *and through these we will make rigorous the notion of “gluing” and “building” spaces.

## Subspaces of Euclidean Space

One of the simpler spaces we looked at last time was the circle “sitting inside” the real place . But there is a disconnect in what makes this circle itself a topological space. Indeed, we can write down a description of the points in a circle, but what are the open sets?

The fact that the circle “sits inside” the real plane points us to the correct definition: we can take any open set in with the usual (Euclidean) topology, and define its intersection with the circle to be open. That is, the topology of the circle consists of all subsets of points of the circle which can be described this way. But there is nothing special about the circle here, so this makes for a good definition:

**Definition:** Let be a topological space with topology and a subset. The *subspace topology of ** in * is defined as the topology

Let us verify that this is indeed a topology. Clearly the empty set and all of are in since . Now given a collection of open sets , their union is

And as the union is open in , the right hand side is in . A similar argument shows that finite intersections are in , so this is a valid topology.

Now there are two important spaces we need to define (as subspaces of Euclidean space) which will form the building blocks for all of our constructions. The first is the generalization of a sphere to any dimension.

**Definition****: **The set of points is called the *circle*, or the *1-sphere*, and is a topological space with the subspace topology of .

Similarly, define to be the *-sphere, *a topological space when endowed with the subspace topology from .

Finally, an *-disk,* denoted , is the set . Note that for the dimension of the ambient space is , but it is for the disk.

The 0-sphere is hence a single point, the 2-sphere is the usual surface of a sphere in three dimensions, and we must resign to the futility of visualizing any of the higher dimensional spheres (for now, at least). We can think of the -disk as just the union of the -sphere and the open ball of radius 1 centered at the origin (a closed ball, perhaps?).

We can visualize the subspace topology on, for example, , as simply the unions of “open intervals” on the circle.

The second space we’d like to define is called the *simplex* (because it’s so “simple”).

**Definition:** The standard –*simplex* is the subset of taken as the convex hull of the points:

As taken with the subspace topology.

For example, the 0-simplex is a single point; the 1-simplex is a closed interval, which we usually write ; the 2-simplex is a filled-in triangle; the 3-simplex is a filled-in tetrahedron, and so on.

The reader should note that topologically, the standard -simplex is equivalent to *any* convex hull of points in general position. Indeed, it is not hard (but very tedious) to construct a homeomorphism between two such subsets. It is additionally obvious, but perhaps even harder to make rigorous, that an -simplex is homeomorphic to an -disk.

In fact, we will soon be able to define the sphere in terms of the n-simplex, and for our applications to programming, we will build all of our spaces purely from simplices. As such, we will call them “simplicial complexes.”

Now there is a very important distinction we have to make in defining topological spaces. Even though we view one space as “sitting inside” another, for the purpose of the topological space itself nothing else in the universe exists. The circle is a circle disregarding the ambient space it lives in *or how it lives there*. To make this rigorous, we call the act of viewing a space as “being inside” another space an embedding.

**Definition: **Let be arbitrary topological spaces. An *embedding* of into is an injective map which is a homeomorphism onto its image. That is, we need to be homeomorphic to , where the latter has the subspace topology of .

Notice that the injectivity condition forces the image to not self-intersect. So last time our picture of the Klein Bottle was not an embedding in . (Instead, it was an *immersion*, but we aren’t sophisticated enough to define this yet.)

Here are six examples of the circle embedded into various topological spaces.

The first two we’ve already mentioned (the circle itself and the square, as viewed as subsets of the plane). The third (top right) is a more exotic embedding of in the plane. The fourth (bottom left) is an embedding of the circle into three-dimensional Euclidean space. The fifth is an embedding of the circle as a subspace of the 2-sphere (realized as the equator). And the last is an example of a knot. In fact, topologically a knot is *defined* to be an embedding of into . The fascinating thing is that because we do not rely on the ambient space, the essential twists and tangles that make up a knot can be rich and varied. As long as the curve does not intersect itself, it is a valid embedding. There is much work devoted to classifying knots, but we will not go into it here.

Another important and simple example of an embedding is a *simple path* in a space. That is, an embedding of the 1-simplex in . We can also have a plain old *path*, which is just a continuous (not necessarily injective) function . These show up as the star of an important topological invariant, the fundamental group.

So we’re beginning to see precisely how wild and crazy these embeddings can be (and these examples are not even pathological!) which is part of what makes topology such a flexible and useful subject. Indeed, it’s going to get crazier once we start to glue spaces together.

## Quotients of Sets: a Brief Tangent

In order to get a good feel for what a quotient space looks like, we need to be familiar with the idea of a quotient of sets. In our primer on set theory we pointed the reader to the Wikipedia page on equivalence relations, but since we’re actually going to use them in a nontrivial way, we should remind the reader of the basics. Roughly speaking, an equivalence relation is a generalization of “equality,” in that we define a new way to identify two elements of a set as “equalivalent.” The quotient of a set by an equivalence relation will then be the partition of the set into subsets of things which are identified as equivalent. Each subset in this partition is considered a single element of the quotient set. Let’s make this rigorous.

**Definition:** An equivalence relation on a set is a relation on which satisfies the following three properties:

- for all (reflexivity).
- if then (symmetry).
- if and then (transitivity).

These three properties are trivial properties of equality, and so they are reasonable constraints to enforce on a generalization of equality. For a nontrivial example of an equivalence relation (that is, one which is coarser than equality), consider the relation on the set of integers where if and have the same parity. It is easy to check this is an equivalence relation (we will have an even less trivial example in a minute).

Now every equivalence relation on a set induces a natural partition of that set. The partitions correspond to *equivalence classes* of elements of which are all equivalent to each other under . It is crucial to note that every partition gives rise to an equivalence relation as well (where two elements are equivalent if they are in the same piece of the partition). So we can define an equivalence relation by giving a partition, and vice versa.

What we’d like to do now is simply forget that elements of one equivalence class are different, and consider them collectively to be one element of a new set. This is the quotient.

**Definition: **Let be a set and an equivalence relation on . Define the *quotient set of* *by* , denoted , to be the set of equivalence classes of .

A bit of notation: we will denote the equivalence class of an element using square brackets , and hence if any two elements are equivalent, we will write . This association defines an important map called the *projection* of onto :

defined by . Naturally, this map is a surjection (since every equivalence class is nonempty), and it actually has a very important universal property which we will only mention briefly here, but will explore in more depth in future posts. That is, if is a function which preserves the equivalence relation structure (whenever , it must be that ), then there is a unique map from the quotient so that “factors through” the quotient (). Since we somehow think of this projection as a “universal” construction, we sometimes call the *canonical projection*. We are not saying much with that statement, but if it sounds mysterious the reader may ignore it. The important thing to take away from the projection map is that we will use it to define the open sets of when we return to topological spaces.

A classic example of a quotient set is that of rational numbers. Indeed, when we think of two fractions, they are pairs of integers with a special equivalence relation. Specifically, as numbers if and only if . To view this as a quotient set, let be the set (that is, pairs of integers where the second is not zero). Define a relation on by if . It is easy to see this is an equivalence relation: reflexivity and symmetry are trivially satisfied. Suppose . Then and since we want to prove we can investigate the quantity :

In particular, since is a denominator (the second entry of a pair), it cannot be zero, and so we can divide through by to get . There is a nice pictorial version of this argument as well, which we leave for the bored reader to think about.

So now that is an equivalence relation, we can define the rational numbers to be the quotient . As we just saw, this agrees with our usual notion of what it means for two fractions to be equal. Each equivalence class in this set can be represented (arbitrarily) by the pair which are relatively prime (since this uniquely determines a fraction). It is another story to ask whether the addition operation behaves well under this quotient (of course it does), and we will revisit this kind of question when we investigate the theory of groups.

## Quotient Spaces

Now that we know what a quotient of a set is, it is not hard to define a quotient of a topological space. It is just the quotient as a set with a special topology.

**Definition:** Let be a topological space and let be an equivalence relation on , and let be the canonical projection map. The *quotient topology on * is defined by declaring any subset to be open if its preimage is open in .

This is a natural definition because we want to ensure that is a continuous map of topological spaces, and every continuous map must satisfy this property. An explicit way to realize this is simply to take the union of all elements of the equivalence classes in , and check whether those elements are open as a subset of . We leave the formal verification that this satisfies the axioms of a topology to the reader.

Let’s turn to some examples. Let be a disk in with the usual topology. Define a partition of by putting every element of the boundary circle into one equivalence class, and putting every other element by itself. That is, our equivalence relation is if as points of , or if are both on the boundary of the disk. Now the quotient space “glues together” all points on the boundary of the disk (or rather, it *contracts *the boundary to a point). It is not hard to see that what we get is homeomorphic to the sphere . This animation should convince the reader.

These kinds of visual arguments are extremely important to the topologist, because giving an explicit homeomorphism between this quotient space and the sphere would be quite rigorous, but an utter waste of time. The stubbornly interested reader would better spend his time investigating the Riemann Sphere, which epitomizes this homeomorphism.

Another important remark here is that even though our original disk could be embedded in , the quotient space cannot be. As such, we should not be constrained by the ambient space of our original disk, and just imagine it (as in the animation above) floating in a sea of nothingness. Likewise with its quotient.

Likewise, we can take any topological space and any subset , and we can form the quotient of by , denoted , by creating an analogous partition where all of is in one subset of the partition, and every other point forms its own singleton class.

As a second example, let us take a filled in unit square in the plane, and observe various constructions of the spaces we introduced last time.

Note that this is homeomorphic to the disk, so we will just call it the disk. The first and simplest example is forming the Torus as a quotient of the disk by gluing opposite edges as shown.

That is, we create a partition by identifying points on the boundary which are either horizontally opposite or vertically opposite (we only glue blue to blue and red to red). One can think of simply attaching one edge to the other in the direction of the arrows. The colors indicate which edges are glued to each other. Gluing one edge first gives a cylinder, and gluing the other edges together (which are now circles) gives the torus.

The second example is slightly more complicated: instead of gluing both of the edges in the same direction, switch one of the edges so that its glued *in opposite directions*. That is, glue according to the following picture:

Now imagine this as taking the cylinder again (gluing the edges which are still in the same direction) and gluing the boundary circles together, except with a twist. If this is hard to envision in three dimensions, that’s because it’s impossible. This space is the same Klein bottle we saw last time, and if you imagine one end of the cylinder passing through the cylinder meet the other boundary circle from *inside*, you start to see this picture:

The neat thing about this is that we can still define the quotient and it will make sense regardless of whether we can picture it. Part of the allure of topological spaces is that we can define them so simply, but understanding their structure is so difficult.

A perfect example of this, and our last space to be defined as a quotient of a disk, is the real projective plane . In particular, it’s the quotient of the disk where *both* sides are glued in opposite directions.

Perhaps it is easier to see this as a quotient of a “circular” disk, since we are really just identifying the top and bottom semicircles by declaring antipodal points to be equivalent. Convince yourself that the following construction is homeomorphic to that in the above picture:

Now is the most mysterious of the spaces we’ve seen so far, but for mathematicians it is a standard object. Another way to realize it is as a quotient of by identifying two points to be the same if they lie on the same line through the origin.

We will explore the properties of , the Klein bottle, and the torus in future topology primers, but for now we still need to work on building up spaces.

## Disjoint Unions and Gluing along a Function

Perhaps more useful than gluing one space to itself is gluing one space to another.

**Definition:** Let be topological spaces and let be a continuous function on some subspace . To *glue * *to* *along * is to form the quotient space , where denotes a disjoint union and is defined by declaring the only non-trivial relations to be . We denote this space .

The disjoint union is just a formality: it says that even if our two spaces and come from the same ambient space (say, two copies of the unit disk in the plane), we consider the points from to be formally disjoint from those of , and then take a union. There is a rigorous way to view this, but we will not need it on this blog until we reach category theory.

For example, let’s glue two disks together along their boundary to form . That is, let , and consider to be the boundary circle. Define by mapping isomorphically onto the boundary of . Then the quotient is a sphere. To visualize this concretely, just imagine taking two open hemispheres and gluing them along their common equator.

In a similar way, we can achieve the higher dimensional -sphere by gluing two -disks along their common boundary . That is, every higher dimensional sphere is comprised of two “hemispheres.” This gives us one potentially awkward way of viewing by taking two filled in spheres () and gluing them together along their boundary surfaces. Note that this would involve contorting one of the spheres into a very embarrassing position, and it is considered rude to do it in public.

Now that we’ve unlocked this new ability to glue spaces together, there is a myriad of interesting spaces we can build and tinker with. As gratifying and fruitful as this may be, we should have some way of organizing a class of such spaces so that we may prove theorems about all of them simultaneously. This will be the class of simplicial complexes.

## Simplicial Complexes

Now we will construct a large class of topological spaces which are particularly tractable for analysis and manipulation in a computer. They are called *simplicial complexes*, and they are built up from the -simplices we defined earlier by gluing along sub-simplices.

Recall that an -simplex was the convex hull of any points in general position in . Let be an -simplex. We add a few natural definitions by calling each of the original points used to define a *vertex* of , and the convex hull of any subset of the vertices of a *face* of . In particular, this means that for a -simplex (a tetrahedron), we consider each triangle on the boundary, each edge connecting two vertices, and each vertex itself a “face” of the simplex. If we need to distinguish a certain kind of face, we will prefix it by the number of points used to define it. i.e., an edge of the tetrahedron would be a -face.

**Definition:** A *simplicial complex* is a topological space realized as a union of any collection of simplices (of possibly varying dimension) which has the following two properties:

- Any face of a simplex is also in .
- The intersection of any two simplices of is also a simplex of .

We can realize a simplicial complex by gluing together pieces of increasing dimension. First start by taking a collection of vertices (0-simplices) . Then take a collection of intervals (1-simplices) and glue their endpoints onto the vertices in any way. Note that because we require every face of the intervals are again simplices in our complex, we *must* glue every endpoint of an interval onto one of the vertices in . Continue this process with , a set of 2-simplices, and so on until you reach a terminating set (or not, but on this blog our complexes always will). It is easy to see that the union of the form a simplicial complex. Define the *dimension* of the cell complex to be .

There are some picky restrictions on how we glue things that we should mention. For instance, we could not contract all edges of a 2-simplex and glue it all to a single vertex in . The reason for this is that would no longer be a 2-simplex! Indeed, we’ve destroyed its original vertex set, and it is no longer a convex hull. The gluing process hence needs to preserve the original simplex’s boundary. If we want to be more flexible with our gluing rules, we would need a more general structure called a CW-complex. For all intents and purposes, CW-complexes and simplicial complexes are equivalent, but CW-complexes are much more difficult to represent in a computer (this author does not believe they can be, because they allow for arbitrary kinds of quotients). We will not discuss them here.

Despite the restrictions, we can still build a wide variety of spaces as simplicial complexes. For instance, a disk is homeomorphic to any 2-simplex, and the circle can be realized as three 1-simplices glued to form a triangle’s boundary. Even better, we can realize the torus, the klein bottle, and the projective plane as simplicial complexes by decomposing the square into two triangles, and gluing the boundaries together as we did earlier in this post. In fact, most spaces we’ve considered thus far is a simplicial complex. The easiest example of a space which cannot be realized as a simplicial complex is an open ball. Since all of our -simplices are closed as subsets of , and we are taking finite unions of them (fudging a few details), the result will always be a closed subset of for some .

We’ve had kind of a whirlwind ride through what should be a more slowly-digested subject. While there is still more theory to come before we can reach the applications, we’re about to depart from the world of point-set topology and move toward algebraic topology. That is, we’re going to construct topological invariants (recall, properties preserved by homeomorphisms) that are based in algebra. But point-set topology is still quite an interesting subject, and we’d like to point the reader to a few books for further reading. The largest and most mathematical is a textbook by Munkres. A denser but shorter paperback text (which this author learned the subject from originally) is by Gamelin and Greene. Perhaps the best text for a beginner would be that of Mendelson, as the other two go far beyond what is covered in that text.

In any event, next time we’ll start to develop these algebraic invariants, and to do that we have to develop some algebra. Until then!

I think there’s a typo in your definition of an n-sphere. You have the sum of the square of the coordinates going from 1 to n (sorry, I don’t know how to do equations) and I think it should run from 1 to n+1, as it does implicitly in the definition of a circle above.

LikeLike

Yup, thanks for catching that! Leaving out the last coordinate would make it into a cylinder.

LikeLike

Typo: “anitpodal”.

LikeLike

Excellent post!

LikeLike

In previous Primer, you said, “We will also spend some time developing topological invariants which allow us to “count” the number of “holes” in a space.” Since this Primer ends with the promise of laying out those invariants, I’m eager to see the next Primer.

I’ve been wandering around the web, ever since I stumbled on the Betti numbers, trying to grasp the essential nature of holes of different dimensions in a space. I majored in math and did some higher algebra, but never got to topology. Your Primer-Application-Code approach is ideal for the math amateur. Pitch is non-trivial, but favors intuition over formalism.

I’m also a programmer and have been soaking up Python after a long time away from coding. It has long struck me that readable, executable code can benefit abstract math greatly–both as an unambiguous statement of truth and as an educational tool. Algorithms are not only for splines. Code could one day unify mathematical notation and automate/validate proof.

My current quest started with trying to understand why the Euler characteristic should be 2 for (even n)-spheres and 0 for (odd n)-spheres. That lead me to Betti numbers. I read that

n-spheres have Betti numbers (leaving out the later zeros) for n=0 thru 4

2

1, 1

1, 0, 1

1, 0, 0, 1

1, 0, 0, 0, 1

and n-toruses have Betti numbers for n=0 thru 4 <— Warning: Not n-torus pretzels!

1

1, 1

1, 2, 1

1, 3, 3, 1

1, 4, 6, 4, 1

The first Betti number b(0) gives number of connected components and the remaining b(i) give the number of holes of dimension (i+1). The vertical leg and hypotenuse numbers make sense to me, but I am struggling with the interior triangle. How can n-spheres have zero middle-dimension holes when n-toruses have such rich–and familiar (!)–structure?

Is this the type of thing you plan to answer? Hope so–I've been going in circles. I know that you can alternately add and subtract Betti numbers to reach the Euler characteristic, but I cannot find any gut-level motivation for understanding the essential why of the even/odd split for spheres.

Congrats on an outstanding blog. I rarely post anywhere, so I'm getting it all out at once tonight.

LikeLike

Yes, I am planning to answer these kinds of questions, and the answers are (surprisingly) that it depends on your definition of a “hole.” Betti numbers constitute one definition, and for sufficiently nice spaces this will correspond with the more general (and mysterious) definition which is in terms of so-called “homotopy theory.” I plan to give at least one primer on homotopy theory and one on homology theory (betti numbers come from homology theory). The reason is essentially that homotopy theory is much easier to visualize, but chaotic to compute, and homology theory is easy to compute, but harder to understand intuitively. Indeed, we will write programs which take as input a data set, and try to discover the “most prominent” topological features of the underlying manifold (which we assume the data was sampled from with noise). This goes by the name “persistent homology” and is more or less cutting-edge research. In fact, I have one of these programs already written and waiting to be posted! I just need to lay all of the ground work for it and find an interesting data set to test it on 🙂

To answer your question about n-holed tori, let’s look at the standard 1-torus. The way you should visually think about a 1-dimensional “hole” is the homotopy theory view: a 1-dimensional hole is a closed loop, where we consider two closed loops to be equivalent if you can continuously transform one into the other (there are many more details but this is the essential point). Then you can take a torus and find two distinct loops which can’t be transformed into each other: the longitudinal and latitudinal holes. On, say, a 2-sphere, the problem is that all closed loops contract to a single point (the “empty” loop), and so there are “no” 1-dimensional holes. The proper way to realize these rigorously is via group theory (and for homology theory, it’s abelian groups or rings or vector spaces depending on your preference), so we would say that the first homotopy group of the sphere is the trivial group while it’s for the torus. For higher dimensional holes, we have to talk about what it means to have a “closed” 3-dimensional loop, and what it means to continuously transform one into the other. This will lead us to define a general homotopy of maps, and talk about a 3-dimensional loop as a homotopy equivalence class of continuous maps . Of course, homology and Betti numbers approach this question in a slightly different way, and they only coincide when the groups involved are abelian (there’s a lot more to say, though).

Unfortunately the only way to really understand the formula for Euler characteristic is via homology, and even to me it appears to be a really convenient coincidence. If you really want to get into this stuff, the right text is Hatcher’s Algebraic Topology (I believe the text is free to download on his website). It’s got a steep learning curve (chapter zero is especially hard for a first chapter), but chapters 1-3 cover pretty much all of the background one would need to start reading research papers. It’s also got a category-theoretical feel to it by chapter 2, and before I get to persistent homology on this blog I’ll need to talk at least a little bit about category theory (which of course comes with its own wonderful computational projects).

Thanks for reading!

LikeLike

A very understandable treatment of gluing and related matters, thank you! One minor correction: in the first section “Subspaces of Euclidean Space” it is stated “The 0-sphere is hence a single point”, but that’s incorrect — the 0-sphere consists of the two real numbers 1 and -1.

LikeLike