# Mapping cylinder

In mathematics, specifically algebraic topology, the mapping cylinder of a continuous function $f$ between topological spaces $X$ and $Y$ is the quotient
    $M_{f}=(([0,1]\times X)\amalg Y)\,/\,\sim$
where the $\amalg$ denotes the disjoint union, and ~ is the equivalence relation generated by
    $(0,x)\sim f(x)\quad {\text{for each }}x\in X.$
That is, the mapping cylinder $M_{f}$ is obtained by gluing one end of $X\times [0,1]$ to $Y$ via the map $f$. Notice that the "top" of the cylinder $\{1\}\times X$ is homeomorphic to $X$, while the "bottom" is the space $f(X)\subset Y$. It is common to write $Mf$ for $M_{f}$, and to use the notation $\sqcup _{f}$ or $\cup _{f}$ for the mapping cylinder construction. That is, one writes
    $Mf=([0,1]\times X)\cup _{f}Y$
with the subscripted cup symbol denoting the equivalence. The mapping cylinder is commonly used to construct the mapping cone $Cf$, obtained by collapsing one end of the cylinder to a point. Mapping cylinders are central to the definition of cofibrations.

## Basic properties

The bottom Y is a deformation retract of $M_{f}$. The projection $M_{f}\to Y$ splits (via $Y\ni y\mapsto y\in Y\subset M_{f}$), and the deformation retraction $R$ is given by:
    $R:M_{f}\times I\rightarrow M_{f}$
    $([t,x],s)\mapsto [s\cdot t,x],(y,s)\mapsto y$
(where points in $Y$ stay fixed because $[0,x]=[s\cdot 0,x]$ for all $s$).
The map $f:X\to Y$ is a homotopy equivalence if and only if the "top" $\{1\}\times X$ is a strong deformation retract of $M_{f}$. An explicit formula for the strong deformation retraction can be worked out.

## Examples
### Mapping cylinder of a fiber bundle

For a fiber bundle $\pi :P\to X$ with fiber $F$, the mapping cylinder
    $M_{\pi }=(([0,1]\times P)\coprod X)/\sim$
has the equivalence relation
    $(0,p_{x})\sim (0,q_{x})$
for $p_{x},q_{x}\in F_{x}$. Then, there is a canonical map sending a point $[i,p_{x},x]\in M_{\pi }$ to the point $x\in X$, giving a fiber bundle
    $p:M_{\pi }\to X$
whose fiber is the cone $CF$. To see this, notice the fiber over a point $x\in X$ is the quotient space
    $[0,1]\times P\coprod \{x\}/\sim$
where every point in $\{0\}\times P$ is equivalent.

## Interpretation

The mapping cylinder may be viewed as a way to replace an arbitrary map by an equivalent cofibration, in the following sense:
Given a map $f\colon X\to Y$, the mapping cylinder is a space $M_{f}$, together with a cofibration ${\tilde {f}}\colon X\to M_{f}$ and a surjective homotopy equivalence $M_{f}\to Y$ (indeed, Y is a deformation retract of $M_{f}$), such that the composition $X\to M_{f}\to Y$ equals f.
Thus the space Y gets replaced with a homotopy equivalent space $M_{f}$, and the map f with a lifted map ${\tilde {f}}$. Equivalently, the diagram
    $f\colon X\to Y$
gets replaced with a diagram
    ${\tilde {f}}\colon X\to M_{f}$
together with a homotopy equivalence between them.
The construction serves to replace any map of topological spaces by a homotopy equivalent cofibration.
Note that pointwise, a cofibration is a closed inclusion.

## Applications

Mapping cylinders are quite common homotopical tools. One use of mapping cylinders is to apply theorems concerning inclusions of spaces to general maps, which might not be injective.
Consequently, theorems or techniques (such as homology, cohomology or homotopy theory) which are only dependent on the homotopy class of spaces and maps involved may be applied to $f\colon X\rightarrow Y$ with the assumption that $X\subset Y$ and that $f$ is actually the inclusion of a subspace.
Another, more intuitive appeal of the construction is that it accords with the usual mental image of a function as "sending" points of $X$ to points of $Y,$ and hence of embedding $X$ within $Y,$ despite the fact that the function need not be one-to-one.

### Categorical application and interpretation

One can use the mapping cylinder to construct homotopy colimits: this follows from the general statement that any category with all pushouts and coequalizers has all colimits. That is, given a diagram, replace the maps by cofibrations (using the mapping cylinder) and then take the ordinary pointwise limit (one must take a bit more care, but mapping cylinders are a component).
Conversely, the mapping cylinder is the homotopy pushout of the diagram where $f\colon X\to Y$ and ${\text{id}}_{X}\colon X\to X$.

### Mapping telescope

Given a sequence of maps
    $X_{1}{\xrightarrow {f_{1}}}X_{2}{\xrightarrow {f_{2}}}X_{3}\to \cdots$
the mapping telescope is the homotopical direct limit. If the maps are all already cofibrations (such as for the orthogonal groups $O(n)\subset O(n+1)$), then the direct limit is the union, but in general one must use the mapping telescope. The mapping telescope is a sequence of mapping cylinders, joined end-to-end. The picture of the construction looks like a stack of increasingly large cylinders, like a telescope.
Formally, one defines it as
    ${\Bigl\coprod _{i}[0,1]\times X_{i}{\Bigr )}/((0,x_{i})\sim (1,f_{i}(x_{i}))).$