# Does having the same fundamental group imply that two spaces have the same homotopy type?

I have to prove that two different topological spaces $X,Y$ have the same homotopy type. I've been able to prove so far that $\pi_1(X)=\pi_1(Y)$ but I don't know if this is enough to say that $X$ and $Y$ are isomorphic in the category $\mathcal{HoTop}$.

I also know that two spaces with the same fundamental group do not have to be homeomorphic (i.e. an isomorphism in the category $\mathcal{Groups}$ does not imply that the objects are isomorphic in the category $\mathcal{Top}$), but I was wondering what is the situation in $\mathcal{HoTop}$. Are two spaces with the same fundamental group homotopy equivalent?

I don't know if the notation that I'm using is usual or not, so if anyone needs clarification do not hesitate of commenting.

• Both a point and the two sphere have trivial fundamental groups. – lulu Nov 10 '15 at 19:40
• The plane $\mathbb{R}^2$ and the 2-sphere $S^2$ have trivial fundamental groups, but $S^2$ is compact, while the plane is not, so... they're not homotopy-equivalent. – BrianO Nov 10 '15 at 19:49
• @DanielGerigk That's much easier anyway. I thought to delete my bogus comment, but I'll leave it — it's informative that compactness isn't homotopy-invariant. – BrianO Nov 11 '15 at 2:37
• @BrianO Compactness is not homotopy invariant ($\mathbb{R}^2\simeq \{*\}$). – Nitrogen Nov 11 '15 at 6:17