TITLE: Hatcher chapter 0 exercise.
QUESTION [5 upvotes]: Show that $f:X \rightarrow Y$ is a homotopy equivalence if there exist maps $g,h:Y \rightarrow X$ such that $fg \simeq \mathbb{1}$ and $hf \simeq \mathbb{1}$.
Why isn't this trivial. Surely if f is a homotopy equivalence we get the maps for free with say g=h.

REPLY [5 votes]: If you are familiar with categories then this can help:
$f:X\rightarrow Y$ is a homotopy equivalence in category $\mathbf{Top}$
is exactly the same statement as: $\left[f\right]:X\rightarrow Y$
is an isomorphism in category $\mathbf{hTop}$.
$g,h\in\mathbf{Top}\left(Y,X\right)$ with $fg\simeq1$ and $hf\simeq1$
is exactly the same statement as: $\left[g\right],\left[h\right]\in\mathbf{hTop}\left(Y,X\right)$
with $\left[f\right]\left[g\right]=1$ and $\left[h\right]\left[f\right]=1$.
Based on the last result we find: $\left[g\right]=\left[1\right]\left[g\right]=\left(\left[h\right]\left[f\right]\right)\left[g\right]=\left[h\right]\left(\left[f\right]\left[g\right]\right)=\left[h\right]\left[1\right]=\left[h\right]$. 
Then we have $\left[f\right]\left[g\right]=1$ and $\left[g\right]\left[f\right]=\left[h\right]\left[f\right]=1$
or equivalently: $\left[f\right]$ is an isomorphism.
The last statement is exactly the same
statement as: $f$ is a homotopy equivalence.