TITLE: Finding a representative cocycle for a given group extension
QUESTION [3 upvotes]: Suppose we have a group extension
$$0 \to N \stackrel{\iota}{\to} E \stackrel{\pi}{\to} G \to 1$$
where $N$ is abelian. How to find a representative 2-cocycle that produces this extension? Or more generally, given $H^2(G,N)$ with $N$ abelian, how can we find a representative cocycle for each element of the cohomology group (=a group extension that is associated with this element)?

REPLY [2 votes]: Pick a set-theoretic section $s : G \to E$ of $\pi$. It will in general fail to be a group homomorphism, but it is a group homomorphism $\bmod N$, so there are unique elements $c(g, h) \in N$ such that
$$s(gh) = c(g, h) s(g) s(h) \in E.$$
These elements assemble into a $2$-cocycle (in fact I think this is how the connection between extensions and $2$-cocycles was discovered historically), and picking a different section $s$ changes this $2$-cocycle by a $2$-coboundary.
{"set_name": "stack_exchange", "score": 3, "question_id": 1781413}