Topology: from the Basics to Connectedness

The study of connectedness requires topology. That’s awesome, since my favorite lessons of pure mathematics concerned this very topic, because it gives a formalized well-defined setting to talk about intuitive concepts. Like connectedness! So let me introduce topology to present connectedness!

Topology? Sounds like another scary word…

It surely does. But don’t panic! I’ll make it simple. Topology is the study of locations. More precisely, it answers the question of the location of a point, with regards to other points of a set. Developed relatively recently, topology provides a powerful framework and is now a cornerstone of modern mathematics. And as data are piling up, topology is providing powerful technics to analyze them efficiently! This is what’s explained in this awesome video by the Simons foundation!

Sounds awesome… But also quite complicated!

Don’t worry, I’ll get to it slowly, starting with a great simple example!

Graph Topology

When you consider a collection of objects, it can be very messy. If it is messy, it might be a million dollar idea to structure it. Well, in the case of Facebook, it was a billion dollar idea to structure social networks, as displayed in this extract from The Social Network, the movie about the birth of Facebook by David Fincher:

I’m not sure what a social network actually is… Is it like Facebook, Twitter and other social websites?

No. At least, that’s not what I mean by social network. If you consider a set of persons, they are not organized a priori. But they actually are structured by their relations, like friendship. Now, by drawing a line between related elements, we obtain a figure known as a graph. The social network is actually the graph of human interconnections. Here is the social network of the characters of The Social Network:

The Social Network

This friendship relation… that’s exactly what Facebook is about!

Yes! Facebook has actually created a social network where people are linked by the friend on Facebook relation. It’s a simple idea. It’s also a billion dollar idea!

On Facebook, Mark is friend with Eduardo, then Eduardo is also friend with Mark. This property is known as symmetry. It’s actually the major difference between Facebook and Twitter. On Twitter, you can follow someone without having him following you.
OK. I now get what a social network is… But what about topology?

Topology is the study of how each person is located with regards to others. For instance, you can notice that Mark is a highly connected person in this figure, as he is related to 3 other persons. We say that his degree is equal to 3. This is also the case of Dustin. Both are the core of Facebook. This reveals the importance of these connections.

Is that it? You didn’t need a word that complicated to talk about the number of connections of each person!

Hehe. Topology isn’t only about that! It’s actually about a bunch of measures to be made to analyze properties of sets, based on this idea of connectedness. Regarding graphs, I’ll mention a few important concepts, but keep in mind that there are many many more.

What are these concepts?

First, let me introduce the concept of distance. The distance between two persons is the minimum number of links between them. For instance, Eduardo is at distance 1 from Mark, but he is at distance 2 from Sean. The more distance between two persons, the harder it is for them to communicate nicely. Indeed, to give a message to Sean, Eduardo would most of the time tell Mark to transfer the message. Now, on this simple example it may seem like a simple measure to make. But you have to imagine applying that to much larger social networks. As it turned out, the distance between two persons of the entire social network of Facebook has been experimentally shown to hardly ever exceed 7: This means that probably less than 6 persons separate you from Mark!

Waw, that’s cool!

This leads me to another idea. If you’re using LinkedIn, you may have notice that the direct connections may not matter as much as the second or third connections. In graph theory, the direct connections are called the neighbourhood. The second connections can then be defined as the neighbourhood of your neighbourhood… and so on for third and n-th connections. What’s amazing is how fast the size of neighbourhoods of neighbourhoods increase. Eventually, the important persons in society may not be those with a large neighbourhood, but, rather, those whose neighbourhoods of neighbourhood is large. In the Social Network, it’s typically the case of the relation between Mark and the venture capitalist Peter Thiel, who is in relation with Sean.

But how about the distance between Mark and Tyler in your example?

Well, you might say that it is infinite as there is no way to link these guys. What we rather say is that they are not connected at all. More mathematically, they belong to two different connected components. As you can see, in our example, there actually are three connected components, namely the component made of Mark, Dustin, Sean and Eduardo, the component made of Tyler, Cameron and Divya, and the component made of Erica alone. Quite often, we can study each connected component totally separately. This gives us several graphs to compare, where each graph cannot be divided. Such graphs are called connected.

Once again, I could go further, and there’s so much to say about graphs, but I’ll leave it here. If you can, please write about graph theory!

The study of social networks is an extremely dynamic field of research. In particular, scientists are interested in all sorts of relations. This leads to different topologies, with different properties, as explained in the following video:

You should check the entire video, it’s one of my favorite Big Think tutorials.

Also, I want to underline that I have done all the reasonings here with social networks. But there are plenty of great studies of networks which are being made. To name a few: Networks of cities, web pages, computers, genealogy, species, supply chains, warehouses…

Metric Topology

As you can imagine, the study of social networks gets awfully complicated when the number of people considered gets large. Weirdly enough, when the number of elements gets very high, it may become simpler to assume that there is an infinity of them! For instance, this is what’s done in statistical physics, or, to remain with studies of human interactions, in mean field games. More surprisingly, we naturally consider space and time as continuous, while some physical theorists are postulating through causal sets that spacetime is actually a directed graph. This would mean that, while spacetime is a graph made of dots, emergent descriptions of spacetime are much more understandable by considering a continuum.

Are you suggesting to consider social networks with an infinite number of persons?

Yes, I am! Obviously, we can’t work with all the structures we have defined so far. Instead, we need to keep one element of structure we used for graphs before we can talk about connectedness again. And what’s usually kept is the concept of distance. More generally, a set is a metric space if there is a distance defined for it. And this distance defines the topology. The set then becomes a topological space.

Distances are actually not the fundamental objects of topology, which are rather the open sets. However, it would be too abstract to do topology on spaces with no distance, so I’ll keep it simple here and restrict ourselves to metric topologies.
So that’s it? Given of distances between any two points, we’ve got a topology?

Basically, yes. Although, this distance must satisfy a few properties:

  • Non-negativity: the distance between two points should always be non-negative.
  • Indifference: the distance between two different points should be strictly positive.
  • Symmetry: the distance from a former point to the latter should be equal to the distance from the latter to the former.
  • Triangle inequality: the distance of a detour is higher or equal than the straight distance.

These properties are illustrated below (the distance may not correspond to “straight” lines in general metric spaces):


I still have trouble to imagine that simply giving a distance structures the set…

It really does. One of the important property our set can now have is called boundedness. A set is unbounded if the distances between two points can be greater than any number. In fact, one of the biggest questions of cosmology is about the boundedness of the Universe.

So if it is bounded, then this means that space is limited, right?

Sort of. Another way of talking about boundedness is through the concept of diameter. The diameter is the largest possible distance between two points. If the Universe is bounded, then this means that this diameter is finite, which means that all things in the Universe is at less than a diameter of the Universe away. This is the case of the visible universe. It’s also typically the case of the surface of the Earth. Indeed, the distance between two points on Earth along the surface of the Earth cannot go to infinity. In fact, the diameter, which is the largest distance between two people living on Earth, is half the circumference of the planet, which is more or less 20,000 km. As explained by Scott, this has dramatic consequences for map making.

What’s extremely interesting to study then is the shortest path between two points, which is called the geodesics. This would lead us to differential topology, which is too complicated to be discussed here, but is fascinating. After all, it’s the gateway to Einstein’s theory of general relativity. If you can, please write about these things!

Balls, Open and Closed Sets

Now, we’ll need to understand topology a bit more before talking about connectedness again… The key objects of metric spaces are balls, especially the small ones.

Balls? Really?

Yes! Just like the balls you’re thinking about, topological balls are sets defined by a center and a radius. They correspond to all the other points whose distances to the center are less than the radius. In 3-dimension space, they’re the balls you’re thinking about. In a planar 2-dimension space, a ball is a disc. In 1-dimension line, a ball is a line segment. This is displayed in the following figure.


Do the borders of the balls belong to the balls?

Hehe… That’s a great question! It leads us to define two sorts of balls. On one hand, we have the open balls, that is, all points which are at distance strictly less than the radius. On the other hand, we have the closed balls, which contain all points at distance less or equal to the radius.

Do these open and closed balls have something to do with open and closed sets of the title of the section?

Yes! An open set is basically what can be obtained by combining open balls.

What do you mean by “combining”?

I mean that the intersections and unions of open balls form open sets. But there’s one thing that’s a bit tricky: An infinite union of open balls make an open set, but an infinite intersection of open balls doesn’t necessarily make an open set. In other words, open sets are sets which can be obtained by finite intersections and possibly infinite unions of open balls.

Can you give an example?

Sure. Let’s consider a rectangle without its border. With open balls, we can cover it exactly. By exactly, I mean all of it and nothing more:

Open Set

Well, obviously, on your picture, your balls don’t cover the rectangle…

Indeed. But that’s because I put a finite number of them. To cover the rectangle, we’d need an infinity of open balls. This would be a messy thing to draw…

There’s actually a brutal but simple way to cover the rectangle: Let’s just use all the open balls which are included in the rectangle! If you do that, then any point inside the rectangle is the center of one of these balls. It’s therefore inside the union of all balls! This shows that the union of all open balls inside the rectangle is equal to the rectangle! Thus, the rectangle is an open set.

Your construction seems very general…

It is! We have been constructing the interior of the rectangle. In fact, since interiors are always open sets by construction, any set is open if and only if it is equal to its interior. Open sets are sort of sets without their frontier!

OK… What about closed sets?

It’s almost the opposite for closed sets… You obtain them by possibly infinite intersections and finite unions of closed balls.

And is there something similar to interiors but for closed sets?

Yes! We can construct the closure of any set. The construction is a little bit trickier: It is the complement of the interior of the complement. Look back up at the rectangle. You can fill the exterior of it with balls, by the construction I have mentioned. Then take all these balls out of the picture, and what you’re left with is the initial rectangle, plus its borders! That’s the closure!

So the closure is basically the set plus its borders…

Yes! That’s why any set always includes its interior, and is always included in its closure. The set is then open if and only if it equals its interior. It is closed if and only if it equals its closure. It could also equal none of those, in which case it is simply neither open nor closed.

And by the way, we usually don’t call it the borders, but rather the boundary. And we can define it properly! It corresponds to the closure minus the interior, that is, the set of points which are in the closure but not the interior. In the case of the rectangle, the boundary corresponds to the border of the rectangle we usually describe as such. How amazing is this? We have managed to describe intuitive concepts with abstract powerful well-defined mathematics!

In non-metric topology, the open sets are the key objects. They actually are what defines the topology. Closed sets are then deduced from open sets by being their complements.
But I don’t quite see how all of this is connected to connectedness…

Good one! I could actually talk about connectedness right now, but you’d be missing part of the story. I need one more tremendously important concept!


I said that topology was particularly interested in small balls. In the general setting, topology is actually rather interested in all sets containing at least an open set containing an element. In particular, this excludes sets for which the element is on the edge of the set. The set of all sets containing an open set which contains the element is called the neighbourhood of the element. This concept is essential to continuity.

Really? I thought continuity only concerned real functions…

Not at all! Continuity is actually the most important idea of topology. Consider a function and a point of the input set. The intuitive idea of the continuity of the function at the point is that small deviations of the input imply not too big deviations of the output. More precisely, no matter how much we zoom in around the output, we can zoom in so much around the input that all images of the zoomed-in input area are included in the zoomed-in output area.


This concept is so important to mathematics and so hard to understand that I’m going to spend more time on it and use formal notations to help you understand. Denote f the function and x the input. Now, take any set V of the neighbourhood of the output f(x) (that’s the zoomed-in output area!). Then, there exists a set U of the neighbourhood of the input x (the zoomed-in input area), such that images f(u) for inputs u∈U of the zoomed-in input area all belong to the zoomed-in output area V. This is displayed in the figure below:


If you understand this, then you’ve made a giant leap in mathematics!

In metric spaces, this definition of continuity is equivalent to working with open balls instead of sets of neighbourhoods, which is usually simpler for proofs.
And I guess a function would be continuous if it is continuous for all inputs…

Exactly! But amusingly (at least for me!), there is another characterization of continuous functions: A function is continuous if and only if the inverse images of open sets are open sets.

What??? What’s the inverse image?

The inverse image of an output subset is the set of all inputs whose images are in the output subset. Let me rephrase. An input is in the inverse image if and only if its image is in the output subsets. This is displayed in the following figure, where images of the inverse image belong to the output subset, while images of other inputs do not:

Inverse Image

And you’re saying that a function is continuous if and only if the inverse images of open sets are open sets?

Yes! That’s surprising, right? Now, the proof is very technical, but since the English Wikipedia doesn’t provide it, I’m giving it…

By definition, a function is continuous if and only if it is continuous for every input. This means that for every input, and for any open set around its image, there is an open set around the input such that the image of the input open set is included in the output open set. This is equivalent to saying that the input open set is included in the inverse image of the output open set. Now, the trick is that the output open set is valid in the definition of continuity for all inputs of the inverse image. So all inputs of the inverse image must have an input open set which match the definition of continuity. Now, these input open sets are all included in the inverse image, while their unions contain all elements of the inverse image. Thus, the inverse image is equal to the union of the input open sets, and is therefore an open set too. Overall, a function is continuous if and only if the inverse images of open sets are open sets.

If you haven’t understood, don’t worry, it’s a very abstract and difficult proof. But you should try to understand it. If you can, then there’s not much stopping you from becoming a mathematician!

What’s important to remark is that, through the inverse images, continuous functions sort of preserve topology! This means that if there is a continuous function between two sets, then the topology of the outputs has several similarities with the topology of the inputs. But to go further in these comparisons, we’d need functions with even more properties, called homeomorphisms. Shortly put, they are bijective continuous functions with continuous inverse functions. And the reason why they are essential is that there exists a homeomorphism between two sets if and only if the two sets have the same topology. Homeomorphisms therefore enable to classify sets with regards to their topologies.

Unfortunately, I won’t have time to dwell on this amazing concept. If you can, please write about them!


We’re good to talk about connectedness in infinite topological space, finally! But we’re not totally out of all troubles… since there are actually several sorts of connectedness!

Are you kidding me?

No. But don’t see it as a trouble. It actually multiplies the fun! Let’s start with the simplest one.

What is it?

Path connectedness. A topological space is path connected if there is a path between any two of its points, as in the following figure:

Path Connected

But what’s a path in a topological space?

Hehe… That’s a great question. A path is a continuous function that to each real numbers between 0 and 1 associates an element of the topological space. It is indeed a path between two points if the image of 0 is the first point, and the image of 1 is the second point. Simple, right?

OK… What about other definitions?

I’ll just present one more definition. It’s the most important one, and is simply called connectedness. The idea is based on the comparison of closures and interiors as we have made earlier. In fact, we should expect any subset to have a frontier. But it’s not the case, as the entire space never has a frontier in the topological sense. That’s because it is both open and closed (this is required by the definition of topology!).

Is it the only one to be both open and closed?

Sometimes yes, sometimes no. But an interesting remark is that if a subset is both open and closed, then its complement is both closed and open, as complements of open sets are closed. This means that we can divide our entire space into the subset and its complement and study each part separately. In other words, the two parts are not connected. That’s the actual fundamental definition of connectedness!

But there’s an interesting equivalent characterization of connected sets. Indeed, a set is connected if and only if all continuous functions defined on this set with values equal to 0 or 1 are constant. Now, if a set is not connected, similarly to what we’ve done with graphs, we can define connected components as the largest connected subsets.

Is connectedness equivalent to path connectedness?

As it turns out, no. More precisely, any path connected space is connected. But there are connected spaces which are not path connected. An example of such spaces is the closure of the graph of sin(1/x). But I’ll leave it here and let you study this problem on yourself.

So which one matters the most? Connectedness or path connectedness?

What matters the most between a knife and a fork? It depends on what you want to do. Path connectedness is basically stronger a concept than connectedness, and it plays a key role in Poincaré conjecture.

Let’s Conclude

I hope you’ve enjoyed this introduction to topology. It’s a topic I love but I know it’s also very technical and hard to follow. But for you to enjoy it, you have to go even further! There are so many more major concepts which I haven’t mentioned in this article, such as completeness, compactness, convexity and simple connectedness. If you’re interested in knowing, please encourage me to do so, via email, Facebook, LinkedIn, Twitter… I’m not sure how much such topics can interest you!

Applied to science, I’d say that the topology of research needs to be improved. By this, I mean that more connectivity is required to improve performance. And an important path to more interdisciplinary is science popularization. This is why I strongly invite you all to join me in the quest of making top science simple and cool. If you haven’t, you should check the guest post I’ve written on White Group Maths on the importance of popularization.

I love topology and I was a very nice surprise when I had to use it in a proof in my research. I’m still writing the paper corresponding to this proof, and, as soon as it gets published, I’ll tell you more about it! In the meantime, you should check this awesome video about topology by MyWhyU

More on Science4All

The Magic of Analysis The Magic of Analysis
By Lê Nguyên Hoang | Updated:2016-02 | Views: 1939
This article retraces the endless pursuit of the infinite that is at the basis of mathematical analysis. From the first approximations of pi to the shape of our limitless universe, from the essential usefulness of differential equations to the troubles with infinite sums, we present the great ideas of mathematical geniuses all along History.

Poincaré Conjecture and Homotopy Poincaré Conjecture and Homotopy
By Lê Nguyên Hoang | Updated:2016-01 | Views: 8927
Poincaré conjecture is the most recent major proven theorem. Posited a century ago by Henri Poincaré, this major conjecture of topology was solved by Gregori Perelman. It has revolutionized our understanding of space and raised intriguing questions regarding the global structure of our Universe.

The Tortuous Geometry of the Flat Torus The Tortuous Geometry of the Flat Torus
By Lê Nguyên Hoang | Updated:2015-12 | Views: 20481
Take a square sheet of paper. Can you glue opposite sides without ever folding the paper? This is a conundrum that many of the greatest modern mathematicians, like Gauss, Riemann, and Mandelbrot, couldn't figure out. While John Nash did answer yes, he couldn't say how. After 160 years of research, Vincent Borrelli and his collaborators have finally provided a revolutionary and breathtaking example of a bending of a square sheet of paper! And it is spectacularly beautiful!

Euler's Formula and the Utilities Problem Euler's Formula and the Utilities Problem
By Lê Nguyên Hoang | Updated:2016-01 | Views: 18688
I was a kid when I was first introduced to the deceptively simple utilities problem. It's only lately that I've discovered its solution! And it's an amazing one! Indeed, it provides a wonderful insight into some fundamental mathematics, including Euler's formula! This is nothing less than the gateway to the wonderful world of algebraic topology!


  1. I think this is among the most significant info for me.

    And i am glad reading your article. But wanna remark on some general things, The website style is wonderful, the articles is really great : D.
    Good job, cheers

Leave a Reply

Your email address will not be published. Required fields are marked *