# Topological Spaces and Continuity

In the last topology post, I introduced the idea of a metric space, and then used it to define open and closed sets in the space.

Today I'm going to explain what a topological space is, and what continuity means in topology.

A topological space is a set and a collection of subsets of , where the following conditions hold:

1. :both the empty set and the entire set are in the set of subsets, . is going to be the thing that defines the structure of the topological space.
2. : the union of collection of subsets of is also a member of .
3. : the intersection of any two elements of is also a member of .

The collection is called a topology on . The members of are the open sets of the topology. The closed sets are the set complements of the members of . Finally, the elements of the topological space are called points.

The connection to metric spaces should be pretty obvious. The way we built up open and closed sets over a metric space can be used to produce topologies. The properties we worked out for the open and closed sets are exactly the properties that are required of the open and closed sets of the topology.

The idea of the topology is that it defines the structure of X. We say collection when we talk about it, because it's not a proper set: a topology can be (and frequently is) considerably larger than what's allowable for a set.

What it does is define the notion of nearness for the points of a set. Take three points in the set : , , and . X contains a series of open sets around each of , , and . At least conceptually, there's a smallest open set containing each of them. Given the smallest open set around , there is a larger open set around it, and a larger open set around it. On and on, ever larger. Closeness in a topological space gets its meaning from those open sets. Take that set of increasingly large open sets around . If you get to an open set around that contains before you get to one that contains , then is closer to than is.

There are many ways to build a topology other than starting with a metric space, but that's definitely the easiest way. One of the most important ideas in topology is the notion of continuity. In some sense, it's the fundamental abstraction of topology. Now that we know what a topological space is, we can define what continuity means.

A function from topological space to topological space is continuous if and only if for every open set , the inverse image of on is an open set.

Of course that makes no sense unless you know what the heck an inverse image is. If C is a set of points, then the image is the set of points . The inverse image of on is the set of points .

Even with the definition, it's a bit hard to visualize what that really means. But basically, if you've got an open set in , what this says is that anything that maps to that open set must also have been an open set. You can't get an open set in using a continuous function from unless what you started with was an open set. What that's really capturing is that there are no gaps in the function. If there were a gap, then the open spaces would no longer be open.

Think of the metric spaces idea of open sets. Imagine an open set with a cube cut out of the middle. It's definitely not continuous. If you took a function on that open set, and its inverse image was the set with the cube cut out, then the function is not smoothly mapping from the open set to the other topological space. It's mapping part of the open set, leaving a big ugly gap.

If you read my old posts on category theory, here's something nifty.

The set of of topological spaces and continuous functions form a category, with the spaces as objects and continuous functions as arrows. We call this category Top.

Aside from the interesting abstract connection, when you look at algebraic topology, it's often easiest to talk about topological spaces using the constructs of category theory.

For example, one of the most fundamental ideas in topology is homeomorphism: a homeomorphism is a bicontinuous bijection (a bicontinuous function is a continuous function with a continuous inverse; a bijection is a bidirectional total function between sets.)

In terms of the category , a homeomorphism between topological spaces is a homomorphism between objects in Top. That much alone is pretty nice: if you've gotten the basics of category theory, it's a whole lot easier to understand that a homeomorphism is an homo-arrow in .

But there's more: from the perspective of topology, any two topological spaces with a homeomorphism between them are identical. And - if you go and look at the category-theoretic definition of equality? It's exactly the same: so if you know category theory, you get to understand topological equality for free!

• At least conceptually, there’s a smallest open set containing each [point]

No, not really. Not even conceptually. If this were true, then limits would be useless. Just consider the particular case of the "smallest" open set containing the origin in the real line.

from the perspective of topology, any two topological spaces with a homeomorphism between them are identical

No, they're equivalent. The distinction between equivalence and identity is absolutely crucial to a deep understanding of mathematics from a category-theoretic perspective.

• Tinyboss says:

We say collection when we talk about it, because it’s not a proper set: a topology can be (and frequently is) considerably larger than what’s allowable for a set.

This isn't correct. As you stated, a topological space as a set X together with a collection T of subsets of X. The power set axiom says that if X is a set, then its power set exists (and is a set). Any topology on X is a subset of the power set on X. So a topology is never "too big" to be a set.

• Brian Slesinsky says:

"both the empty set and the entire set T are in the set of subsets, T." -> it seems like the first T should be an X?

• Oded says:

Sorry, I'm having lots of trouble with this paragraph. Going over this line by line. Can anyone help?

Think of the metric spaces idea of open sets. Imagine an open set with a cube cut out of the middle.

Fine so far.

It’s definitely not continuous.

Wait, what? We just defined continuous for functions, not sets! Did I miss something? Did you mean, "It's not open"? Because that is not obvious either.. It depends on if the cube was closed or open...

If you took a function on that open set

I understood this as, "took a function which has that open set as the domain"...

and its inverse image was the set with the cube cut out

Which is why I am thoroughly confused here.. The inverse image of the function I "took" of that open set is the same open set!
I hesitate to think you meant "took a function which has that open set as its image", because I really don't read that out of "took a function on that open set", but it is the only interpretation that makes sense for me for that paragraph...

Mark, or anyone else, can you clarify?

• AnyEdge says:

At least conceptually, there’s a smallest open set containing each of them.

One of the whole points of topology is to release metric spaces from size and distance. To create similar structures where those types of measurements don't exist. The quote is very much like saying, 'Take a point on the real line. At least conceptually, there is a closest point to it.' That's obviously absurd.

• Doug Spoonwood says:

Or take a point p on the set of all rational numbers. There isn't a point closest to it under the usual absolute value metric abs[-(a, b)]. Maybe this comes easier to see in decimal form. Say we have a.bc...g as our rational. Well, if a.bc...g has a "closest" rational then it would have form a.b...gh where h is arbitrarily small. But, if that rational comes as "closest", then consider a.b...gk where k=h-j and where j is arbitrarily smaller than h. Since h-j is closer to 0 than h, and k=h-j, a.b...gk is closer to a.b...g than a.b...gh is. In this way we can always find a closer rational to any point p in the rational numbers (supposing we don't die). So, if *any* rational number which has a "closest" point to it, we would have a *infinite sequence* of contradictions. Therefore, no rational number has a closest point to it.

• Doug Spoonwood says:

Well, that doesn't quite work. But, I think I can patch it. Later, perhaps. I just need to change to addition after the first subtraction, more-or-less.

• Tinyboss says:

It's just that the rationals are an ordered field. For any rationals a and b, the rational (a+b)/2 exists, and lies between them in magnitude if they are unequal.

• Doug Spoonwood says:

That'll work, but you can show that without division or a ratio between naturals also.

Say we have a rational Q=a.bc ... d in any base system. If the proposed rational S "closest" to Q comes as less than Q, then we have S=a.bc ... (d-e)=a.bc ... fg. Then we can add h to a.bc ... fg where h is on the order of magnitude less than g in the given base system. This is a closer rational to Q. We can then add i to S and obtain a closer rational to Q. In this way, that is, after subtracting once, as long as we keeping adding a rational number at least one order of magnitude "lower" than the previous number, we'll always obtain a rational closer to the given rational. E. G. in base ten say we have 1.567 and someone proposes 1.56699 as the number closest 1.567. Well, 1.566993 is closer. And 1.5669937 is even closer, and so on. In this way, for any proposed rational number closest to another, we can obtain an infinity of rational numbers which contradict the original hypothesis. So, this isn't just a means to obtain a contradiction and thus disprove a hypothesis, it's a means to obtain an *infinity of contradictions* all of which disprove the hypothesis.

We can also start with addition and use subtraction on "smaller" orders of magnitude less than that of the last number. That is, if we have a.bc ... d=A as the proposed rational and a.bc ... (d+e)=a.bc ... f=B as its closest neighbor, where e is on the order of magnitude less than d in our given base system, then a.bc ... df=A is closer to A than B was, where d is one less than e (d=e-1) as is a.bc ... dg0000000j. E. G. in base 4 with 0, 1, 2, and 3 as our basic numerals, with 1.32301=A having its proposed closest neighbor as 1.323012, then 1.3230112 is even closer to A, as is 1.32301113, as is 1.323011122.

So, that's a second means to obtain an infinity of contradictions to the hypothesis that a rational number has a closest neighbor.

• Peter says:

The whole paragraph is weird (wrong).

In R^n you can pick x,y,z such that, according to Mark's description, x is closer to y when you use expanding open balls but x is closer to z when you use certain expanding open parallelepipeds.

Note that open balls and open parallelepipeds are both bases of the same topology on R^n -- the standard topology.

• Another problem: as was discussed in another post, "close" is a suggestive term, but it suggests some inaccurate things in the case of general point-set topology. For one thing, it suggests a total order on "closeness", which erroneously shows up when you say

If you get to an open set around that contains before you get to one that contains , then is closer to than is

But in many cases it's possible to choose a different sequence of sets that gets to first.

To say that is close to in a general topological space is just a suggestive phrasing of the assertion that there is some open set containing both and . There is a partial order by inclusion on the open sets, but it is by no means a total order. Consider, for instance, the rectangles and . Each contains points not contained in the other, so there's no way to use it to give the total order you're implying exists.

The definition of continuity is most concisely given by the inverse image condition, but it can be more suggestively given -- especially to those who recall - proofs from calculus -- as another call-and-response procedure. Given any open neighborhood of in the target space, we can find some open neighborhood of in the source space, so that the image is contained within . Colloquially, then, we can read this as saying "we can keep the image of a point under "as close as we like" to (within any given open neighborhood of ) by keeping the point "close enough" to (within some open neighborhood of ).

• Sean says:

"You can’t get an open set in U using a continuous function from T unless what you started with was an open set."

I think this is saying that if f is continuous and f(C) is open, then C is open. That is false.

• I have to admit I can't always handle these types of posts with so many symbols to keep track of. I tried.

Some commenters have pointed out errors in the Metric Spaces post ("point" for "distance", "element" for "subset") that are still present in the text. I can often slog through math-dense text if I put the effort into it (and if I recognise the symbols, which in some cases above I don't: e.g. the bold two), but each error doubles the cognitive load because I have to bear in mind not only what it does say but also what it should say. I know it's hard on Mark to wish every error fixed promptly, but for subjects like this it can tip the balance between "hard but worth it" and "too hard".

(P.S. I wonder if it would be useful to add a page to the blog containing an inventory of commonly-used symbols, with references to places where they are explained more fully, as a first port of call when we see something we don't recognise. Haven't thought it through, but I wonder.)

• AR says:

You took the words right out of my mouth.

In "The idea of the topology X is that it defines the structure of X", the first X should be a T. I'll also add that at first the symbol C is used in this post for a collection of open sets and is later used simply to mean an open set. I had to do a double take to make sure what was being defined.

These sound like nitpicks, but along with the accumulation of other errors and notational aberrations it makes reading this post somewhat frustrating and -- as someone not too familiar with topology -- doesn't inspire confidence that the outline of the concepts are accurate.

• David says:

"At least conceptually, there’s a smallest open set containing each of them. Given the smallest open set around a, there is a larger open set around it, and a larger open set around it. On and on, ever larger. Closeness in a topological space gets its meaning from those open sets. Take that set of increasingly large open sets around a. If you get to an open set around a that contains b before you get to one that contains c, then b is closer to a than c is"

I think this gives a highly misleading picture of what a topology is.You will extremely often be able to find an open set containing a and b but not c, and another open set containing a and c but not b. For instance, if your space is Hausdorff, which includes a huge number of topological spaces that we care about, including all metric spaces. So this notion of "closer" isn't very useful.

A better intuition is that topology is the study of nearness and shape, but modulo distance. That is, a topology completely discards the notion of "distance" and the concept of points being "closer" than others, yet manages to retain the concepts of "arbitrarily close" and "close enough".

"Arbitrarily close to x" is expressed by saying "For any open set containing x, ..."
"Close enough to x" is expressed by saying "There exists an open set containing x such that..."

Many ideas, like continuity, turn out only to depend on these latter two concepts, and don't need an explicit notion of distance! For instance, continuity is the notion that given a map f: X->Y, and any point x in X, all points close enough to x will map to points arbitrarily close to f(x). That is, for any open set V of Y containing y, there exists an open set U of X containing x such that f(U) is contained in V.

A lot of other ideas like limits, convergence, etc, also don't depend on an explicit idea of closeness. They only depend on the idea of "arbitrary closeness" and "close enoughness", which is what a topology provides, which allows us to study these things in a more general, abstract setting.

• On a slightly tangential note, have you looked at Mathjax for rendering math? It looks lovely, and plays well with HTML text, unlike images.

I must say I'm a bit dismayed that this bad math has been on this blog for so long. I understand Mark may be busy doing something else, but just an acknowledgment in the comments, "Thanks guys, you're right, I'll make some changes." would be nice.

• MarkCC says:

I must say, I'm sick to bloody death of people who believe that I have some sort of obligation to satisfy their demands. If you don't like it, don't read it, OK?

• David says:

I didn't read Shadrach's comment as being particularly demanding, although I can definitely see how it may have appeared somewhat blunt.

I'd like to echo a similar sentiment. I enjoy this blog a lot. There have been and continue to be many good posts. Because of this, I am also a little disappointed to see an exposition like this that contains many inaccuracies and conceptual errors, and more than mere technicalities. No one expects perfection, but from a reader's perspective, it doesn't reflect well on the blog to see such a post linger, given that a major part of the blog is about criticizing "bad math".

Let me be clear that I'm making no demands, merely a friendly observation. Take it or ignore it as you wish - I don't mind either way.

Mark, it isn't that I don't like it. It's that it is just plain wrong. I suppose I didn't consider the possibility that you don't feel the need to correct mistakes in bad math; I thought I was pretty safe with that assumption though.

• Ethan says:

you've got a typo that you might want to correct, since it's in part 1. of your first definition. you've written interchanged "T" and "X" in the text, after getting it right symbolically. might confuse a few ppl that are actually getting the defs here for the first time.

• dazzai says:

I must say, I'm sick to bloody death of people who believe that I have some sort of obligation to satisfy their demands. If you don't like it, don't read it, OK?

And we won't, Mark. For a site that advertises itself as Good Math, Bad Math, we'd expect some reasonable debate on maths. Instead we find a rude blogger with a few good ideas totally overwhelmed by a lot of personal venom and unnecessary obscenity.

• Scientopia Blogs