Let $G$ be an abelian group and $M$ a $G$-module with trivial action. It is well-known that $H^2(G,M)$ classifies extensions of $G$ by $M$, which is $\mathrm{Ext}^1\_{Ab}(G,M)$.


On the other hand $H^2$ is $\mathrm{Ext}^2\_{G-mod}(\mathbb Z,M)$ (by the definition of group cohomology), where $\mathbb Z$ is given the trivial $G$-action.


Is there a nice way to see this isomorphism $$ \mathrm{Ext}^1\_{Ab}(G,M) \cong \mathrm{Ext}^2\_{G-mod}(\mathbb Z,M) ? $$


Or is it just an accident that both happen to classify the same type of object?


Is there a high-brow reason? Is there a generalization? Why should $\mathrm{Ext}^1$ and $\mathrm{Ext}^2$ be related in such a way? Might this result from a spectral sequence? I wonder if this might be a special case of something well-known.



An isomorphism between different Ext's coming from group cohomology
The group $H^2(G,M)$ classifies different types of extensions than $\operatorname{Ext}^1(G,M)$. On the one hand, $H^2(G,M)$ classifies extensions


$$M\hookrightarrow H\twoheadrightarrow G$$


where $H$ may be non-abelian, and the action of $H$ on $M$ by conjugation is encoded in the $G$-module structure of $M$. On the other hand, $\operatorname{Ext}^1(G,M)$ classifies extensions


$$M\hookrightarrow A\twoheadrightarrow G$$


where $A$ is an abelian group, in particular $A$ acts trivially on $M$ by conjugation, i.e. $M$ can only be regarded as a trivial $G$-module here.


Even if you regard $M$ as a trivial $G$-module in both cases, $H^2(G,M)$ and $\operatorname{Ext}^1(G,M)$ may be different due to the existence of non-abelian but central extensions. In general, there is a universal coefficient split short exact sequence


$$\operatorname{Ext}^1(G,M)\hookrightarrow H^2(G,M)\twoheadrightarrow \operatorname{Hom}(H\_2G,M).$$


You can find this in most books on group cohomology. The first morphism represents the inclusion of abelian extensions into central (but possibly non-abelian) extensions (recall that $M$ carries here the trivial $G$-module structure). The group $\operatorname{Hom}(H\_2G,M)$ measures the amount of really non-abelian central extensions of $G$ by $M$.


Fortunately, $H\_2G$ is very easy to compute, it is the exterior square $H\_2G=\wedge^2G$, i.e. the quotient of $G\otimes G$ by the relations $g\otimes g=0$, $g\in G$. This functor is quadratic, $$\wedge^2(G\_1\oplus G\_2)=\wedge^2(G\_1)\oplus (G\_1\otimes G\_2) \oplus \wedge^2(G\_2)$$
and vanishes on (finite or infinite) ciclyc groups $\wedge^2(\mathbb{Z}/n)=0$, $n\in\mathbb Z$. This gives a recipe to compute $H\_2G$ for any finitely generated abelian group. In particular, if you take $G=(\mathbb{Z}/2)^2$ and $M=\mathbb{Z}/2$ you get


$$\operatorname{Ext}^1(G,M)=(\mathbb{Z}/2)^2,\qquad \operatorname{Hom}(H\_2G,M)=\mathbb Z/2.$$
Hence $$H^2(G,M)=(\mathbb{Z}/2)^3.$$


