Theorem. Let be the maximal order, i.e. the ring of integers of an algebraic number field. Then is a unique factorization domain if and only if is a principal ideal domain.
Proof. . Suppose that is a PID.
We first state, that any prime number of generates a prime ideal of . For if , then we have the principal ideals and . It follows that , i.e. with some , and since is prime, one of and must be a unit of . Thus one of and is the unit ideal , and accordingly is a maximal ideal of , so also a prime ideal.
Let a non-zero element of be split to prime number factors , in two ways: . Then also the principal ideal splits to principal prime ideals in two ways: . Since the prime factorization of ideals is unique, the sequence must be, up to the order, identical with (and ). Let . Then and are associates of each other; the same may be said of all pairs . So we have seen that the factorization in is unique.
. Suppose then that is a UFD.
Consider any prime ideal of . Let be a non-zero element of and let have the prime factorization . Because is a prime ideal and divides the ideal product , must divide one principal ideal . This means that . We write , whence and . Since is a Dedekind domain, every its ideal can be generated by two elements, one of which may be chosen freely (see the two-generator property). Therefore we can write
We multiply these, getting , and so . Thus with some . According to the unique factorization, we have or .
The latter alternative means that (with ), whence ; thus we had which would imply the absurdity . But the former alternative means that (with ), which shows that
In other words, an arbitrary prime ideal of is principal. It follows that all ideals of are principal. Q.E.D.