In this writeup, I hope to give an intuitive introduction to some important topological concepts. The central question we will answer is the following: what differentiates a circle from a line?
We will discover that this problem reduces to the following: why is it impossible to define a continuous, bijective function from a circle to a line?
Recall that “bijective” essentially means that we must “pair up” points on the circle and line such that each point belongs to exactly one pair.
To get a sense for why this task is impossible, feel free to try some examples! For instance, if we define the following function between the circle and the interval where every point on the circle is mapped to its angle in radians:

The section highlighted in red is discontinuous because it jumps from to i.e. it jumps from the tail of the line to its head.
Exercise
Note that the bijective condition is important. What are some simple continuous, non-bijective functions from a circle to a line?
Answer
One function maps every point on the circle to , but a less trivial function can assign to the point at angle like so:
You’ll see that the problem essentially becomes the following:
How can I prove that it’s impossible to “continuously deform” a circle into a line?
We’ll make this notion of continuous deformation rigorous later with the idea of a homeomorphism, but we need to define continuity first!
As an aside, you may be used to visualizing functions like this:

A typical illustration of the function .
However, when considering functions in topology, it’s often more helpful to draw the input and output spaces separately, like so:

How I prefer to visualize . You can also illustrate the input and output spaces in more creative ways to highlight certain relationships: for instance, by bending the input line at , we highlight the symmetry between and .
Now, we can move on to give a more proper definition of what it means for a function to be continuous.
Continuity and open sets
If we have a continuous function and both and are metric spaces, we have the following notion of continuity:
For all , if we allow to vary a little in all directions, should be allowed to vary a little in all directions as well.
Formal definition:
For every and , there must exist some such that
For instance, taking and :

If we allow to either increase a little or decrease a little, the input should be allowed to increase or decrease a little as well.
Now, consider the discontinuous function .

For the input-output pair , varying the output around only allows the input to vary around in one direction. Therefore, the floor function is discontinuous.
We now introduce the notion of an open set as a set of points such that each point within the set can vary a little in all directions while still staying in the set. For instance, the interval on the real line is an open set, but and are not.
Formal definition: open set
An open set is a set such that for all , there exists some such that
Then, we can rewrite our continuity condition as the following:
If is continuous, the pre-image of any open set in under must be an open set in .
Recall that the pre-image of a set in the output space is the set of input points that map to some element in . For instance, taking , the pre-image of is . Both sets are open, so this satisfies our continuity condition.
A fun way I like to think about this condition:
If we specify an output space where every point has some “room to breathe”, every point in the input space must have some “room to breathe” as well.
Exercise
Prove that this is equivalent to the epsilon-delta definition of continuity.
Exercise
Why can’t we instead define a continuous function as a function that maps open sets to open sets? To see why not, find a function (or multiple) that is really continuous, but wouldn’t be under this modified definition.
For some more fun, also find a function that is continuous under this definition but really isn’t. You may have to get a bit creative with choosing input and output spaces!
Discarding the metric
Importantly, note that our new definition of continuity depends only on the open sets in each metric space, not the underlying distances. Therefore, instead of defining a topological space as , we define it as , where is the set of open sets on . Note that and must both be open by definition. Additionally, we can show that open sets must satisfy two additional properties:
- The union of several (potentially infinite) open sets is still an open set.
- The intersection of finitely many open sets is also an open set.
Exercise
Can you find an infinite collection of open sets on whose intersection is , and therefore not an open set?
A fun topological space to think about is the discrete space, in which every subset of is an open set.
Exercise
Can you construct a metric consistent with this topological space?
Homeomorphisms
With this definition of topological spaces, we can now speak about one of the most important concepts in topology: homeomorphisms. An intuitive definition of homeomorphism:
Two topological spaces are homeomorphic if they can be “continuously deformed” into one another.
Some classic examples: a circle is homeomorphic to a square, the real line is homeomorphic to , and a coffee mug is homeomorphic to a donut. Here’s a fun visual from Wikipedia:

More rigorously:
Two topological spaces and are homeomorphic if there exists a continuous bijection between them.
Exercise
Using this definition, how can we show that the real line is homeomorphic to ?
Finally, using our open set definition of continuity, we can say:
Two topological spaces are homeomorphic iff there exists a bijection between their open sets.
Compactness
Compactness is a way to capture some aspects of finiteness when dealing with continuous spaces. For instance, a finite set of real numbers always has a maximum; this is not true for an infinite set. Similarly, a continuous function from a compact space to always has a maximum; this is not true in general.
A prototypical example of this is the fact that is compact, while is not.
Exercise
Find a function on that has no maximum.
