Homotopy equivalent spaces have isomorphic fundamental groups - is path-connectedness necessary? I know that if $X$ and $Y$ are path-connected homotopy equivalent spaces, then their fundamental groups are isomorphic. I'm trying to find an example of two spaces with distinct fundamental groups that are homotopy equivalent in order to convince myself that the hypothesis of path-connectedness is necessary, but I'm not able to find one. Can anyone help me, please?
 A: Let $x_0 \in X$, then we can define the fundamental group of $X$ with basepoint $x_0$, written $\pi_1(X, x_0)$. If $x_1 \in X$, $\pi_1(X, x_1)$ and $\pi_1(X, x_0)$ may be different groups. However, if $x_0$ and $x_1$ lie in the same path-connected component of $X$, they are isomorphic. In particular, if $X$ is path-connected, the fundamental group of $X$ is independent of the choice of basepoint, so we can denote the fundamental group by $\pi_1(X)$. If $X$ is not path-connected, then $\pi_1(X, x_0) = \pi_1(C_{x_0}, x_0) = \pi_1(C_{x_0})$ where $C_{x_0}$ denotes the path-connected component of $X$ containing $x_0$. For example, $X = \{0\} \cup S^1 \subset \mathbb{C}$ has two path-connected components with different fundamental groups: $\pi_1(X, 0) = \pi_1(\{0\}, 0) = \pi_1(\{0\}) = 0$ and $\pi_1(X, 1) = \pi_1(S^1, 1) = \pi_1(S^1) \cong \mathbb{Z}$.
It follows that your question doesn't really make sense: what is the fundamental group of a space which is not path-connected? You need to choose a basepoint.
What you can say is the following: if $f : X \to Y$ is a homotopy equivalence, then for any $x_0 \in X$, $\pi_1(X, x_0) \cong \pi_1(Y, f(x_0))$. In particular, if $X$ and $Y$ are path-connected, $\pi_1(X) \cong \pi_1(Y)$.
