# Topological Spaces: Defining Shapes by Closeness

When people talk about what a topological space is, you’ll constantly hear one refrain: it’s just a set with structure!

I’m not a fan of that saying. It’s true, but it just doesn’t feel right to me. What makes a set into a topological space is a relationship between its members. That relationship – closeness – is defined by a structure in the set, but the structure isn’t the point; it’s just a building block that allows us to define the closeness relations.

The way that you define a topological space formally is:

A topological space is a pair $(X, T, N)$, where $X$ is a set of objects, called points; $T$ is a set of subsets of $X$; and $N$ is a function from elements of $X$ to elements of $T$ (called the neighborhoods of $X$ where the following conditions hold:

1. Neighborhoods basis: $\forall A \in N(p): p \in A$: every neighborhood of a point must include that point.
2. Neigborhood supersets: $\forall A \in N(p): \forall B \in X: B \supset A \Rightarrow B \in N(p)$. If $B$ is a superset of a neighborhood of a point, then $B$ must also be a neighborhood of that point.
3. Neighborhood intersections: $\forall A, B \in N(p): A \cap B \in N(p)$: the intersection of any two neighborhoods of a point is a neighborhood of that point.
4. Neighborhood relations: $\forall A \in N(x): \exists B \in N(x): \forall b \in B: A \in N(b)$. If $A$ is a neighborhood of a point $p$, then there’s another neighborhood $B$ of $p$, where $A$ is also a neighborhood of every point in $B$.

The collection of sets $T$ is called a topology on $T$, and the neighborhood relation is called a neighborhood topology of $T$.

Like many formal definitions, this is both very precise, and not particularly informative. What the heck does it mean?

In the previous topology post, I talked about metric spaces. Every metric space is a topological space (but not vice-versa), and we can use that to help explain how the set-of-sets $T$ defines a meaningful definition of closeness for a topological space.

In the metric space, we define open balls around each point in the space. Each one forms an open set around the point. For any point $p$ in the metric space, there are a sequence of ever-larger open-balls of points around $p$.

That sequence of open balls defines the closeness relation in the metric space:

• a point $q$ is closer to $p$ than it $r$ is if $q$ is in one of the open balls around $p$, which $r$ isn’t. (In a metric space, that’s equivalent to saying that the distance $d(q, p) < d(q, r)$.)
• two points $q$ and $r$ are equally close to $p$ if there is no open ball around $p$ where $q$ is included but $r$ isn’t, or where $r$ is included but $p$ isn’t. (In a metric space, that’s equivalent to saying that $d(q, p) = d(r, p)$.)

In a topological space, we don’t neccessarily have a distance metric to define open balls. But the neighborhoods of each point $p$ define the closeness relation in the same way as the open-balls in a metric space!:

• The neighborhoods $N(p)$ of a point are equivalent to the open balls around $p$ in a metric space.
• The open sets of the topology (the members of $T$) are equivalent to the open sets of the metric space.
• The complements of the members of $T$ are equivalent to the closed sets of the metric space.

One of the most important ideas in topology is the notion of continuity. Some people would say that it’s the fundamental abstraction of topology, because the whole idea of the equivalence between two shapes is that there is a continuous transformation between them. And now that we know what a topological space is, we can define continuity.

Continuity isn’t a property of a topological space, but rather a property of a function between two topological spaces: if $(T, X_T, N_T)$ and $(U, X_U, N_U)$ are both topological spaces, then a function $f: X \rightarrow Y$ is continuous if and only if for every open set $C \in X_U$, the inverse image of $f$ on $C$ is an open set in $X_T$. (The inverse image of $f$ is the set of points $x \in X_T: f(x) \in C$).

Once again, we’re stuck with a very precise definition that’s really hard to make any sense out of. I mean really, the inverse image of the function on an open set is an open set? What the heck does that mean?

What it’s really capturing is that there are no gaps in mapping from one space to the other. If there was a gap, it would create a boundary – there would be a hard edge in the mapping, and so the inverse image would show that as a closed set. 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 only mapping part of the open set, leaving a ugly, hard-edged gap.

In topology, we say that two shapes are equivalent if and only if they can be continuously transformed into each other. In intuitive terms, that continuous transformation means that you can do the transformation without tearing holes are gluing edges. That gives us a clue about how to understand this definition. What the definition means is really saying is pretty much that there’s no gluing or tearing: it says that if a set in the target is an open set, the set of everything that mapped to it is also an open set. That, in turn, means that if $f(x)$ and $f(y)$ are close together in $U$, then $x$ and $y$ must have been close together in $T$: so the structure of neighborhood relations is preserved by the function’s mapping.

One continuous map from a topological space isn’t enough for equivalence. It’s possible to create a continuous mapping from one topological space to another when they’re not the same – for example, you could map part of the topology $T$ onto $U$. As long as for that part, it’s got the continuity properties, that’s fine. For two topologies to be equivalent, there must be a homeomorphism between the sets. That is, a function $f$ such that:

• $f$ is one-to-one, total, and onto
• Both $f$ and $f^{-1}$ are continuous.

As a quick aside: here’s one of the places where you can see the roots of category theory in algebraic topology. There’s a very natural category of topological spaces. The objects in the category are, obviously, the topological spaces. The arrows are continuous functions between the spaces. And a homeomorphism (homo-arrow) in the category is a homeomorphism between the objects.

## 1 thought on “Topological Spaces: Defining Shapes by Closeness”

1. John Armstrong

So, when you’re defining a topology by neighborhoods you don’t need to define the open sets. The two definitions are equivalent; you can derive a notion of open sets from the notion of neighborhoods. In fact, neighborhoods don’t even have to be open, in general.

After clarifying that, it seems you’re defining a function $N: X -> T \subseteq P(X)$, assigning to each point in the space a subset. In fact, you want to assign to each point a set of subsets, if you insist on defining this in terms of a function in the first place, rather than just as a relation: “the set $N$ is a neighborhood of the point $x$”

Normally when you’re approaching topology from neighborhoods first — which is a relatively uncommon practice in general topology, albeit one I find more natural in some ways — you first define what a filter is in a general partially-ordered set. Then for each $x\in X$ you take a filter $N(x)$ in the power set $P(X)$, ordered by subset-inclusion; this handles your conditions 2 and 3. You insist each element $U\in N(x)$ contain $x$ — your condition 1 — and another condition equivalent to your condition 4.

A “neighborhood basis”, by the way, is not a condition; it’s a filter base for the filter at a given point. The full neighborhood filter itself is a filter base, though usually you pick a base that’s much smaller than the whole filter.

From this point, you can define open sets: $O\in T$ if and only if for every $x\in O$ there is some neighborhood $N\in N(x)$ such that $N\subseteq O$. In intuitive terms, if $S$ is not open then it contains some border-point $p$, and no neighborhood of $p$ is contained within $S$ since every one must slop over outside $S$.