TITLE: if two space are homotopy equivalent and one is connected, prove that the other is connected as well
QUESTION [6 upvotes]: I've tried using the definition of homotopy equivalent spaces which states that X and Y are homotopy equivalent if:
There are continuous functions $f:X \rightarrow Y,g:Y \rightarrow X$ such that $f \circ g$ is homotopic to the identity map of Y and $g \circ f$ is homotopic to the identity map of X.
I don't see how this definition can help us. I know that X and Y have the same fundamental groups as well, can that help me?
Kees

REPLY [2 votes]: A rephrasing of the argument: let $X$ be connected and let $\alpha: Y\to \{0,1\}$ be continuous. Then, the composition $X\to Y \to \{0,1\}$ is constant, and the composition $Y\to X\to Y \to \{0,1\}$ is homotopic to $\alpha$. Since the composition is constant, and the homotopy can not leave a path component, $\alpha$ is constant.