to itself by the action of G), it isn't in general true that the invariants in are found as the quotient of the invariants in M by those in N: being invariant 'modulo N ' is broader. The purpose of the first group cohomology is to precisely measure this difference. The group cohomology functors in general measure the extent to which taking invariants doesn't respect exact sequences. This is expressed by a long exact sequence. Definitions The collection of all G-modules is a category (the morphisms are group homomorphisms f with the property for all g in G and x in M). Sending each module M to the group of invariants yields a functor from the category of G-modules to the category Ab of abelian groups. This functor is left exact but not necessarily right exact. We may therefore form its right derived functors. Their values are abelian groups and they are denoted by , "the n-th cohomology group of G with coefficients in M". Furthermore, the group may be identified with . Cochain complexes The definition using derived functors is conceptually very clear, but for concrete applications, the following computations, which some authors also use as a definition, are often helpful. For let be the group of all functions from to M (here means ). This is an abelian group; its elements are called the (inhomogeneous) n-cochains. The coboundary homomorphisms One may check that so this defines a cochain complex whose cohomology can be computed. It can be shown that the above-mentioned definition of group cohomology in terms of derived functors is isomorphic to the cohomology of this complex Here the groups of n-cocycles, and n-coboundaries, respectively, are defined as The functors Extn and formal definition of group cohomology Interpreting G-modules as modules over the group ring one can note that i.e., the subgroup of G-invariant elements in M is identified with the group of homomorphisms from , which is treated as the trivial G-module (every element of G acts as the identity) to M. Therefore, as Ext functors are the derived functors of Hom, there is a natural isomorphism These Ext groups can also be computed via a projective resolution of , the advantage being that such a resolution only depends on G and not on M. We recall the definition of Ext more explicitly for this context. Let F be a projective -resolution (e.g. a free -resolution)