Every student of arithmetic learns the fundamental theorem of arithmetic: every integer greater than 1 factors uniquely into primes. This fact is so basic, so constantly used, that it feels like it must hold everywhere integers live. It does not. Step outside Z\mathbb{Z} into almost any larger ring of algebraic integers and unique factorization can shatter — and the story of why it breaks, and how to repair it, is the heart of algebraic number theory.

A Factorization That Goes Wrong

Consider the ring Z[−5]={a+b−5:a,b∈Z}\mathbb{Z}[\sqrt{-5}] = \{a + b\sqrt{-5} : a, b \in \mathbb{Z}\}. It is a perfectly reasonable ring; it sits inside C\mathbb{C} and every element is an algebraic integer. Now factor the ordinary integer 6:

6=2⋅3=(1+−5)(1−−5).6 = 2 \cdot 3 = (1 + \sqrt{-5})(1 - \sqrt{-5}).

Both are genuine factorizations inside Z[−5]\mathbb{Z}[\sqrt{-5}]. The unsettling claim is that none of the four factors 2,3,1+−5,1−−52, 3, 1+\sqrt{-5}, 1-\sqrt{-5} can be broken down any further inside the ring — they are all irreducible — and yet 2⋅32 \cdot 3 and (1+−5)(1−−5)(1+\sqrt{-5})(1-\sqrt{-5}) are genuinely different factorizations, not related by reordering or multiplication by units.

To verify irreducibility, use the norm: for α=a+b−5\alpha = a + b\sqrt{-5} define N(α)=a2+5b2N(\alpha) = a^2 + 5b^2. The norm is multiplicative: N(αβ)=N(α)N(β)N(\alpha\beta) = N(\alpha)N(\beta). One checks that N(2)=4N(2) = 4, N(3)=9N(3) = 9, N(1±−5)=6N(1 \pm \sqrt{-5}) = 6. If 2 were reducible, say 2=αβ2 = \alpha\beta with neither a unit, we’d need N(α)N(β)=4N(\alpha)N(\beta) = 4 with both factors greater than 1, so N(α)=N(β)=2N(\alpha) = N(\beta) = 2. But a2+5b2=2a^2 + 5b^2 = 2 has no integer solutions. So 2 is irreducible; the arguments for the others are similar.

The fundamental theorem of arithmetic fails in Z[−5]\mathbb{Z}[\sqrt{-5}].

This failure is not a curiosity. It appeared naturally in 19th-century attempts to prove Fermat’s Last Theorem by factoring xp+ypx^p + y^p in rings of the form Z[ζp]\mathbb{Z}[\zeta_p], where ζp\zeta_p is a primitive ppth root of unity. The proofs broke down precisely because unique factorization could not be assumed. The fix required a conceptual revolution.

Kummer’s Ideal Numbers and Dedekind’s Ideals

Ernst Kummer, working in the 1840s on cyclotomic fields, noticed that even when elements fail to factor uniquely, something more refined — which he called ideal numbers — does factor uniquely. His ideal numbers were somewhat mysterious objects that he defined by their divisibility properties.

Richard Dedekind reformulated Kummer’s insight with lasting clarity. Instead of ideal numbers, he worked with ideals: subsets I⊆OKI \subseteq \mathcal{O}_K of the ring of integers that are closed under addition and under multiplication by any ring element. Formally, II is an ideal if a,b∈I⇒a+b∈Ia, b \in I \Rightarrow a + b \in I and r∈OK,a∈I⇒ra∈Ir \in \mathcal{O}_K, a \in I \Rightarrow ra \in I.

The fundamental result is:

Theorem (Dedekind). In the ring of integers OK\mathcal{O}_K of any number field KK, every non-zero ideal factors uniquely into a product of prime ideals.

This is the correct generalization of the fundamental theorem. Elements may fail to factor uniquely; ideals never do. In Z[−5]\mathbb{Z}[\sqrt{-5}] the breakdown of 6=2⋅3=(1+−5)(1−−5)6 = 2 \cdot 3 = (1+\sqrt{-5})(1-\sqrt{-5}) resolves at the ideal level:

⟨6⟩=p22⋅p3⋅p‾3,\langle 6 \rangle = \mathfrak{p}_2^2 \cdot \mathfrak{p}_3 \cdot \overline{\mathfrak{p}}_3,

where p2=⟨2,1+−5⟩\mathfrak{p}_2 = \langle 2, 1 + \sqrt{-5} \rangle, p3=⟨3,1+−5⟩\mathfrak{p}_3 = \langle 3, 1+\sqrt{-5} \rangle, and p‾3=⟨3,1−−5⟩\overline{\mathfrak{p}}_3 = \langle 3, 1 - \sqrt{-5} \rangle are prime ideals. Both element-level factorizations of 6 correspond to the same ideal factorization; the apparent ambiguity disappears.

Number Fields and Rings of Integers

A number field KK is a finite extension of Q\mathbb{Q}. Any such field is obtained by adjoining a root α\alpha of an irreducible polynomial f∈Q[x]f \in \mathbb{Q}[x] of degree nn: K=Q(α)K = \mathbb{Q}(\alpha). As a Q\mathbb{Q}-vector space, KK has dimension nn, called the degree [K:Q][K : \mathbb{Q}]. Examples:

  • Q(d)\mathbb{Q}(\sqrt{d}) for a square-free integer dd: quadratic fields, degree 2.
  • Q(ζp)\mathbb{Q}(\zeta_p) for a primitive ppth root of unity: cyclotomic fields, degree p−1p - 1.
  • Q(α)\mathbb{Q}(\alpha) where α3−2=0\alpha^3 - 2 = 0: the cubic field Q(23)\mathbb{Q}(\sqrt[3]{2}), degree 3.

Inside KK sits the ring of integers OK\mathcal{O}_K: the set of all α∈K\alpha \in K satisfying some monic polynomial with coefficients in Z\mathbb{Z}. For K=QK = \mathbb{Q} itself, OK=Z\mathcal{O}_K = \mathbb{Z}. For K=Q(d)K = \mathbb{Q}(\sqrt{d}):

OK={Z ⁣[1+d2]if d≡1(mod4),Z[d]if d≡2,3(mod4).\mathcal{O}_K = \begin{cases} \mathbb{Z}\!\left[\frac{1+\sqrt{d}}{2}\right] & \text{if } d \equiv 1 \pmod{4}, \\ \mathbb{Z}[\sqrt{d}] & \text{if } d \equiv 2, 3 \pmod{4}. \end{cases}

This subtlety — that the ring of integers of Q(−3)\mathbb{Q}(\sqrt{-3}) is Z ⁣[1+−32]\mathbb{Z}\!\left[\frac{1+\sqrt{-3}}{2}\right], not Z[−3]\mathbb{Z}[\sqrt{-3}] — is typical: the correct OK\mathcal{O}_K can be larger than the obvious candidate, and getting it wrong invalidates factorization arguments.

The Ideal Class Group

With unique factorization of ideals in hand, one asks: when are all ideals actually principal, i.e., of the form ⟨α⟩=αOK\langle \alpha \rangle = \alpha \mathcal{O}_K? The answer is encoded in the ideal class group Cl(OK)\mathrm{Cl}(\mathcal{O}_K).

Two ideals II and JJ are equivalent if αI=βJ\alpha I = \beta J for some non-zero α,β∈OK\alpha, \beta \in \mathcal{O}_K. Equivalence classes form a group under ideal multiplication, and the identity element is the class of principal ideals. This group is always finite; its order hK=∣Cl(OK)∣h_K = |\mathrm{Cl}(\mathcal{O}_K)| is the class number of KK.

The crucial equivalence:

hK=1  ⟺  OK is a principal ideal domain  ⟺  OK is a UFD.h_K = 1 \iff \mathcal{O}_K \text{ is a principal ideal domain} \iff \mathcal{O}_K \text{ is a UFD}.

For K=Q(−5)K = \mathbb{Q}(\sqrt{-5}), one computes hK=2h_K = 2: there are two ideal classes, and this one non-trivial class is exactly what prevents unique element factorization. The ideal p2=⟨2,1+−5⟩\mathfrak{p}_2 = \langle 2, 1+\sqrt{-5}\rangle is not principal — no single element generates it — but p22=⟨2⟩\mathfrak{p}_2^2 = \langle 2 \rangle is. It is, in a precise sense, a “half-element.”

Computing class groups is a central computational task in algebraic number theory. Modern algorithms (based on Minkowski’s bound, which guarantees that every ideal class contains an ideal of norm at most n!nn(4π)r2∣dK∣\frac{n!}{n^n}\left(\frac{4}{\pi}\right)^{r_2}\sqrt{|d_K|}) make this tractable for fields of moderate degree.

Ramification: How Primes Travel Upstairs

When we pass from Z\mathbb{Z} to OK\mathcal{O}_K, an ordinary prime p∈Zp \in \mathbb{Z} generates the ideal pOKp\mathcal{O}_K, which factors into prime ideals of OK\mathcal{O}_K. Three qualitatively different behaviors occur:

  • Split: pOK=p1p2⋯pgp\mathcal{O}_K = \mathfrak{p}_1 \mathfrak{p}_2 \cdots \mathfrak{p}_g with g>1g > 1 distinct prime ideals. Informally, pp “splits” into several primes upstairs.
  • Inert: pOKp\mathcal{O}_K is itself a prime ideal; the prime stays prime in the extension.
  • Ramified: pOK=pe⋯p\mathcal{O}_K = \mathfrak{p}^e \cdots for some e≥2e \geq 2; the prime reappears with multiplicity.

Ramification is the most delicate case. A prime pp ramifies in KK if and only if pp divides the discriminant dKd_K of the field — a single integer that encodes the arithmetic complexity of KK. For K=Q(d)K = \mathbb{Q}(\sqrt{d}) with dd square-free, dK=dd_K = d if d≡1(mod4)d \equiv 1 \pmod 4 and dK=4dd_K = 4d otherwise. Only finitely many primes ramify in any given number field.

The Dedekind-Kummer theorem gives an explicit recipe. Suppose OK=Z[α]\mathcal{O}_K = \mathbb{Z}[\alpha] and p∤[OK:Z[α]]p \nmid [\mathcal{O}_K : \mathbb{Z}[\alpha]]. Factor the minimal polynomial f(x)f(x) of α\alpha modulo pp:

f(x)≡∏i=1gf‾i(x)ei(modp).f(x) \equiv \prod_{i=1}^g \overline{f}_i(x)^{e_i} \pmod{p}.

Then pOK=p1e1⋯pgegp\mathcal{O}_K = \mathfrak{p}_1^{e_1} \cdots \mathfrak{p}_g^{e_g}, where pi=⟨p,fi(α)⟩\mathfrak{p}_i = \langle p, f_i(\alpha) \rangle and fif_i is any lift of f‾i\overline{f}_i. The exponents eie_i are the ramification indices and the degrees fi=deg⁡f‾if_i = \deg \overline{f}_i are the residue degrees. They satisfy ∑ieifi=n=[K:Q]\sum_i e_i f_i = n = [K : \mathbb{Q}].

This theorem transforms an abstract ideal factorization into an explicit polynomial computation, making it the primary tool for determining how primes behave in a given number field.

Units and Dirichlet’s Unit Theorem

The units of OK\mathcal{O}_K — the invertible elements — form a group OK×\mathcal{O}_K^\times. In Z\mathbb{Z} the units are just {±1}\{\pm 1\}. In Z[i]\mathbb{Z}[i] (the Gaussian integers, K=Q(i)K = \mathbb{Q}(i)) the units are {1,−1,i,−i}\{1, -1, i, -i\}. In Z[1+52]\mathbb{Z}[\frac{1+\sqrt{5}}{2}] (the ring of integers of Q(5)\mathbb{Q}(\sqrt{5})) units are infinite in number: ±ϕn\pm \phi^n for all n∈Zn \in \mathbb{Z}, where ϕ=1+52\phi = \frac{1+\sqrt{5}}{2} is the golden ratio.

Dirichlet’s unit theorem (1846) gives the complete structure. Let r1r_1 be the number of real embeddings K↪RK \hookrightarrow \mathbb{R} and r2r_2 the number of conjugate pairs of complex embeddings K↪CK \hookrightarrow \mathbb{C}. Then:

OK×≅μK×Zr1+r2−1,\mathcal{O}_K^\times \cong \mu_K \times \mathbb{Z}^{r_1 + r_2 - 1},

where μK\mu_K is the finite cyclic group of roots of unity in KK.

The rank r1+r2−1r_1 + r_2 - 1 is called the unit rank. For imaginary quadratic fields (r1=0r_1 = 0, r2=1r_2 = 1) the rank is 0+1−1=00 + 1 - 1 = 0, so units are finite — just roots of unity. For real quadratic fields (r1=2r_1 = 2, r2=0r_2 = 0) the rank is 2+0−1=12 + 0 - 1 = 1, so the unit group is generated by a single fundamental unit ε\varepsilon and its negatives and powers. The fundamental unit of Q(2)\mathbb{Q}(\sqrt{2}) is 1+21 + \sqrt{2}; for Q(94)\mathbb{Q}(\sqrt{94}) it is 2143295+221064942143295 + 221064\sqrt{94} — these grow rapidly and their computation is non-trivial.

The unit theorem is essential for understanding the arithmetic of OK\mathcal{O}_K: units are the ambiguity in element factorizations, and controlling them is prerequisite to any counting result.

The Class Number 1 Problem

Among imaginary quadratic fields Q(−d)\mathbb{Q}(\sqrt{-d}) for d>0d > 0, a natural question is: for which dd is hK=1h_K = 1? Gauss conjectured (based on extensive computation) that there are only finitely many such fields, and listed nine candidates:

d=1,2,3,7,11,19,43,67,163.d = 1, 2, 3, 7, 11, 19, 43, 67, 163.

For d=163d = 163, the ring Z ⁣[1+−1632]\mathbb{Z}\!\left[\frac{1+\sqrt{-163}}{2}\right] is a UFD — a fact connected to the remarkable near-integer eπ163=262537412640768743.999999999999…e^{\pi\sqrt{163}} = 262537412640768743.999999999999\ldots, which is within 10−1210^{-12} of an integer because of deep modular-forms arithmetic.

The Stark-Heegner theorem (proved rigorously by Harold Stark in 1967, building on work of Kurt Heegner from 1952 that was initially doubted) confirms that Gauss’s list is complete: there are exactly nine imaginary quadratic fields with class number 1. The proof uses the theory of complex multiplication and connections between imaginary quadratic fields and modular functions.

For real quadratic fields the analogous problem — classifying those with hK=1h_K = 1 — remains open. It is expected that infinitely many exist (e.g., Q(p)\mathbb{Q}(\sqrt{p}) for primes p≡1(mod4)p \equiv 1 \pmod 4 is conjectured often to have h=1h = 1), but no proof is in sight.

Kummer, Regular Primes, and Fermat’s Last Theorem

One of the most celebrated applications of algebraic number theory is Kummer’s partial proof of Fermat’s Last Theorem. Suppose xp+yp=zpx^p + y^p = z^p with gcd⁡(x,y,z)=1\gcd(x, y, z) = 1 and pp an odd prime. In the cyclotomic field K=Q(ζp)K = \mathbb{Q}(\zeta_p), one factors:

zp=xp+yp=∏j=0p−1(x+ζpjy).z^p = x^p + y^p = \prod_{j=0}^{p-1}(x + \zeta_p^j y).

If OK\mathcal{O}_K were a UFD, the factors x+ζpjyx + \zeta_p^j y would be “almost” coprime, and a careful argument forces a contradiction. The ring OK=Z[ζp]\mathcal{O}_K = \mathbb{Z}[\zeta_p] is a UFD precisely when hK+=1h_{K^+} = 1 (class number of the maximal real subfield) — and Kummer defined:

A prime pp is regular if p∤hQ(ζp)p \nmid h_{\mathbb{Q}(\zeta_p)}.

Kummer proved FLT for all regular primes. Checking small cases: p=37p = 37 is the smallest irregular prime (the class number of Q(ζ37)\mathbb{Q}(\zeta_{37}) is divisible by 37), and Kummer’s argument breaks down. Subsequent work by Herbrand, Ribet, and others connected irregularity to Bernoulli numbers: pp is irregular if and only if pp divides the numerator of some Bernoulli number BkB_k for 2≤k≤p−32 \leq k \leq p-3, kk even. Irregular primes are known to exist infinitely often (conjecturally about 39% of all primes), but the complete proof of FLT required the very different methods of Wiles and Taylor.

Connections to Modern Number Theory

Algebraic number theory did not stop with Dedekind. Every major thread of modern number theory runs through it.

LL-functions. To each number field KK one attaches the Dedekind zeta function

ζK(s)=∑a≠01N(a)s=∏p11−N(p)−s,\zeta_K(s) = \sum_{\mathfrak{a} \neq 0} \frac{1}{N(\mathfrak{a})^s} = \prod_{\mathfrak{p}} \frac{1}{1 - N(\mathfrak{p})^{-s}},

where the product runs over prime ideals of OK\mathcal{O}_K. For K=QK = \mathbb{Q} this is the Riemann zeta function. The analytic class number formula relates hKh_K and the regulator (a measure of the unit group) to the residue of ζK(s)\zeta_K(s) at s=1s = 1. More general LL-functions attached to Galois representations and automorphic forms generalize this picture.

Galois theory and ramification. The Galois group Gal(K/Q)\mathrm{Gal}(K/\mathbb{Q}) acts on the prime ideals above a given rational prime pp, and decomposition groups, inertia groups, and Frobenius elements give a detailed picture of how pp behaves in KK. Chebotarev’s density theorem says that Frobenius elements are equidistributed in Gal(K/Q)\mathrm{Gal}(K/\mathbb{Q}), giving quantitative information about the splitting of primes.

Class field theory. The crowning achievement of early 20th-century algebraic number theory describes all abelian extensions of a number field KK in terms of the arithmetic of KK itself — the generalization of Gauss’s quadratic reciprocity to arbitrary KK and arbitrary abelian Galois groups. The Artin reciprocity law unifies all classical reciprocity laws.

The Langlands program and BSD. The deepest open conjectures in number theory — including the Birch and Swinnerton-Dyer conjecture on elliptic curves (one of the Millennium Problems) and the Langlands program connecting Galois representations to automorphic forms — are rooted in the structures algebraic number theory built: ideal class groups, LL-functions, Galois representations. Wiles’s proof of Fermat’s Last Theorem was itself a theorem in the Langlands program, showing that every elliptic curve over Q\mathbb{Q} is modular.

Why It All Matters

Algebraic number theory began with an embarrassing failure: the assumption that unique factorization holds everywhere, an assumption that turned out to be false in almost all the rings one wants to use. The repair — Dedekind’s ideal theory — is more than a patch. It reveals that the integers Z\mathbb{Z}, far from being generic, are exceptional: a UFD inside a world where unique factorization of elements is rare and precious, and where the class group measures exactly how far you are from that ideal state.

The theory developed to handle this failure is now among the most powerful machinery in mathematics. Class groups, discriminants, unit groups, and LL-functions appear in cryptography (ideal lattices in post-quantum schemes), in the theory of modular forms, in arithmetic geometry, and at the frontier of the Langlands program. The failure of a property we took for granted turned out to be more interesting than the property itself.

Related topics: Galois Theory, The Riemann Zeta Function, Fermat’s Last Theorem, Diophantine Equations, Distribution of Primes, Quadratic Reciprocity

Frequently asked

What is a number field?

A number field is a finite algebraic extension of the rational numbers Q. Concretely, it is obtained by adjoining to Q a root α of an irreducible polynomial with rational coefficients, giving Q(α). Every element can be written as a polynomial in α with rational coefficients. The ring of integers O_K inside K is the subring of elements satisfying a monic polynomial with integer coefficients — the natural generalisation of Z inside Q.

Why does unique factorization fail in some rings of integers?

In Z every non-zero non-unit factors uniquely into primes. In the ring Z[√-5], elements that are irreducible (cannot be factored further within the ring) are not necessarily prime in the number-theoretic sense: an element p is prime when p | ab implies p | a or p | b, and this fails for 2, 3, 1+√-5, and 1-√-5 in Z[√-5]. The failure is captured by the class group: unique factorization holds exactly when the class group is trivial, i.e. when the class number h_K equals 1.

What is the class number and why does it matter?

The ideal class group Cl(O_K) measures how far O_K is from being a principal ideal domain. Its order h_K is the class number. When h_K = 1 every ideal is principal and O_K is a UFD. When h_K > 1 there are non-principal ideals, signalling the failure of unique factorization of elements. For imaginary quadratic fields Q(√-d), there are exactly nine values of d for which h_K = 1, and Stark and Heegner proved no others exist.

How did Kummer use ideal class groups to attack Fermat's Last Theorem?

Kummer proved FLT for all regular primes p — primes that do not divide the class number of the cyclotomic field Q(ζ_p). His argument factorises x^p + y^p in the ring Z[ζ_p] and uses unique factorization of ideals to force a contradiction. The argument breaks down for irregular primes (like 37, 59, 67) because the class number obstruction prevents the conclusion. All primes up to around 4 million have now been verified, but Kummer's method alone cannot handle all primes.