# Why isn't $\mathbb Z [\sqrt{pq}]$ a factorial domain

This is exercise 8 on page 147 of Jacobson's Basic Algebra:

Let $p$ be a prime of the form $4n+1$ and let $q$ be a prime such that $\left( \frac{q}{p} \right) =-1$. Show that $\mathbb Z[\sqrt{pq}]$ is not factorial.

Here, $\left( \frac{q}{p} \right) =-1$ means that $\overline{q}$ is not a quadratic number in the field $\mathbb Z / (p)$.

In the special case when $p=5$ and $q=2$, $9 = 3 \cdot 3 = (\sqrt{10} +1 )(\sqrt{10 }-1)$, with $3$ and $\sqrt{10} +1$ or $\sqrt{10} - 1$ nonassociates. But I have no idea what can I do with the general case.

I know that primes of the form $4n+1$ can be written in the form $m^2 + n^2$ with $m,n \in \mathbb Z$. But when $q$ is odd and not of the form $4n+1$, $pq$ is not the sum of two quadratic numbers. How can I use the fact $\left( \frac{q}{p} \right) =-1$?

Thanks~

-
 I don't know if this works, but note that $pq=\sqrt{pq}\sqrt{pq}$, so if you can prove $p$, $q$, and $\sqrt{pq}$ are all irreducible, you win. – Gerry Myerson Mar 23 '12 at 12:33 @Gerry Myerson: Thank you very much. I totally agree with you. And I think, if a map $\delta: \mathbb Z [\sqrt{pq}] \rightarrow \mathbb N$ is defined to be $a+b \sqrt{pq} \mapsto |a^2 - b^2pq|$, the irreducibility of $p$, $q$ and $\sqrt{pq}$ would be proved if no $a+ b \sqrt{pq}$ would be mapped to $p$ or $q$ by $\delta$. But I didn't succeed in proving this... – ShinyaSakai Mar 23 '12 at 13:06

By discriminant considerations the prime ideal $p$ ramifies in $R = \mathbb{Z}[\sqrt{pq}]$, so there is a prime ideal $\mathfrak{p}$ of $R$ with norm $p$. However there is no element of norm $p$: indeed, as in Franz's answer, suppose $x^2 - pqy^2 = \pm p$. Then $x = pX$, so $pX^2 - qy^2 = \pm 1$. Reducing modulo $p$ shows that $\pm q$ is a square modulo $p$, but by assumption $q$ is not a square modulo $p$ and since $p \equiv 1 \pmod{4}$, $-1$ is a square modulo $p$, hence also $-q = (-1)(q)$ is not a square modulo $p$. This shows that $R$ is not a PID. Since $R$ has dimension one, it is not a UFD.
$p$ is irreducible: if not, then $x^2 - pqy^2 = \pm p$; cancel $p$ and use the assumption. On the other hand, $p$ divides $\sqrt{pq} \cdot \sqrt{pq}$, but none of the factors: thus it is not prime.