structural:expansion
Factorization into prime ideals

If I is an ideal in O, then there is always a factorization

where each p i {\displaystyle {\mathfrak {p}}_{i}} is a prime ideal, and where this expression is unique up to the order of the factors. In particular, this is true if I is the principal ideal generated by a single element. This is the strongest sense in which the ring of integers of a general number field admits unique factorization. In the language of ring theory, it says that rings of integers are Dedekind domains.

When O is a UFD, every prime ideal is generated by a prime element. Otherwise, there are prime ideals which are not generated by prime elements. In Z, for instance, the ideal (2, 1 + √ -5) is a prime ideal which cannot be generated by a single element.

Historically, the idea of factoring ideals into prime ideals was preceded by Ernst Kummer's introduction of ideal numbers. These are numbers lying in an extension field E of K. This extension field is now known as the Hilbert class field. By the principal ideal theorem, every prime ideal of O generates a principal ideal of the ring of integers of E. A generator of this principal ideal is called an ideal number. Kummer used these as a substitute for the failure of unique factorization in cyclotomic fields. These eventually led Richard Dedekind to introduce a forerunner of ideals and to prove unique factorization of ideals.

An ideal which is prime in the ring of integers in one number field may fail to be prime when extended to a larger number field. Consider, for example, the prime numbers. The corresponding ideals p Z are prime ideals of the ring Z. However, when this ideal is extended to the Gaussian integers to obtain p Z, it may or may not be prime. For example, the factorization 2 = (1 + i)(1 − i) implies that

note that because 1 + i = (1 − i) ⋅ i, the ideals generated by 1 + i and 1 − i are the same. A complete answer to the question of which ideals remain prime in the Gaussian integers is provided by Fermat's theorem on sums of two squares. It implies that for an odd prime number p, p Z is a prime ideal if p ≡ 3 (mod 4) and is not a prime ideal if p ≡ 1 (mod 4). This, together with the observation that the ideal (1 + i) Z is prime, provides a complete description of the prime ideals in the Gaussian integers. Generalizing this simple result to more general rings of integers is a basic problem in algebraic number theory. Class field theory accomplishes this goal when K is an abelian extension of Q (that is, a Galois extension with abelian Galois group).