Show that every contractible space is connected. So I'm trying to show every contractible topological space is connected. At the moment I've established that $X$ is contractible iff there is a homotopy equivalence $f:\{x_0\}\to X$ for some $x_0\in X$, but I'm having trouble showing that if $X$ and $Y$ are homotopy equivalent and $X$ is connected, then so is $Y$ (from which the result would follow, as $\{x_0\}$ is clearly connected).
 A: Let $H: X \times I$ be a contracting homotopy to $p \in X$, so that 


*

*$H$ is continuous.

*$H(x,0)=x$ for all $x \in X$.

*$H(x,1)=p$ for all $x \in X$.

*$H(p,t)=p$ for all $t$. 


Then for each $x \in X$ we have a continuous path $p_x: [0,1] \to X$ such that $p_x(0)=x, p_x(1)= p$, namely $p_x(t)=H(x,t)$ where we restrict $H$ to $\{x\} \times I$, reallly, so $p_x$ is continuous as $H$ is.
Then clearly $X$ is path-connected: If $x,y \in X$ define $p: I \to X$ by
$$p(t)= \begin{cases} p_x(2t)& 0 \le t \le \frac12\\
                      p_y(2-2t) & \frac12 \le t \le 1\\
        \end{cases}$$
which is continuous by the pasting lemma for two closed sets (note that $t=\frac12$ is consistent as $p_x(1)= p = p_y(1)$, so they connect); we go from $x$ to $p$ via $p_x$ and then beckwards from $p$ to $y$ via $p_y$.
And a path-connected space is connected. (Follows from $I$ being connected and continuous paths preserving connectedness, so $p[I]$ also is connected.)
A: I'll write an outline to what I think works.
Let $H(x,t):X\times [0,1]\to X$ be the homotopy contracting the space to a point $x_0$. I will just show that for all $x\in X$ there exists a path $\gamma_x:[0,1]\to X$ such that $\gamma_x(0)=0$ and $\gamma_x(1)=x_0$. I leave it to construct a path from $x_0$ to any $y\in X$ and that create a path $\gamma_{x,y}:[0,1]\to X$ such that $\gamma_{x,y}(0)=x$ and $\gamma_{x,y}(1)=y$.
Define $\gamma_x(t):=H(x,t)$ and recall that $H(\cdot,0)=Id_X$, hence $\gamma_x(0)=x$. Since $H$ is continuous, the projection $\pi_{I}(x,t)=t$ is continuous, and $\gamma_x(t)=H(x,t)$ is continuous.
