Intuition behind definition of homotopic equivalence and distinction with homeomorphism 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?
 A: 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.  
A: A topological space is a pair of a set and a family of subsets (closed under certain operations that give to such family the structure of a topology).
Homemorphisms are exactly the more natural maps between such spaces: given two topological spaces $\langle X, \tau_X \rangle$ and $\langle Y,\tau_Y \rangle$ an homemorphisms $f \colon \langle X,\tau_X \rangle \to \langle Y,\tau_Y\rangle$ amounts to a bijection $f \colon X \to Y$ such that the induced map $\mathcal P(f) \colon \mathcal P(X) \to \mathcal P(Y)$ between subsets is such for all $A \subseteq X$ we have 
$$A \in \tau_X \iff \mathcal P(f)(A) \in \tau_Y$$
these kind of map are those which preserve the whole structure of topological spaces, meaning that the two objects are the same up to renaming the points of one space with the points of the other space, and the homemorphism plays the role of a dictionary that changes names.
So homemorphic topological spaces are the same in the stricter sense. Nonetheless it can be very useful sometimes consider spaces up to weaker form of equivalence. The homotopy aims to compare spaces by shape rather than topological structures: while homemorphisms preserve the lattice of open sets homotopy equivalences preserve the shape of space, where by shape we mean a characteristic of the space that is preserved up to deformation.
In order to understand why this is a good definition of equivalence up to deformation one have to understand how to formalize the concept of deformation.
Homotopy accomplishes this purpose, I recall the definition and then try to explain a possible interpretation of the concept.
An homotopy from the space $X$ to the space $Y$ is a mapping 
$$f\colon X \times [0,1] \to Y$$
this is the formal definition, anyway using the compact-open topology and the fact that $[0,1]$ is a locally compact space we can equivalently define an homotopy as a mapping 
$$f \colon X \to Y^{[0,1]}$$
i.e. as a continuous function sending each point of $x$ to a path in $Y$.
With this definition in mind an homotopy can be understood as a deformation of the function $x \mapsto f(x)(0)$ into the function $x \mapsto f(x)(1)$, where each path $f(x) \colon [0,1] \to Y$ express the trajectory along which we deform the point $f(x)$.
When you have homotopies of embeddings, and so $X \subseteq Y$, the homotopies gives you deformation of the points of $X$ along path in the bigger space $Y$ which deforms the initial space $X$ into another subspace of $Y$, namely the subset $\{f(x)(1) \mid x \in X\}$.
Now for what follows I assume you have a little knowledge of category theory.
Usually when you deal with topological spaces you work with the category $\mathbf{Top}$ of topological spaces and continuous function, when you instead work in homotopy theory you also deal with another category $\mathbf{HoTop}$ the homotopy-category of topological spaces and homotopy-classes of continuous functions (classes of continuous function that can be deformed one into the other).
Category theory teaches us that we can consider objects as the same (according to the category in consideration) if they are related by isomorphisms, i.e. pair of morphisms which are inverse.
When we work with homotopical-context, in $\mathbf{HoTop}$, the isomorphisms are mappings $f \colon X \to Y$ and $g \colon Y \to X$ which are one the inverse of the other up to homotopy (i.e. up to deformation): $g \circ f$ doesn't need to be the identity of $X$ but it must be up deformation, the same hold for $f \circ g$.
This kind of isomorphisms is weaker than homemorphisms (which preserve all topological structure) indeed it doesn't preserve neither cardinality: for instance $\mathbb R$ with the euclidean topology is homotopy equivalent to the point space.
Nonetheless there are very good reason to consider spaces up to homotopy because many property of the spaces are homotopic in the sense that they are preserved by homotopy equivalence. 
I'll make an example: for every contractible space $X$ (a space which is homotopy equivalent to the point) we have that every map $f \colon S^n \to X$ can be extended to a map $\bar f \colon D^n \to X$.
Actually there are lot of properties of this sort, problem of extension of mapping, which depend just on the homotopy of the space, not the topology.
Hope this very long answer helps :)
