Lemma 54.3.3. Let $(A, \mathfrak m, \kappa )$ be a regular local ring of dimension $2$. Let $f : X \to S = \mathop{\mathrm{Spec}}(A)$ be the blowing up of $A$ in $\mathfrak m$. Then $\mathop{\mathrm{Pic}}\nolimits (X) = \mathbf{Z}$ generated by $\mathcal{O}_ X(E)$.

Proof. Recall that $E = \mathbf{P}^1_\kappa$ has Picard group $\mathbf{Z}$ with generator $\mathcal{O}(1)$, see Divisors, Lemma 31.28.5. By Lemma 54.3.1 the invertible $\mathcal{O}_ X$-module $\mathcal{O}_ X(E)$ restricts to $\mathcal{O}(-1)$. Hence $\mathcal{O}_ X(E)$ generates an infinite cyclic group in $\mathop{\mathrm{Pic}}\nolimits (X)$. Since $A$ is regular it is a UFD, see More on Algebra, Lemma 15.121.2. Then the punctured spectrum $U = S \setminus \{ \mathfrak m\} = X \setminus E$ has trivial Picard group, see Divisors, Lemma 31.28.4. Hence for every invertible $\mathcal{O}_ X$-module $\mathcal{L}$ there is an isomorphism $s : \mathcal{O}_ U \to \mathcal{L}|_ U$. Then $s$ is a regular meromorphic section of $\mathcal{L}$ and we see that $\text{div}_\mathcal {L}(s) = nE$ for some $n \in \mathbf{Z}$ (Divisors, Definition 31.27.4). By Divisors, Lemma 31.27.6 (and the fact that $X$ is normal by Lemma 54.3.2) we conclude that $\mathcal{L} = \mathcal{O}_ X(nE)$. $\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).