I am a physics student and have come across the definition of homotopic equivalence of two spaces as existence of two functions $f:X \to Y,g: Y \to X$ such that $g \circ f$ and $f \circ g$ are homotopic to the identity on $X$ and $Y$ respectively. However, I am not being able to appreciate the motivation behind this definition. How is this consistent with the "bending, shrinking and expanding" of two spaces into each other?
I can see why all homeomorphisms are homotopic equivalences. But how what extra freedom than homeomorphism does the above definition give and in what way?
By bending, shrinking and expanding $\mathbb R^2 \setminus \{0\}$, you cannot get the circle $S^1$, and yet you see that every loop in the plan without origin must be understood as a number of positive and negative turn around the origin.
Look into the notion of retraction, especially retraction by (strong) deformation.