Example for not deformation retraction but retraction My professor introduce following example to explain the difference of retraction and deformation retraction. 
Consider $X=B^2$. 
Let $A=${lower part of $B^2$}
I can find $A$ is retract of $X$, by giving projection map on upper part and identity map on lower part. Then using pasting lemma guarantee the continuity.
But, I don't know how to show $X$ doesn't have deformation retract. Please explain why the space doesn't have deformation retract. Thank you.
 A: In order for $A$ to be a deformation retract of $X$, $A$ has to be a subset of $X$. Thus your example makes little sense. But we can fix it.
Let 
$$X=\big\{(x,y)\in\mathbb{R}^2\ \big|\ \lVert(x,y)\rVert\leq 1\text{ and }y\neq 0\big\}$$
$$A=\big\{(x,y)\in\mathbb{R}^2\ \big|\ \lVert(x,y)\rVert\leq 1\text{ and }y> 0\big\}$$
This time $A\subseteq X$ and there's an obvious retraction
$$r:X\to A$$
$$r(x,y)= (x,|y|)$$
But $A$ is not a deformation retract of $X$. Indeed, $X$ cannot be homotopy equivalent to $A$ because $X$ has two connected components while $A$ has one (in other words: connectedness is a homotopy invariant). And a deformation retraction is a special case of homotopy equivalence.
This example can be simplified even further. Let $X=\{-1,1\}$ (with discrete topology) and $A=\{1\}$. Then $A$ is a retract of $X$ (via constant function $x\mapsto 1$) but not a deformation retract. You can't get it simplier than that. :D

For a more sophisticated example (i.e. a one that doesn't involve connectedness argument) consider the sphere $S^1=\{v\in\mathbb{R}^2\ |\ \lVert v\rVert=1\}$ and a point $x\in S^1$. Then $\{x\}$ is an obvious retract of $S^1$ (a singleton is a retract in any space) but $\{x\}$ is not a deformation retract since $S^1$ is not contractible. The choice of $S^1$ is not really necessary, any non-contractible space will do.
