I’ve been working on a couple of articles talking about homology, which is an interesting (but difficult) topic in algebraic topology. While I was writing, I used a metaphor with a technique that’s used in homotopy, and realized that while I’ve referred to it obliquely, I’ve never actually talked about homotopy.

When we talked about homeomorphisms, we talked about how two spaces are

homeomorphic (aka topologically equivalent) if and only if one can be *continuously
deformed* into the other – that is, roughly speaking, transformed by bending, twisting,

stretching, or squashing, so long as nothing gets torn.

Homotopy is a formal equivalent of homeomorphism for *functions* between topological spaces, rather than between the spaces themselves. Two continuous functions

f and g are *homotopic* if and only if f can be continuously transformed into g.

The neat thing about the formal definition of homotopy is that it finally gives us a strong formal handle on what this *continuous deformation* stuff means in strictly formal terms.

So, let’s dive in and hit the formalism.

Suppose we’ve got two topological spaces, **S** and **T**, and two continuous functions f,g:**S**→**T**. A homotopy is a function *h* which associates every value in the unit interval [0,1] with a function from **S** to **T**. So we can treat *h* as a function from **S**×[0,1]→**T**, where ∀x:h(x,0)=f(x) and h(x,1)=g(x). For any given value x, then, h(x,·) is a curve from f(x) to g(x).

Thus – expressed simply, the homotopy is a function that precisely describes the

transformation between the two homotopical functions. Homotopy defines an *equivalence relation* between continuous functions: continuous functions between topological spaces are topologically equivalent if there is a homotopy between them. *(This paragraph originally included an extremely confusing typo – in the first sentence, I repeatedly wrote “homology” where I meant “homotopy”. Thanks to commenter elspi for the catch!)*

We can also define a type of homotopy equivalence between topological spaces. Suppose

again that we have two topological spaces **S** and **T**. **S** and **T** are

homotopically equivalent if there are continuous functions f:**S**→**T** and

g:**T**→**S** where gºf is homotopic to the identity function for T, 1_{T}, and fºg is homotopic to the identity function for S, 1_{S}. The functions f and g are called *homotopy equivalences*.

This gives us a nice way of really formalizing the idea of continuous deformation of *spaces* in homeomorphism – every homeomorphism is also a homotopy equivalence. But it’s not both ways – there are homotopy equivalences that are *not* homeomorphisms.

The reason why is interesting: if you look at our homotopy definition, the equivalence

is based on a continuous deformations – *including* contraction. So, for example, a ball is not homeomorphic to a point – but it *is* homotopically equivalent. The contraction all the way from the ball to the point doesn’t violate anything about the homotopical equivalence. In fact, there’s a special name for the set of topological spaces that are homotopically equivalent to a single point: they’re called *contractible* spaces. *(Originally, I erroneously wrote “sphere” instead of “ball” in this paragraph. I can’t even blame it on a typo – I just screwed up. Thanks to commenter John Armstrong for the catch.*

** Addendum:** Commenter elspi mentioned another wonderful example of a homotopy that isn’t a homeomorphism, and I thought it was a good enough example that I wish I’d included it in the original post, so I’m promoting it here. The mobius band is homotopically equivalent to a circle – compact the band down to a line, and the twist “disappears” and you’ve got a circle. But it’s pretty obvious that the mobius is *not* homeomorphic to a circle!. Thanks again, elspi – great example!