Here's the premise. Let $X$ be any topological space with distinguished base point $x_0$, and let $f: X \times X \to X$ be a map such that $f(x,x_0) = f(x_0,x) = x$ for all $x \in X$. Then $\pi_1(X,x_0)$ is abelian.
I know how to prove this 'directly', that is, construct explicit homotopies to show that composition of homotopy classes of loops commute. However, it'd be nice to see an 'algebraic' approach, working in the fundamental group itself. My first thoughts are to consider the pushforward $\phi^*: \pi_1(X \times X, (x_0, x_0)) \to \pi_1(X, x_0)$, and somehow construct an abelian quotient of the domain space. However I'm not sure exactly how this would work, as I can't see any way to do this. Some hints here would be ideal.