# Finding an explicit deformation from the mapping cylinder onto $Y.$

Definition $$:$$ Let $$X,Y$$ be topological spaces and $$f : X \longrightarrow Y$$ be a map. The mapping cylinder $$M_f$$ of $$f$$ is obtained from the disjoint union $$(X \times I) \sqcup Y$$ by identifying $$(x,1) \sim f(x),$$ for all $$x \in X.$$

Exercise $$:$$ Show that $$M_f$$ deformation retracts to $$Y.$$

I think if we can take every point of $$M_f$$ and squeeze it down to it's image under $$f$$ via straight line deformation I would get a deformation retract of $$M_f$$ onto $$f(X).$$ But I am not sure as to why $$M_f$$ deformation retracts to $$Y.$$ Would anybody provide me an explicit formula for such deformation? I am not satisfied with hand-waving description of algebraic topology; rather I want to understand it analytically. That's why I am asking for analytic formula for such deformation. Any help in this regard will be appreciated.

Quite simply, notice that there is a straight line connecting $$(x,0)$$ and $$(x,1)$$ given by $$f_x(t)=(x,t).$$ In fact, $$f_x$$ is continuous as for both projection maps $$\pi_X$$ and $$\pi_I,$$ we have that $$\pi_X\circ f_x$$ and $$\pi_I\circ f_x$$ are continuous. Now, consider the map $$H:X\times I\times I \rightarrow Y$$ given as,
$$H((x,s),t)=(x,s(1-t)+t).$$
Notice that $$H$$ is a deformation retraction onto $$Y.$$