Intuition, Vocabulary and Foundations
Ordinary integers occupy a one-dimensional number line. Algebraic number theory enlarges that world by adjoining roots of polynomial equations. Gaussian integers form the square lattice $\mathbb Z[i]=\{a+bi:a,b\in\mathbb Z\}$, where $i^2=-1$, while Eisenstein integers form the triangular lattice $\mathbb Z[\omega]=\{a+b\omega:a,b\in\mathbb Z\}$, where $\omega^2+\omega+1=0$.
This resembles expanding a toolkit: an equation or factorization unavailable over the integers may become visible in a larger ring. For example, $5=(2+i)(2-i)$ in $\mathbb Z[i]$. The Gaussian norm $N(a+bi)=a^2+b^2$ turns multiplication into integer multiplication, so $N(2+i)=5$. In $\mathbb Z[\omega]$, the corresponding norm is $N(a+b\omega)=a^2-ab+b^2$.
A complex number is an algebraic integer if it satisfies a monic polynomial with integer coefficients. The ring of integers of a number field contains all such elements and need not equal the first basis one guesses: the ring of integers of $\mathbb Q(\sqrt5)$ is $\mathbb Z[(1+\sqrt5)/2]$. Elements of norm $1$ are units. Ideals generalize ordinary multiples and retain unique prime factorization even when elements do not. Ramification means a prime ideal occurs repeatedly, while the class group measures the obstruction to every ideal being principal.
Elements may lose unique factorization, but nonzero ideals in the ring of integers of a number field still factor uniquely into prime ideals. Before transferring an integer factorization argument to a larger ring, establish its units, norm, integral basis, and factorization properties.
| Concept | Definition or notation | Example | Non-example or boundary | Question answered |
|---|---|---|---|---|
| Gaussian integer | $a+bi$ with $a,b\in\mathbb Z$ | $3-2i$ | $(1/2)+i$ is not in $\mathbb Z[i]$ | What arithmetic lives on the square lattice? |
| Eisenstein integer | $a+b\omega$ with $\omega^2+\omega+1=0$ | $2-\omega$ | Treating $\omega$ as a real number | What arithmetic lives on the triangular lattice? |
| Algebraic integer | Root of a monic polynomial in $\mathbb Z[x]$ | $(1+\sqrt5)/2$ satisfies $x^2-x-1=0$ | $1/2$ is not an algebraic integer | Which field elements behave integrally? |
| Norm | Product of all conjugates | $N(3+4i)=25$ | Complex magnitude alone is not the general definition | How can divisibility be related to integer size? |
| Unit | Element invertible inside the ring | $\pm1,\pm i$ in $\mathbb Z[i]$ | $2$ is not a Gaussian unit | Which factors are insignificant up to associates? |
| Ideal | Additive subgroup closed under ring multiplication | $(2+i)$ in $\mathbb Z[i]$ | An arbitrary finite subset | How is divisibility represented structurally? |
| Ramification | A prime ideal occurs with exponent greater than one | $(2)=(1+i)^2$ up to a unit | Every splitting prime is ramified | Which primes develop repeated factors? |
| Class group | Fractional ideals modulo principal ideals | Trivial for $\mathbb Z[i]$ | It is not generally a group of elements | How far is the ring from principal ideal factorization? |
| Unique factorization | Irreducibles are unique up to units and order | Holds in $\mathbb Z[i]$ | Fails for elements in $\mathbb Z[\sqrt{-5}]$ | May element-factor arguments be reused? |
Step-by-Step Derivations and Algorithms
The Euclidean algorithm extends to any Euclidean domain. For nonzero $\beta\in\mathbb Z[i]$, divide $\alpha$ by $\beta$ in $\mathbb C$, round both coordinates to the nearest integers to obtain $q\in\mathbb Z[i]$, and set $r=\alpha-q\beta$. Square-lattice geometry guarantees $N(r)\lt N(\beta)$, so repeated division terminates. The invariant $(\alpha,\beta)=(\beta,r)$ says the pairs generate the same ideal and have the same common divisors; back-substitution produces a Gaussian Bézout identity.
Norms constrain factorization because $N(\alpha\beta)=N(\alpha)N(\beta)$. An element whose norm is an ordinary prime is irreducible, though the converse requires care. In $\mathbb Z[i]$, $2$ ramifies, a rational prime $p\equiv1\pmod4$ splits, and a rational prime $p\equiv3\pmod4$ remains inert. Eisenstein integers yield an analogous classification governed by residues modulo $3$.
Cubic reciprocity is naturally formulated in $\mathbb Z[\omega]$, and biquadratic reciprocity in $\mathbb Z[i]$. They replace the sign-valued quadratic symbol with higher-power residue symbols. Their algorithms reduce residue questions using conjugation, norms, and reciprocity, but only after elements are normalized as primary and all coprimality hypotheses are verified.
flowchart TD
A["Choose a number field"] --> B["Determine its ring of integers"]
B --> C{"Euclidean norm available?"}
C -->|Yes| D["Run norm-decreasing gcd"]
C -->|No| E{"Principal ideal domain?"}
E -->|Yes| F["Use element or ideal gcd methods"]
E -->|No| G["Factor ideals and track classes"]
D --> H["Normalize by a unit"]
F --> H
G --> I["Interpret class-group obstruction"]
H --> J{"Power-residue question?"}
J -->|Square| K["Quadratic reciprocity"]
J -->|Cube or fourth power| L["Cubic or biquadratic reciprocity"]
The Euclidean-gcd invariant is $(a,b)=(b,a-qb)$, and a strictly decreasing nonnegative norm proves termination. For Gaussian inputs of at most $B$ bits, the classical analysis uses $O(B)$ divisions; actual bit cost depends on exact multiplication and division, and outside a Euclidean domain the argument must be replaced by ideal arithmetic.
Implementation, Complexity and Engineering
The reference implementation performs exact Gaussian-integer arithmetic. Division uses rational numerators and exact nearest-integer rounding rather than floating point. The gcd is normalized to one of its four associates so callers receive a stable representative.
This code deliberately covers only $\mathbb Z[i]$, a Euclidean domain. It does not imply that the same element-gcd or factorization code works in arbitrary quadratic rings. General number-field software must represent an integral basis, ideals, embeddings, discriminants, and coefficient growth, normally through a specialized computer-algebra library.
| Choice | Mathematical domain | Cost or representation | Failure mode | Mitigation |
|---|---|---|---|---|
| Pair representation | $\mathbb Z[i]$ as $(a,b)$ | Exact integer coefficients | Accidentally using complex floating point | Implement arithmetic, conjugation, and norm explicitly |
| Nearest-lattice division | Gaussian Euclidean division | Exact rounding of two rational coordinates | Rounding error breaks norm descent | Round integer numerators without floating point |
| Associate normalization | Units $\{\pm1,\pm i\}$ | Constant work | Equivalent gcds compare unequal | Select one documented canonical associate |
| Norm-based gcd | Euclidean quadratic rings | Logarithmic number of steps in norm size | Assuming every quadratic ring is Euclidean | Prove norm descent for the selected ring |
| Element factorization | UFDs such as $\mathbb Z[i]$ | Depends on norms and integer factorization | Reusing it in a non-UFD | Factor ideals or use class-group information |
| Power basis | Coefficients in $1,\theta,\ldots$ | Convenient but not always integral | Missing algebraic integers | Compute or obtain an integral basis |
| Ideal arithmetic | Dedekind domains | Integer lattices with coefficient growth | Naive matrices become large | Use normal forms and established libraries |
| Reciprocity symbols | Primary elements under exact hypotheses | Fast residue classification | Ignoring normalization or coprimality | Check every theorem hypothesis |
Applications, Case Studies and Exercises
Small lattice rings make the abstract ideas visible. Gaussian arithmetic connects sums of two squares with prime splitting, while Eisenstein arithmetic explains the structure behind cubic residues. A contrasting quadratic field shows why ideals and class groups are necessary: element factorization may fail even though ideal factorization remains unique.
Apply Algebraic Number Theory
Case study 1 — factor in the Gaussian integers. Begin with $5=(2+i)(2-i)$. Verify both factors have norm $5$, confirm that their product is $5$, and list all associates obtained by multiplying by $\pm1$ and $\pm i$. Then run the reference gcd on $11+3i$ and $1+8i$. Checkpoint: the normalized gcd is $2+i$. Success means it divides both inputs and an exact Bézout identity is recovered.
Case study 2 — detect failed element uniqueness. In $\mathbb Z[\sqrt{-5}]$, compare $6=2\cdot3=(1+\sqrt{-5})(1-\sqrt{-5})$. Compute $N(a+b\sqrt{-5})=a^2+5b^2$ and investigate why the displayed factors are not related merely by units and reordering. Checkpoint: identify the obstruction to treating this ring like $\mathbb Z[i]$, then state how prime-ideal factorization restores uniqueness. Success means no Euclidean or UFD assumption is used without proof.
Hands-on extension — Eisenstein arithmetic. Represent $a+b\omega$ by integer pairs, derive multiplication from $\omega^2=-\omega-1$, and implement $N(a+b\omega)=a^2-ab+b^2$. Verify multiplicativity for every pair with coefficients from $-4$ through $4$, then enumerate the six elements of norm $1$. Success means every norm test passes and exactly six units are found.
Tiered exercises. Recall: define an algebraic integer, unit, ideal, and ramified prime. Derive: prove the Gaussian norm is multiplicative. Implement: print the gcd quotients and decreasing norms. Debug: replace exact rounding with floating point and find a large case where verification becomes unreliable. Extend: compare rings of integers of $\mathbb Q(\sqrt d)$ for squarefree $d$ in the two congruence cases modulo $4$.
Use element arithmetic when the ring is explicitly known to be Euclidean or a UFD; use ideals when unique factorization of elements is absent, and use specialized algebra systems when integral bases or class groups are required. Norms alone do not prove every primality claim, not every quadratic ring is $\mathbb Z[\sqrt d]$, and integer factorization rules do not survive unchanged.