Contractible, homotopieclasses 
Let $X$ be a topological space. Show, that the following statements are equivalent:
1) $X$ is contractible
2) $X\neq\emptyset$ and $[X,X]$ has exactly one element
3) for every topological space $Y$ has $[Y,X]$ exactly one element

My thoughts on the proof:
1) $\Rightarrow$ 2)
Since $X$ is contractible there is a function $\varphi: X\to\{\ast\}$. Hence $X\neq\emptyset$. Else this function would not be defined.
I have to show, that $\#[X,X]=1$. Therefore for $f,g: X\to X$ continuous has to be $f\simeq g$. Then is $[f]=[g]$ and $[X,X]$ has exactly one element.
I have to give a continuos $h: X\times [0,1]\to X$ with $h(x,0)=f(x), h(x,t)=g(x)$ for all $x\in X$.
I take $h(x,t)=(1-t)f(x)+tg(x)$ which obviously holds the desired condition. Hence $f\simeq g$.
Is this implication correct? It seems so, but it seems odd, that I only need that $X$ is contractible for the not-empty-part.
Is it correct, that I have to conclude from $f,g$ continuous, that $f\sim g$ and therefore $[f]=[g]$ so the set has just one element?
Because I would do so in 2)$\Rightarrow$ 3) too, and this seems fishy...
Since I do not use that $[X,X]$ has one element. 
Thanks in advance.
 A: Your homotopy $h$ is not well-defined, since we have no way of multiplying elements of $X$ with elements of $[0,1]$. I would proceed as follows.
Since $X$ is contractible for you means that $X\simeq\{\ast\}$, I will first show that this implies (it's in fact equivalent to, and I guess you can do the other direction yourself) that $id_X$ is homotopy equivalent to some constant map on $X$. Indeed, since $X\simeq\{\ast\}$, there exist continuous maps $f:X\to\{\ast\}$ and $g:\{\ast\}\to X$ such that $f\circ g\simeq id_{\{\ast\}}$ and $g\circ f\simeq id_X$. Define $x_0:=g(\ast)$, so that $g\circ f=c_{x_0}$ (the constant map on $X$ with value $x_0$). We conclude that $c_{x_0}\circ id_X$, so the identity map on $X$ is homopopy equivalent to a constant map on $X$.
As you mentioned, the fact that $X\simeq\{\ast\}$ implies that $X$ is not empty. Let $f,g:X\to X$ be continuous, and let $H:X\times[0,1]\to X$ be a homotopy from $id_X$ to $c_{x_0}$. Then $\tilde H:X\times[0,1]\to X$ defined by $\tilde H(x,t)=H(f(x),2t)$ for $(x,t)\in X\times[0,\tfrac{1}{2}]$ and $\tilde H(x,t)=H(g(x),2-2t)$ for $(x,t)\in X\times[\tfrac{1}{2},1]$ is a homotopy from $f$ to $g$, so $f\simeq g$.
You can use the same trick to show $1\implies 3$, and then the equivalence of 1,2 and 3 follow since $3\implies 2$ is quite trivial.
