What are the difference of the two following definitions of homotopy equivalence and homoemoprhism?

40 Views Asked by At

Definition 1 Let $X$ and $Y$ be topological spaces. $X$ and $Y$ are of the same homotopy type, written as $X\simeq Y,$ if there exists continous maps $f:X\rightarrow Y$ and $g:Y\rightarrow X$ such that $f\circ g\sim \operatorname{id}_Y$ and $g\circ f\sim \operatorname{id}_X$.

Definition 2 Let $X$ and $Y$ be topological spaces. A map $f:X\rightarrow Y$ is a homoeomorphism if it is continuous and has an inverse $f^{-1}:Y\rightarrow X$ which is also continuous.

What is difference between these two definitions because it look like they are the same thing. $g$ in the first definition and $f^{-1}$ in the second definition looks like the same thing.