Finite extensions of the rational numbers and the arithmetic of their integer elements.
IntuitionFrom integers to number fields: extending Q
Take Q(2)={a+b2:a,b∈Q}, the set of numbers built from rationals and 2. Among all these numbers, which ones deserve to be called "integers" — closed under addition, subtraction and multiplication, with no denominators hiding anywhere? The obvious guess, a,b∈Z, turns out to be right for some fields and wrong for others: sometimes half-integer combinations like 21+5 are secretly integral too. Pinning down exactly which elements are integral in each field, and showing they form a ring, is the first step of algebraic number theory — without it, there is no way to talk about "prime factorization" inside K.
Complex-domain visualization showing lattice points corresponding to the ring of integers of an imaginary quadratic field.
For d<0, the elements of K=Q(d) embed as points in the complex plane; the integers OK form a lattice, visible here as the tessellating grid of the complex domain.
UndergraduateDefinition: number fields and rings of integers
Definition: Number field, algebraic integer, ring of integers
A number fieldK is a finite-degree field extension of Q. An element α∈K is an algebraic integer if it is a root of a monic polynomial with integer coefficients. The ring of integersOK is the set of all algebraic integers lying in K; it is a subring of K containing Z.
K=Q(α)={a0+a1α+⋯+an−1αn−1:ai∈Q},n=[K:Q]
The simplest nontrivial number fields are the quadratic fieldsK=Q(d), where d squarefree and d=1. For these, OK has one of exactly two explicit forms, depending only on dmod4: either the "obvious" ring Z[d], or the "half-integer" ring Z[21+d] with ω=21+d. Which case occurs also fixes the field discriminant, which records the primes that ramify in K.
Let d be a squarefree integer, d=1, and K=Q(d). Then OK=Z[d] if d≡2,3(mod4), and OK=Z[21+d] if d≡1(mod4).
Why is it true?
Knowing exactly what the integers of K are is the mandatory first step for doing arithmetic in K: factoring elements or ideals, computing class groups, or deciding which primes ramify all require an honest description of OK, not the naive guess Z[d], which is wrong exactly half the time.
Proof
Write α=a+bd with a,b∈Q. If b=0, α=a∈Q is an algebraic integer iff a∈Z (rational root theorem), which is the case b=0 of Z[d]. If b=0, the minimal polynomial of α over Q is x2−2ax+(a2−db2) (its trace is 2a, its norm a2−db2), so α is integral iff both 2a∈Z and a2−db2∈Z.
Write u=2a∈Z. From a2−db2∈Z, multiplying by 4 gives u2−4db2∈4Z⊂Z, so 4db2∈Z. Write b=p/q in lowest terms (gcd(p,q)=1); then 4db2=4dp2/q2∈Z forces q2∣4dp2, and since gcd(p,q)=1 this forces q2∣4d. Because d is squarefree, the largest perfect square dividing 4d is at most 4, so q2∣4, i.e. q∈{1,2}; either way v:=2b∈Z.
Now substitute u=2a, v=2b (both integers) into a2−db2∈Z: this becomes 4u2−dv2∈Z, i.e. u2≡dv2(mod4). Squares mod 4 are only 0 (even) or 1 (odd). If v is even, dv2≡0(mod4) forces u even too (since u2 odd would give 1≡0); so u,v both even, meaning a,b∈Z — the "trivial" solution, always available, giving Z[d]⊆OK always.
If v is odd, dv2≡d(mod4) (since v2≡1), so we need u2≡d(mod4). If d≡2,3(mod4) (i.e. d≡2,3(mod4)), no square u2∈{0,1}(mod4) can equal 2 or 3(mod4), so this case is impossible — only the trivial u,v both even survives, giving exactly OK=Z[d]. If instead d≡1(mod4) (d≡1(mod4)), we need u2≡1(mod4), satisfied whenever u is odd — and since v is already odd, u≡v(mod2) is exactly the condition for α=2u+vd with u,v both odd, which is precisely Z+Z⋅21+d (check: 21+d itself has u=v=1, both odd), so in this case OK=Z[21+d], strictly larger than Z[d] (index 2).
In each of the two cases of Theorem 1, OK (as explicitly described there) is closed under addition and multiplication, so it is genuinely a subring of K containing Z.
Why is it true?
This is what justifies calling OK a ring of integers at all: without closure under multiplication in particular, one could not multiply two integers of K and stay inside OK, which would make ring-theoretic arithmetic (factorization, ideals) impossible.
Proof
Case d≡2,3(mod4) (OK=Z[d], i.e. all elements a+bd with a,b∈Z): addition is componentwise, (a+bd)+(c+ed)=(a+c)+(b+e)d, clearly again of this form. For multiplication, (a+bd)(c+ed)=(ac+bed)+(ae+bc)d, and since a,b,c,e,d∈Z, both ac+bed and ae+bc are integers, so the product stays in Z[d].
Case d≡1(mod4) (OK=Z[ω] with ω=21+d): first compute ω2 directly. ω2=(21+d)2=41+2d+d=41+d+2d. Since d=2ω−1, this is 41+d+ω−21=4d−1+ω. Because d≡1(mod4), t:=4d−1 is an integer, so ω2=t+ω: a genuine integer relation showing ω satisfies the monic integer polynomial x2−x−t, confirming ω itself is integral (as it must be, matching Theorem 1), and crucially expressing ω2 again as an integer combination of 1 and ω.
Now take general elements a+bω and c+eω with a,b,c,e∈Z; addition is again componentwise and clearly closed. For the product, (a+bω)(c+eω)=ac+(ae+bc)ω+beω2=ac+(ae+bc)ω+be(t+ω)=(ac+bet)+(ae+bc+be)ω. Both coefficients ac+bet and ae+bc+be are integers (products and sums of integers), so the product lies in Z+Zω=Z[ω].
In both cases, closure under addition and multiplication is verified by direct, elementary computation, confirming OK is genuinely a subring of K containing Z in every quadratic field, exactly as the name "ring of integers" promises.
UndergraduateReal-World Applications and Worked Examples
The Gaussian integers Z[i] (d=−1) underlie fast algorithms for representing integers as sums of two squares and are used in digital signal processing and lattice-based error-correcting codes, where two-dimensional signal points are naturally indexed by Gaussian-integer coordinates. The ring Z[φ] generated by the golden ratio φ=21+5 (d=5) appears in materials science: quasicrystals with icosahedral symmetry (such as the Shechtman quasicrystal that won the 2011 Nobel Prize in Chemistry) are naturally modeled using Z[φ]-module structures underlying Penrose-tiling-type constructions.
Example: Gaussian integers and sums of two squares
Confirm OK=Z[i] for d=−1 via Theorem 1, then use the factorization 5=(2+i)(2−i) in Z[i] to recover the classical identity expressing 5 as a sum of two squares.
Solution
Here d=−1; since −1≡3(mod4), this is case d≡2,3(mod4) of Theorem 1, so OK=Z[−1]=Z[i]=Z[i], exactly the familiar Gaussian integers {a+bi:a,b∈Z}.
Compute (2+i)(2−i)=4−i2=4−(−1)=5, confirming 5 factors as a product of the two Gaussian integers 2+i and 2−i (each of norm N(2±i)=22+12=5, a rational prime, so each factor is itself irreducible in Z[i]).
Taking norms of both sides of 5=(2+i)(2−i) using N(a+bi)=a2+b2 and multiplicativity N(αβ)=N(α)N(β): N(5)=25=N(2+i)N(2−i)=5×5, consistent. More directly, the factorization 5=(2+i)(2−i) is algebraically equivalent to the two-squares identity 5=22+12 — every rational prime p≡1(mod4) splits in Z[i] exactly because it can be written as a sum of two squares, a fact whose "why" is precisely this norm factorization in the ring of Gaussian integers.
Example: The golden ratio as a fundamental unit
Confirm OK=Z[φ] for d=5 via Theorem 1, then compute the norm N(φ) of the golden ratio φ=21+5 and explain why this makes φ a unit.
Solution
Here d=5≡1(mod4), so this is case d≡1(mod4) of Theorem 1: OK=Z[21+5]=Z[φ] with φ=21+5, the golden ratio.
The conjugate of φ (swapping 5→−5) is φ′=21−5. The norm is N(φ)=φφ′=4(1+5)(1−5)=41−5=4−4=−1. So N(φ)=−1.
An algebraic integer α∈OK is a unit (invertible in OK, i.e. α−1∈OK too) exactly when N(α)=±1, because the norm is multiplicative and N(α)N(α−1)=N(1)=1 forces N(α) to be a rational integer that divides 1. Since N(φ)=−1, φ is indeed a unit, and in fact its inverse is φ−1=−φ′=25−1=φ−1. Because φ>1, all its powers φn (n∈Z) are distinct units, so Z[φ]× is infinite — this single unit generates infinitely many solutions to the Pell-like equation x2−xy−y2=±1, the same recurrence underlying the Fibonacci numbers.
For d=−1 (so −1≡3(mod4)), what is OK?
For d=5 (so 5≡1(mod4)), what is OK?
What is the norm N(φ) of the golden ratio φ=21+5 in Q(5)?
The ring Z[φ] generated by the golden ratio naturally models which structure in materials science?