Learning homological algebra is a two-stage affair. First, one must learn the language of Ext and Tor and what it describes. Second, one must be able to compute these things, and, often, this involves yet another language: spectral sequences. This book gives a treatment of homological algebra which motivates the subject in terms of its origins in algebraic topology.In this new edition the book has been updated and revised throughout and new material on sheaves and cup products has been added. The author also included material about homotopical algebra, alias K-theory, contrasting it with homological algebra.