# The Unapologetic Mathematician

## Homotopies as 2-Morphisms

Last time, while talking about homotopies as morphisms I said that I didn’t want to get too deeply into the reparameterization thing because it could get too complicated. But since when would I, of all people, shy away from 2-categories? In case it wasn’t obvious then, it’s because we’re actually going to extend in the other direction.

Given any two topological spaces $M$ and $N$, we now don’t just have a set of continuous maps $\hom(M,N)$, we have a whole category consisting of those maps and homotopies between them. And I say that composition isn’t just a function that takes two (composable) maps and gives another one, it’s actually a functor.

So let’s say that we have maps $f_1,f_2:M\to N$, maps $g_1,g_2:N\to P$, and homotopies $F:f_1\to f_2$ and $G:g_1\to g_2$. From this we can build a homotopy $G\circ F:g_1\circ f_1\to g_2\circ f_2$. The procedure is obvious: for any $t\in[0,1]$ and $m\in M$, we just define

$\displaystyle[G\circ F](m,t)=G(F(m,t),t)$

That is, the time-$t$ frame of the composed homotopy is the composition of the time-$t$ frames of the original homotopies. It should be straightforward to verify that this composition is (strictly) associative, and that the identity map — along with its identity homotopy — acts as an (also strict) identity.

What we need to show is that this composition is actually functorial. That is, we add maps $f_3:M\to N$ and $g_3:N\to P$, change $F$ and $G$ to $F_1$ and $G_1$, and add homotopies $F_2:f_2\to f_3$ and $G_2:g_2\to g_3$. Then we have to check that

$(G_2*G_1)\circ(F_2*F_1)=(G_2\circ F_2)*(G_1\circ F_1)$

That is, if we stack $G_2$ onto $G_1$ and $F_2$ onto $F_1$, and then compose them as defined above, we get the same result as if we compose $G_2$ with $F_2$ and $G_1$ with $F_1$, and then stack the one onto the other.

This is pretty straightforward from a bird’s-eye view, but let’s check it in detail. On the left we have

\displaystyle\begin{aligned}{}[(G_2*G_1)\circ(F_2*F_1)](m,t)&=[G_2*G_1]([F_2*F_1](m,t),t)\\&=\left\{\begin{array}{lr}G_1([F_2*F_1](m,t),2t)&0

Meanwhile, on the right we have

\displaystyle\begin{aligned}{}[(G_2\circ F_2)*(G_1\circ F_1)](m,t)&=\left\{\begin{array}{lr}[G_1\circ F_1](m,2t)&0

And so we do indeed have a 2-category with topological spaces as objects, continuous maps as 1-morphisms, and continuous homotopies as 2-morphisms. Of course, if we’re in a differential topological context we get a 2-category with differentiable manifolds as objects, smooth maps as 1-morphisms, and smooth homotopies as 2-morphisms.