Okay, we know what a topological space is. As we might expect, these will be the objects of some category . So we need morphisms to connect them, and for this we will use the concept of a continuous map. In some sense these will be “closeness preserving”, but as we’ll see they work a little differently than the various algebraic categories we’re used to.
Here’s the definition: a continuous map from the topological space to the topological space is a function between the underlying sets so that the preimage of an open set is open. That is, for every open set we can construct , and we require that this set be open in . That is: . We have a special term for isomorphisms in this category: “homeomorphism”. That is, a homeomorphism between topological spaces is a continuous map with a continuous inverse.
This always feels a little weird to me. Over in algebra we take sets, add extra structure, and define the morphisms to be those functions which preserve that structure. Here we’re defining the morphisms to be those which reflect the extra structure. But let’s accept it and move on.
Of course we also want to consider the categorical perspective. What does a continuous map give us in terms of the topology? It’s a functor from the topology on to the topology on , considered as categories! Indeed, if are two open sets in , then — everything that lands in also lands in — and so we send open sets to open sets and inclusion arrows to inclusion arrows. This shows that is a functor.
Even more is true. First, notice that everything in goes to some point of , so . Similarly, nothing lands in the empty subset of , so . Given a family of open sets , a point that lands in their union is in the preimage of at least one of the sets — . Similarly we see that given a finite collection of open sets , a point that lands in their intersection is in the preimage of each of them — . That is, preserves the finite products and arbitrary coproducts that we assume to exist in these categories.
The catch here is that, as far as we’ve come, we can’t really recover a function from this functor . That is, only talks about open sets rather than about points of our spaces. As yet, these two definitions aren’t quite equivalent, and we’re stuck with talking about the map as fundamental and deriving from it the functor .