Showing that a CW space is contractible if it is endowed with a certain binary operation I am having trouble with the following homework problem, and was hoping someone could provide me with a hint: I am given a connected CW space $X$ which has a continuous associative operation $(x,\ y)\mapsto x\circ y$. It is also given that $x\circ x=x$ for any $x\in X$ and that there exists some $e\in X$ such that $x\circ e=e\circ x$ for all $x\in X$. I need to show that $X$ is contractible. 
I have noted that by Whitehead's theorem, it is enough to show that all homotopy groups of $X$ vanish. So I was thinking of using the opertation $\circ$ to show that any map $f:(S^n,\sigma_0)\to (X,\ e)$ is homotopic to the constant map to $e$ (somehow this distinguished point $e$ seems suspicious). 
I considered, for instance, $\phi :S^n\times I\to X$ by $(x,\ t)\mapsto f(x)\circ \gamma_x (t)$, where $\gamma_x $ is a path from $e$ to $f(x)$.  At $t=0$ we get the map $x\mapsto f(x)\circ e$, and at t=1 we get the map $x \mapsto f(x)\circ f(x)=f(x)$. If somehow I knew how to choose $\phi$ to be continuous (i.e., if I knew how to choose the $\gamma_x$), and if I knew that $e\circ x=e$ for all $e$, then $\phi$ would be the desired homotopy.
But I have no idea how to make $\phi $ continuous, and see no reason why $e\circ x=e$ should hold. Furthermore, I have not yet used the associativity of $\circ$ or the fact that $e$ commutes will all points of $x$. In short, I highly doubt that I am on the right track.
Any hint would be highly appreciated!
Thanks,
Roy
 A: Isn't the operation $\circ$ inherited by the $n$th homotopy groups based at $e$? Such a homotopy group $G$ will have an associative operation $\circ$ satisfying the interchange law with the group operration, and so by the Eckmann-Hilton argument, $\circ$ is the group operation. But then for $x$ in the group, $x=x\circ x=xx$, and so $x=1$. 
oops! As Jason pointed out, one needs more argument! 
I like to display the interchange law as a matrix
$$\matrix{x& y\\z&w}$$
where, say,  the horizontal composition is $\circ$ and the vertical is the group multiplication. So the above reads $(x\circ y)(z \circ w)=(xz) \circ (yw)$. Since you wanted a hint, try the matrices 
$$\matrix{e&1\\1&e} \qquad \qquad\matrix{1&e\\e&1}$$
and make deductions. 
By the way, in the more usual case where both compositions have identities, associativity comes for free, as follows from the matrix 
$$\matrix{y &1 \\ z&w}$$
Note added later: this is not best organised, so let me know if you have problems with it. But note that the two matrices involving $e$ are seemingly  the  only ones giving real information. 
