In mathematics (especially algebraic topology and abstract algebra), homology (in part from Greek ὁμός homos "identical") is a general way of associating a sequence of algebraic objects such as abelian groups or modules to other mathematical objects such as topological spaces. Homology groups were originally defined in algebraic topology. However, similar constructions are available in a wide variety of other contexts, such as groups, Lie algebras, Galois theory, and algebraic geometry.
The original motivation for defining homology groups was the observation that two shapes can be distinguished by examining their holes. For instance, a circle is not a disk because the circle has a hole through it while the disk is solid, and the ordinary sphere is not a circle because the sphere encloses a two-dimensional hole while the circle encloses a one-dimensional hole. However, because a hole is "not there", it is not immediately obvious how to define a hole or how to distinguish different kinds of holes. Homology was originally a rigorous mathematical method for defining and categorizing holes in a manifold. Loosely speaking, a cycle is a closed submanifold, a boundary is the boundary of a submanifold with boundary, and a homology class (which represents a hole) is an equivalence class of cycles modulo boundaries.
There are many different homology theories. A particular type of mathematical object, such as a topological space or a group, may have one or more associated homology theories. When the underlying object has a geometric interpretation like topological spaces do, the nth homology group represents behavior unique to dimension n. In general, most homology groups or modules arise as derived functors on appropriate abelian categories. They provide concrete descriptions of the failure of a functor to be exact. From this abstract perspective, homology groups are determined by objects of a derived category.