understanding $G$-bundles via embedding in $GL_n$ I was reading through https://web.stanford.edu/~tonyfeng/AffGr_examples.pdf, page 1-2 and I found my intuition for $G$-bundles put to the test.
In the pdf, Tony discusses what is a $G_a$-bundle and say that we can always find one answer by embedding into $GL_n$, in this particular case as the unipotent group $t\mapsto\left(\begin{matrix}1&t\\&1\end{matrix}\right)$. He goes on to say then that this makes it clear that a $G_a$-bundle is the same as an extension of trivial bundles $1\to\mathcal O_S\to\mathcal E\to\mathcal O_S\to1$.
Q1: Could someone clarify what is going on here? Specifically, I don't follow the "this makes it clear" part.
Q2: Does this work for any (linear affine algebraic) group $G$? I.e. by embedding $G$ into some $GL_n$ and concluding that $G$-bundles are rank $n$ locally free sheaves with some extra properties? Is this discussed anywhere in more detail? Is this a 'good' way to think of $G$-bundles?
Thank you.
 A: Well a $G_a$-bundle is not the same as an extension of trivial line bundles.By definition, a $G_a$ bundle is a space $X$ together with an action $G_a\times X\to X$ which is free and transitive. So this is just an affine line without specified base-point which is parallel to $G_a$. The point is, there are a bijective correspondence between these two kinds of objects.
Imagine, we are over a point (in other words the base scheme is a field $K$). You can look at the abstract vector space 
$$E=(K\oplus \bigoplus_{x\in X} K.[x])/V$$ freely spanned by $1$ and every $x\in X$, and modded out by $V=\operatorname{Span}([x+k]-[x]-k)$ . We have two canonical maps : the inclusion $K\to E$ and the map $E\to K$ such that $\lambda\mapsto 0$ and for any $x\in X, [x]\mapsto 1$. This obviously defines a short exact sequence
$$0\to K\to E\to K\to 0$$
Thus $E$ is a dimension 2 vector space and $X$ is canonically isomorphic to the affine line parallel to $K$ which goes through $[x]$ : that is we have $X=[x]+K$ and this does not depends on the choice of $x$. So the point of this construction is to identify a $G_a$-torsor $X$ with an affine line within a dimension 2 vector space $E$.
Over more general scheme base, this construction glues. Thus we have a correspondence between $G_a$-bundles and rank 2 locally free sheaves $\mathcal{E}$ which is an extension of $\mathcal{O}_S$ by itself :


*

*given a $G_a$-bundle $X$, build $\mathcal{E}$ and the short exact sequence by gluing the above construction.

*conversely, given such an extension, we can look at the corresponding vector spaces $0\to\mathbb{A}^1_S\to E\to\mathbb{A}^1_S\to 0$ and $X$ is just the fiber product
$$\require{AMScd}
\begin{CD}
X@>>> S\\
@VVV@VV1V\\
E@>>> \mathbb{A}^1_S
\end{CD}
$$
where $S\to\mathbb{A}^1_S$ is the constant section 1.



So what is the connection of this construction with the subgroup $\begin{pmatrix}1&*\\0&1\end{pmatrix}$ ?
In general, to specify a $G_a$ bundle, or locally free sheaf, it is enough to specify transition maps. Locally a $G_a$-bundle is $\mathbb{A}^1_S$ and the transitions maps are in $G_a$.
Similarly, a locally free sheaf of rank 2 is locally $\mathcal{O}_S^{\oplus 2}$ and the transition maps are in $\mathrm{GL}_2$. But if we want $\mathcal{E}$ to fit in a short exact sequence $0\to \mathcal{O}_S\to\mathcal{E}\to\mathcal{O}_S\to 0$, one would need that the transition maps are among the isomorphism ot the short exact sequence. And this is exactly the subgroup $\begin{pmatrix}1&*\\0&1\end{pmatrix}$.
The point of the author is that because $G_a$-bundles and extensions of trivial lines bundles have the same transition maps, there exists a bijective correspondence between these kind of objects and we don't need to specify it. So the whole first part of this answer is useless...
With this in mind, if $G\subset\mathrm{GL}_n$, there is a bijective correspondence between $G$-torsors and locally free sheaves of rank $n$ with "the structure which is preserved by $G$". (This is not always easy to find out what it is, fortunately, it is frequent that $G$ is defined to be the group which preserve a kind of structure...)
