I recently came across this elegant translation of etale $\mathbb{G}\_m$-torsors into line bundles:


Let $\text{Spec }R$ be a $\mathbb{G}\_m$-torsor over $\text{Spec }A$ for the etale topology, where $\mathbb{G}\_m = \text{Spec }A[x,x^{-1}]$, then the action of $\mathbb{G}\_m$ on $\text{Spec }R$ is given by a homomorphism of rings (the coaction):
$$\mu : R\rightarrow A[x,x^{-1}]\otimes\_A R$$
Somehow, this induces a decomposition $R = \bigoplus\_{n\in\mathbb{Z}} R\_1^{\otimes n}$ making $R$ into a graded $A$-algebra, where $R\_1$ is a projective $A$-module.


Unfortunately, I don't understand how to prove this decomposition, and why $R\_1$ is projective. I can imagine that the etale local triviality of $R$ would somehow result in $R$ being etale-locally free, but I don't see why this would imply Zariski-freeness (ie, projectivity).



$\mathbb{G}_m$-torsors and line bundles
If $G$ is a commutative monoid (for your question we will want $G = \mathbb{Z}$), then $A[G]$-comodules identify with $G$-graded $A$-modules. A reference is Demazure, Gabriel, *Introduction to Algebraic Geometry and Algebraic Groups*, II, §2, no 2, Example 1.


Indeed, if $M$ is an $A$-module with an $A[G]$-module structure given by the coaction $\mu: M \to M\otimes\_A A[G]$, the corresponding grading $M = \bigoplus\_{g \in G} M\_g$ is given by $M\_g = \{m \in M : \mu(m)=m\otimes g\}$.


Conversely, given a $G$-grading $M = \bigoplus\_{g\in G}M\_g$, for $m\in M$, let $m\_g$ be the projection of $m$ onto $M\_g$, then the map
$$\mu : M\longrightarrow M\otimes\_A A[G],\quad m\mapsto m\_g\otimes g$$
is an $A[G]$-coaction on $M$.


These functors are mutually inverse, and define an equivalence of symmetric monoidal categories. Hence, $A[G]$-comodule commutative algebras identify with $G$-graded commutative $A$-algebras.


Now assume that $R \to \underbrace{R\otimes\_A A[\mathbb{Z}]}\_{R[x,x^{-1}]} = R\otimes\_A \underbrace{A[x,x^{-1}]}\_{(\mathbb{G}\_m)\_{/A}}$ is a comodule commutative algebra. The corresponding $\mathbb{G}\_m$-scheme $\mathrm{Spec}(R)$ is a torsor if and only if


1. $R$ is faithfully flat over $A$,
2. The natural morphism $\mathrm{Spec}(R)/\mathbb{G}\_m \to \mathrm{Spec}(A)$ is an isomorphism, i.e. the natural morphism $A \to R\_0$ is an isomorphism,
3. The natural morphism $\mathbb{G}\_m \times\_{\mathrm{Spec}(A)} \mathrm{Spec}(R) \to \mathrm{Spec}(R) \times\_{\mathrm{Spec}(A)} \mathrm{Spec}(R)$ is an isomorphism, i.e. the natural morphism $R \otimes\_A R \to R[x,x^{-1}]$ is an isomorphism.


For $n,m \in \mathbb{Z}$ the natural morphism $R\_n \otimes\_A R\_m \to R\_{n+m}$ is an isomorphism since this is so when we tensor with $R$ over $A$ (by faithful flatness). It follows that $R\_1$ is invertible and that $R\_n \cong R\_1^{\otimes n}$ for $n \in \mathbb{Z}$.


