TITLE: What is so special about negative numbers $m$, $\mathbb{Z}[\sqrt{m}]$? 
QUESTION [15 upvotes]: This question is based on a homework exercise:
"Let $m$ be a negative, square-free integer with at least two prime factors. Show that $\mathbb{Z}[\sqrt{m}]$ is not a PID."
In an aside comment in the book we're using (Milne), it was noted that a lot was known about quadratic extension with $m$ negative, but very little with $m$ positive. Why is this?
I have not solved the exercise, mainly because I can't think of a propery of negative numbers that positive numbers don't possess ($|m|\neq m$, but that's trivial).
It seem there should be some relatively straightforward way to calculate class numbers for quadratic extensions with $m$ negative and composite. Or maybe the way to do this is to produce an ideal that is not principal - but then again I must find this property of negative numbers that separates them from positive.

REPLY [8 votes]: By finding an irreducible that's not prime for d<-2 should suffice as a prime is the same as an irreducible in a PID.
A good candidate is 2 which is not prime in $Z[\sqrt{d}]$, since it divides $d(d-1)$ but not $\frac{d \pm \sqrt{d}}{2}$.
To show that 2 is irreducible assume to the contrary that $2 = \alpha \beta$  where neither a units. 
Take the norm, but note that the $N(a + b\sqrt{d}) = a^2 - db^2$ is multiplicative, always nonnegative, and N(u)=1 iff u is unit, and units are +1, -1 which wouldn't be the case if d were positive, as Arturo Magidin suggested in a previous comment.
Then $N(\alpha)=N(\beta)=2$, i.e $a^2 - bd^2 = \pm 2$. Then you may deduce that if d<-2 then no such a or b exists, and the result follows.
Addendum:
Let d<-5 be squarefree such that d = pr, where p prime.
The ideal $(p, \sqrt{d})$ is not principal in $Z[\sqrt{d}]$.
Suppose $Z[\sqrt{d}]$ is PID, then $(p, \sqrt{d}) = (n)$ for some $n = a + b\sqrt{d}$.
Taking the norm, then $N(n) = a^2 - db^2$ divides d (inclusion of ideals).
If b = |1|. Then $a^2 \pm d$ divides d and a = 0. But then $N(n)=d$ divides $N(p)=p^2$, but d = pq. Case b >|1| is also trivial.
Case b = 0. Then $a^2$ divides d, and then $a=1$. Hence (n) = (1) = $Z[\sqrt{d}] = (p, \sqrt{d})$. Then $1 = px + \sqrt{d}y$ for x, y in $Z[\sqrt{d}]$, but then $ps - dt = 1$, which is impossible since d = pr.