The first generalization of the theorem is found in Gauss's second monograph (1832) on
biquadratic reciprocity. This paper introduced what is now called the
ring of
Gaussian integers, the set of all
complex numbers
a +
bi where
a and
b are integers. It is now denoted by \mathbb{Z}[i]. He showed that this ring has the four units ±1 and ±
i, that the non-zero, non-unit numbers fall into two classes, primes and composites, and that the composites have unique factorization as a product of primes (
up to the order and multiplication by units). Similarly, in 1844 while working on
cubic reciprocity,
Eisenstein introduced the ring \mathbb{Z}[\omega], where \omega = \frac{-1 + \sqrt{-3}}{2}, \omega^3 = 1 is a cube
root of unity. This is the ring of
Eisenstein integers, and he proved it has the six units \pm 1, \pm\omega, \pm\omega^2 and that it has unique factorization. However, it was also discovered that unique factorization does not always hold. An example is given by \mathbb{Z}[\sqrt{-5}]. In this ring one has : 6 = 2 \cdot 3 = \left(1 + \sqrt{-5}\right)\left(1 - \sqrt{-5}\right). Examples like this caused the notion of "prime" to be modified. In \mathbb{Z}\left[\sqrt{-5}\right] it can be proven that if any of the factors above can be represented as a product, for example, 2 =
ab, then one of
a or
b must be a unit. This is the traditional definition of "prime". It can also be proven that none of these factors obeys Euclid's lemma; for example, 2 divides neither (1 + \sqrt{-5}) nor (1 - \sqrt{-5}) even though it divides their product 6. In
algebraic number theory 2 is called
irreducible in \mathbb{Z}\left[\sqrt{-5}\right] (only divisible by itself or a unit) but not
prime in \mathbb{Z}\left[\sqrt{-5}\right] (if it divides a product it must divide one of the factors). The mention of \mathbb{Z}\left[\sqrt{-5}\right] is required because 2 is prime and irreducible in \mathbb{Z}. Using these definitions it can be proven that in any
integral domain a prime must be irreducible. Euclid's classical lemma can be rephrased as "in the ring of integers \mathbb{Z} every irreducible is prime". This is also true in \mathbb{Z}[i] and \mathbb{Z}[\omega], but not in \mathbb{Z}[\sqrt{-5}]. The rings in which factorization into irreducibles is essentially unique are called
unique factorization domains. Important examples are
polynomial rings over the integers or over a
field,
Euclidean domains and
principal ideal domains. In 1843
Kummer introduced the concept of
ideal number, which was developed further by
Dedekind (1876) into the modern theory of
ideals, special subsets of rings. Multiplication is defined for ideals, and the rings in which they have unique factorization are called
Dedekind domains. There is a version of
unique factorization for ordinals, though it requires some additional conditions to ensure uniqueness. Any commutative Möbius monoid satisfies a unique factorization theorem and thus possesses arithmetical properties similar to those of the multiplicative semigroup of positive integers. Fundamental Theorem of Arithmetic is, in fact, a special case of the unique factorization theorem in commutative Möbius monoids. ==See also==