The title essentially says it all. Consider the category $\mathfrak{Top}\_2$ of triples $(J,e\_0,e\_1)$ where $J$ is a topological space, and $e\_i \in J$. There is an obvious generalization of the definition of homotopic maps. Suppose we have selected $(J,e\_0,e\_1)\in \mathfrak{Top}\_2$. We could say that two continuous maps $f,g:X\to Y$ are "$J$-homotopic" if there is a continuous map $h:X\times J\to Y$ such that $h(x,e\_0) = f(x)$ and $h(x,e\_1) = g(x)$. We could then define $\pi\_1 (X,x)$ to be the set of continuous maps $f:J\to X$ satisfying $f(e\_0)=f(e\_1)=x$, with $J$-homotopic maps identified. Here in order to define composition of paths in the naive way, we need to have picked some homeomorphism continuous map from $J$ to $(\{0\}\times J\cup \{1\}\times J)/((\{0\},e\_1) = (1,e\_0))$, taking $e\_0$ to $e\_0\times 0$ and $e\_1$ to $e\_1\times 1$. I have two questions:


1. Can $([0,1],0,1)$ be characterized as an object in $\mathfrak{Top}\_2$ in a purely categorical manner?
2. When is $\pi\_1 (X,x)$ a group? For that matter, when is $\pi\_1 (X,x)$ associative?


Essentially, the question comes down to: what properties of $[0,1]$ are needed in order to do homotopy theory?



What properties make $[0,1]$ a good candidate for defining fundamental groups?
The answer to 1 is yes. For the purpose of this answer, a **bipointed space** is a topological space $J$ equipped with distinct closed points $e\_0$ and $e\_1$. As you say, for any bipointed space $J = (J, e\_0, e\_1)$, we can form a new bipointed space $J \vee J$ by taking the disjoint union of two copies of $J$, identifying the first $e\_1$ with the second $e\_0$, and giving the resulting space the obvious pair of basepoints.


**Theorem:** In the category of bipointed spaces $J$ equipped with a map $J \to J \vee J$, the terminal object is the bipointed space $([0, 1], 0, 1)$ equipped with the map "multiplication by 2" from $[0, 1]$ to $[0, 1] \vee [0, 1] \cong [0, 2]$. 


Or informally: $[0, 1]$ has the structure needed in order to be able to define and compose paths, and is universal as such.


The theorem is proved [here](http://arxiv.org/abs/1010.4474), and is a variant of a result of Peter Freyd's (which characterized the interval set-theoretically and order-theoretically, but not topologically). The idea that $[0, 1]$ is universal with the structure needed for homotopy theory is expanded on in [these talk slides](http://www.maths.ed.ac.uk/~tl/pisa/).


