In homological algebra, the mapping cone is a construction on a map of chain complexes inspired by the analogous construction in topology.  In the theory of triangulated categories it is a kind of combined kernel and cokernel: if the chain complexes take their terms in an abelian category, so that we can talk about cohomology, then the cone of a map f being acyclic means that the map is a quasi-isomorphism; if we pass to the derived category of complexes, this means that f is an isomorphism there, which recalls the familiar property of maps of groups, modules over a ring, or elements of an arbitrary abelian category that if the kernel and cokernel both vanish, then the map is an isomorphism.  If we are working in a t-category, then in fact the cone furnishes both the kernel and cokernel of maps between objects of its core.
 The cone may be defined in the category of cochain complexes over any additive category (i.e., a category whose morphisms form abelian groups and in which we may construct a direct sum of any two objects).  Let 
  
    
      
        A
        ,
        B
      
    
    {\displaystyle A,B}
  
 be two complexes, with differentials 
  
    
      
        
          d
          
            A
          
        
        ,
        
          d
          
            B
          
        
        ;
      
    
    {\displaystyle d_{A},d_{B};}
  
 i.e.,
 and likewise for 
  
    
      
        B
        .
      
    
    {\displaystyle B.}
  

 For a map of complexes 
  
    
      
        f
        :
        A
        →
        B
        ,
      
    
    {\displaystyle f:A\to B,}
  
 we define the cone, often denoted by 
  
    
      
        Cone
        ⁡
        (
        f
        )
      
    
    {\displaystyle \operatorname {Cone} (f)}
  
 or 
  
    
      
        C
        (
        f
        )
        ,
      
    
    {\displaystyle C(f),}
  
 to be the following complex:
 with differential
 Here 
  
    
      
        A
        [
        1
        ]
      
    
    {\displaystyle A[1]}
  
 is the complex with 
  
    
      
        A
        [
        1
        
          ]
          
            n
          
        
        =
        
          A
          
            n
            +
            1
          
        
      
    
    {\displaystyle A[1]^{n}=A^{n+1}}
  
 and 
  
    
      
        
          d
          
            A
            [
            1
            ]
          
          
            n
          
        
        =
        −
        
          d
          
            A
          
          
            n
            +
            1
          
        
      
    
    {\displaystyle d_{A[1]}^{n}=-d_{A}^{n+1}}
  
.
Note that the differential on 
  
    
      
        C
        (
        f
        )
      
    
    {\displaystyle C(f)}
  
 is different from the natural differential on 
  
    
      
        A
        [
        1
        ]
        ⊕
        B
      
    
    {\displaystyle A[1]\oplus B}
  
, and that some authors use a different sign convention.
 Thus, if for example our complexes are of abelian groups, the differential would act as
 Suppose now that we are working over an abelian category, so that the homology of a complex is defined. The main use of the cone is to identify quasi-isomorphisms: if the cone is acyclic, then the map is a quasi-isomorphism.  To see this, we use the existence of a triangle
 where the maps 
  
    
      
        B
        →
        C
        (
        f
        )
        ,
        C
        (
        f
        )
        →
        A
        [
        1
        ]
      
    
    {\displaystyle B\to C(f),C(f)\to A[1]}
  
 are given by the direct summands (see Homotopy category of chain complexes).  Since this is a triangle, it gives rise to a long exact sequence on homology groups:
 and if 
  
    
      
        C
        (
        f
        )
      
    
    {\displaystyle C(f)}
  
 is acyclic then by definition, the outer terms above are zero.  Since the sequence is exact, this means that 
  
    
      
        
          f
          
            ∗
          
        
      
    
    {\displaystyle f^{*}}
  
 induces an isomorphism on all homology groups, and hence (again by definition) is a quasi-isomorphism.
 This fact recalls the usual alternative characterization of isomorphisms in an abelian category as those maps whose kernel and cokernel both vanish.  This appearance of a cone as a combined kernel and cokernel is not accidental; in fact, under certain circumstances the cone literally embodies both.  Say for example that we are working over an abelian category and 
  
    
      
        A
        ,
        B
      
    
    {\displaystyle A,B}
  
 have only one nonzero term in degree 0:
 and therefore 
  
    
      
        f
        :
        A
        →
        B
      
    
    {\displaystyle f\colon A\to B}
  
 is just 
  
    
      
        
          f
          
            0
          
        
        :
        
          A
          
            0
          
        
        →
        
          B
          
            0
          
        
      
    
    {\displaystyle f_{0}\colon A_{0}\to B_{0}}
  
 (as a map of objects of the underlying abelian category).  Then the cone is just
 (Underset text indicates the degree of each term.) The homology of this complex is then
 This is not an accident and in fact occurs in every t-category.
 A related notion is the mapping cylinder: let 
  
    
      
        f
        :
        A
        →
        B
      
    
    {\displaystyle f\colon A\to B}
  
 be a morphism of chain complexes, let further 
  
    
      
        g
        :
        Cone
        ⁡
        (
        f
        )
        [
        −
        1
        ]
        →
        A
      
    
    {\displaystyle g\colon \operatorname {Cone} (f)[-1]\to A}
  
 be the natural map. The mapping cylinder of f is by definition the mapping cone of g.
 This complex is called the cone in analogy to the mapping cone (topology) of a continuous map of topological spaces 
  
    
      
        ϕ
        :
        X
        →
        Y
      
    
    {\displaystyle \phi :X\rightarrow Y}
  
: the complex of singular chains of the topological cone 
  
    
      
        c
        o
        n
        e
        (
        ϕ
        )
      
    
    {\displaystyle cone(\phi )}
  
 is homotopy equivalent to the cone (in the chain-complex-sense) of the induced map of singular chains of X to Y. The mapping cylinder of a map of complexes is similarly related to the mapping cylinder of continuous maps.