Picard group of $\Bbb R[x_1,\dots,x_n]/(x_1^2+\dots+x_n^2-1)$ and $\Bbb C[x_1,\dots,x_n]/(x_1^2+\dots+x_n^2-1)$ What is the Picard group of $\Bbb R[x_1,\dots,x_n]/(x_1^2+\dots+x_n^2-1)$, i.e. the coordinate ring of real sphere $S^{n-1}$, and $\Bbb C[x_1,\dots,x_n]/(x_1^2+\dots+x_n^2-1)$?
As $\Bbb R[x_1,x_2]/(x_1^2+x_2^2-1)$ is not a UFD while $\Bbb C[x_1,x_2]/(x_1^2+x_2^2-1)$ is, maybe there is some difference between two results.

For the reals, $n=2$, Picard group is $\mathbb{Z}/2\mathbb{Z}$ and $n>2$, it is trivial. For complex numbers, Picard group is trivial for  $n= 2$, equal to $\mathbb{Z}$ when $n=3$ and trivial for $n>3$.
Let us first look at the case of reals. For $n=2$, easy to check that that $I=(x_1, 1-x_2)$ generates the Picard group and it is not trivial, but it is 2-torsion.
Most of the proofs will depend upon a useful result due to Nagata, which I state in slightly restricted form.
If $A$ is an integral domain and $p\in A$ is a prime (this means $pA$ is a non-zero prime ideal) then $A$ is a UFD if and only if $A_p$, the localization at $p$ is a UFD.
Given this, let us show that for $n>2$, the ring in question is a UFD. Since $n>2$, we see that $x_n\in A=\mathbb{R}[x_1,\ldots, x_n]/(x_1^2+\cdots+x_n^2-1)$ is a prime. Inverting $x_n$, $A_{x_n}$ can be written as $\mathbb{R}[u_1,\ldots, u_n, u_n^{-1}]/ u_1^2+\cdots+u_{n-1}^2-u_n^2+1)$ where $u_i=x_i/x_n, i<n, u_n=x_n^{-1}$. Thus, it suffices to show that $B=\mathbb{R}[u_i,\ldots, u_n]/(u_1^2+\cdots-u_n^2+1)$ is a UFD. Now, change variables again with $v_{n-1}=u_{n_1}+u_n, v_n=u_{n-1}-u_n$ and then our ring is defined by the equation $u_1^2+\cdots+u_{n-2}^2+v_{n-1}v_n+1=0$. Now, again $v_{n-1}\in B$ is a prime and so suffices to show that $B_{v_{n-1}}$ is a UFD. This ring is just $\mathbb{R}[u_1,\ldots, u_{n-2}, v_{n-1}, v_{n-1}^{-1}]$, since we can write $v_n$ in terms of the others. This is just the localization of a polynomial ring and thus a UFD.
Similar arguments can be made for complex numbers, the only slightly difficult case is $n=3$.
