$\mathbb{C}[x,y,z]/(x^2+y^2+z^2-1)$ is not a UFD Wiki says that the coordinate ring $\mathbb{C}[x,y,z]/(x^2+y^2+z^2−1)$ of the complex sphere is not a unique factorization domain. I want to know why it is not a UFD.
We denote $X,Y,Z$ the residue class of $x,y,z$. Obviously, we have $(X+iY)(X-iY)=(1+Z)(1-Z)$ in $\mathbb{C}[x,y,z]/(x^2+y^2+z^2−1)$. But how to prove the irreducibility? Maybe there are some deep techniques of commutative algebra or algebraic geometry should be used in this question.
 A: Techniques from algebraic geometry may be used for this problem. Everything in this answer is available in Hartshorne chapter II section 6 and probably also the section of Vakil dealing with divisors.

Theorem. Suppose $A$ is a noetherian domain. Then $A$ is a UFD iff $X=\operatorname{Spec} A$ is normal and $\operatorname{Cl} X=0$.

It's clear that with $A=\Bbb C[x,y,z]/(x^2+y^2+z^2-1)$, $X$ is normal (it's even smooth), so we can compute $\operatorname{Cl} X$ to see whether $A$ is a UFD or not.
Let $X'=V(-x_0^2+x_1^2+x_2^2+x_3^2)\subset\Bbb P^3$. Then $A$ is the coordinate algebra of $D(x_0)\cap X'$, and the class groups of $X$ and $X'$ are related by the exact sequence $$\Bbb Z\to \operatorname{Cl} X'\to\operatorname{Cl} X\to 0,$$ where the first map sends $1$ to the class of $V(x_0)\cap X$. As the middle group is $\Bbb Z^2$ from identifying $X'$ with $\Bbb P^1\times\Bbb P^1$, $\operatorname{Cl} X\neq 0$ and thus $A$ is not a UFD. (NB: if you're reading this and wondering how this all breaks for the real case mentioned at wikipedia, the class group of $X'$ depends on the base field!)

One can probably also use a norm map to prove that the elements in your factorization are indeed irreducible. See here for an example.
A: We are dealing with a ring of the form  $$B=A[z]/(z^2-d).$$

*

*Every element in the ring $A[z]/(z^2-d)$ has a unique representative $a + b z = a + b\sqrt{d}$ (division by the monic polynomial $z^2-d$).


*If $A$ is a domain, and $a^2 - d b^2 \ne 0$ for $a$, $b \ne 0$ then $A[z]/(z^2-d)$ is also a domain.


*The element $a + b \sqrt{d}$ is a unit in $B$ if and only if $a^2 - d b^2$ is a unit in $A$.


*If the element $a + b \sqrt{d}$ is reducible, then its norm $a^2 - d b^2$ is also reducible.
Now, assume that the ring is $$\mathbb{C}[u,v]/(z^2 -(1- u v))$$ (where $u = x+ i y$, $v = x-i y$).  Write the equality
$$(1+ \sqrt{1- u v})(1 -\sqrt{1- u v}) = u v$$
Let us check that both factors on LHS are irreducible. Note that both have norm $u v$, which has a unique decomposition in $\mathbb{C}[u,v]$ as $u \cdot v$. So we only have to show that there does not exist an element in $\mathbb C[u,v][\sqrt{1-u v}]$ of norm $u$. Assume the contrary
$$P^2(u,v) - (1-u v) Q^2(u,v) = u$$
for some polynomials $P$, $Q$. Now make $v = \frac{1}{u}$ (yes, we have that freedom; up to know it looked like we worked in a usual quadratic ring, but now we use some extra powers we got). We obtain
$$P^2(u, \frac{1}{u}) = u$$
contradiction.
