If we have an extension of groups (say algebraic groups or group schemes) $1\to F\to P\to G\to 1$, then $P$ is a principal $F$-bundle over $G$ (is it locally trivial?). How about going in the opposite direction?



> 
> **Question.** Let $F$ and $G$ be groups. $P$ be a principal $F$-bundle over $G$. When does $P$ carry a structure of a group such that $1\to F\to P\to G\to 1$ is an extension? How to classify all such structures?
> 
> 
> 


Sounds connected with (some kind of) group cohomology of $G$ with coefficients in $F$, but I can't figure out what exactly this group is. Does the obstruction lie in some $H^2$, which is only a pointed set, and if it vanishes then the structures are classified by the corresponding $H^1$? The fact that the principal bundle itself corresponds to an element of $H^1(G, F)$ confuses me a bit.


For example, if $G$ is an abelian variety and $L$ a line bundle on it, then we have the corresponding principal $F=\mathbb G\_m$-bundle $P\_L$. When does it give an extension of $G$ by $\mathbb G\_m$?



Principal bundles over groups
There is the Grothendieck theory of bitorsors (see e.g. SGA 7, Exp VII) which gives an abstract answer to this question. The key point is that when you have an actual group extension you do not just have a torsor but a bitorsor, i.e., $P$ is an $F$-torsor in two ways given by left and right multiplication. The group structure on $P$ can then be formulated in terms of maps of bitorsors (see *idem* for details). The two specific criteria mentioned by Dan and Mikhail do not follow formally from this description but they nevertheless fit very well into this framework.


