Lemma 31.28.4. Let $R$ be a UFD. The Picard groups of the following are trivial.

1. $\mathop{\mathrm{Spec}}(R)$ and any open subscheme of it.

2. $\mathbf{A}^ n_ R = \mathop{\mathrm{Spec}}(R[x_1, \ldots , x_ n])$ and any open subscheme of it.

In particular, the Picard group of any open subscheme of affine $n$-space $\mathbf{A}^ n_ k$ over a field $k$ is trivial.

Proof. Since $R$ is a UFD so is any localization of it and any polynomial ring over it (Algebra, Lemma 10.120.10). Thus if $U \subset \mathbf{A}^ n_ R$ is open, then the map $\mathop{\mathrm{Pic}}\nolimits (\mathbf{A}^ n_ R) \to \mathop{\mathrm{Pic}}\nolimits (U)$ is surjective by Lemma 31.28.3. The vanishing of $\mathop{\mathrm{Pic}}\nolimits (\mathbf{A}^ n_ R)$ is equivalent to the vanishing of the picard group of the UFD $R[x_1, \ldots , x_ n]$ which is proved in More on Algebra, Lemma 15.115.3. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).