"Holes" in the natural transformation as categorical homotopy analogy

230 Views Asked by At

I recently learned of the analogy where natural transformations are sort of like "categorical homotopies"; in the same way a homotopy is a map which takes one continuous function to another, a natural transformation is a map which takes one functor to another (roughly). This analogy is certainly not perfect, but I'm wondering:

Do homotopies actually arise when we consider the category of topological spaces (or, if we start specifying topological things here and there, will we eventually reach the idea of homotopies from the idea of natural transformations)?

We cannot construct a homotopy between two functions if there is something obstructing us along the way, like a hole/singularity. Is there a category theoretic analogue of the hole?

Edit, after several helpful comments: Maybe a better phrasing is, how far does this analogy extend? I am not aware of any analogue of singularities preventing us from constructing homotopies in the category theoretic analogue.