Rings of Algebraic Integers

In this section we will learn about rings of algebraic integers and discuss some of their properties. We will prove that the ring of integers $ \O_K$ of a number field is noetherian.

Fix an algebraic closure $ \overline{\mathbf{Q}}$ of $ \mathbf {Q}$. Thus $ \overline{\mathbf{Q}}$ is an infinite field extension of $ \mathbf {Q}$ with the property that every polynomial $ f\in\mathbf{Q}[x]$ splits as a product of linear factors in $ \overline{\mathbf{Q}}[x]$. One choice of $ \overline{\mathbf{Q}}$ is the subfield of the complex numbers $ \mathbf{C}$ generated by all roots in $ \mathbf{C}$ of all polynomials with coefficients in  $ \mathbf {Q}$. Note that any two choices of  $ \overline{\mathbf{Q}}$ are isomorphic, but there will be many isomorphisms between them.

An algebraic integer is an element of $ \overline{\mathbf{Q}}$.

Definition 2.3.1 (Algebraic Integer)   An element $ \alpha\in\overline{\mathbf{Q}}$ is an algebraic integer if it is a root of some monic polynomial with coefficients in  $ \mathbf {Z}$.

For example, $ \sqrt{2}$ is an algebraic integer, since it is a root of $ x^2-2$, but one can prove $ 1/2$ is not an algebraic integer, since one can show that it is not the root of any monic polynomial over  $ \mathbf {Z}$. Also $ \pi$ and $ e$ are not algebraic numbers (they are transcendental).

Example 2.3.2   We compute some minimal polynomials in SAGE. The minimal polynomial of $ 1/2$:
sage: (1/2).minpoly()
x - 1/2
We construct a root $ a$ of $ x^2-2$ and compute its minimal polynomial:
sage: k.<a> = NumberField(x^2 - 2)
sage: a^2 - 2
sage: a.charpoly()
x^2 - 2
Finally we compute the minimal polynomial of $ \sqrt{2}/2 + 3$, which is not integral:
sage: (a/2 + 3).charpoly()
x^2 - 6*x + 17/2

The only elements of $ \mathbf {Q}$ that are algebraic integers are the usual integers $ \mathbf {Z}$. However, there are elements of $ \overline{\mathbf{Q}}$ that have denominators when written down, but are still algebraic integers. For example,

$\displaystyle \alpha = \frac{1+\sqrt{5}}{2}

is an algebraic integer, since it is a root of the monic polynomial $ x^2 - x - 1$. We verify this using SAGE below, though of course this is easy to do by hand (you should try much more complicated examples in SAGE).
sage: k.<a> = QuadraticField(5)
sage: a^2
sage: alpha = (1 + a)/2
sage: alpha.charpoly()
x^2 - x - 1
sage: alpha.is_integral()

Definition 2.3.3 (Minimal Polynomial)   The minimal polynomial of $ \alpha\in\overline{\mathbf{Q}}$ is the monic polynomial $ f\in\mathbf{Q}[x]$ of least positive degree such that $ f(\alpha)=0$.

It is a consequence of Lemma 2.3.5 that the minimal polynomial $ \alpha$ is unique. The minimal polynomial of $ 1/2$ is $ x-1/2$, and the minimal polynomial of $ \sqrt[3]{2}$ is $ x^3-2$.

Example 2.3.4   We compute the minimal polynomial of a number expressed in terms of $ \sqrt[4]{2}$:
sage: k.<a> = NumberField(x^4 - 2)
sage: a^4
sage: (a^2 + 3).minpoly()
x^2 - 6*x + 7

Lemma 2.3.5   Suppose $ \alpha\in\overline{\mathbf{Q}}$. Then the minimal polynomial of $ \alpha$ divides any polynomial $ h$ such that $ h(\alpha)=0$.

Proof. Let $ f$ be a minimal polynomial of $ \alpha$. If $ h(\alpha)=0$, use the division algorithm to write $ h=qf + r$, where $ 0\leq \deg(r) <
\deg(f)$. We have

$\displaystyle r(\alpha) = h(\alpha) - q(\alpha) f(\alpha) =

so $ \alpha$ is a root of $ r$. However, $ f$ is the monic polynomial of least positive degree with root $ \alpha$, so $ r=0$. $ \qedsymbol$

Lemma 2.3.6   If $ \alpha$ is an algebraic integer, then the minimal polynomial of $ \alpha$ has coefficients in  $ \mathbf {Z}$.

Proof. Suppose $ f\in\mathbf{Q}[x]$ is the minimal polynomial of $ \alpha$. Since $ \alpha$ is an algebraic integer, there is a polynomial $ g\in\mathbf{Z}[x]$ that is monic such that $ g(\alpha)=0$. By Lemma 2.3.5, we have $ g=fh$, for some monic $ h\in\mathbf{Q}[x]$. If $ f\not\in\mathbf{Z}[x]$, then some prime $ p$ divides the denominator of some coefficient of $ f$. Let $ p^i$ be the largest power of $ p$ that divides some denominator of some coefficient $ f$, and likewise let $ p^j$ be the largest power of $ p$ that divides some denominator of a coefficient of $ h$. Then $ p^{i+j}g
= (p^if)(p^j h)$, and if we reduce both sides modulo $ p$, then the left hand side is 0 but the right hand side is a product of two nonzero polynomials in $ \mathbf{F}_p[x]$, hence nonzero, a contradiction. $ \qedsymbol$

Proposition 2.3.7   An element $ \alpha\in\overline{\mathbf{Q}}$ is integral if and only if $ \mathbf{Z}[\alpha]$ is finitely generated as a $ \mathbf {Z}$-module.

Proof. Suppose $ \alpha$ is integral and let $ f\in\mathbf{Z}[x]$ be the monic minimal polynomial of $ \alpha$ (that $ f\in\mathbf{Z}[x]$ is Lemma 2.3.6). Then $ \mathbf{Z}[\alpha]$ is generated by $ 1,\alpha,\alpha^2,\ldots,\alpha^{d-1}$, where $ d$ is the degree of $ f$. Conversely, suppose $ \alpha\in\overline{\mathbf{Q}}$ is such that $ \mathbf{Z}[\alpha]$ is finitely generated, say by elements $ f_1(\alpha), \ldots, f_n(\alpha)$. Let $ d$ be any integer bigger than the degrees of all $ f_i$. Then there exist integers $ a_i$ such that $ \alpha^d = \sum_{i=1}^n a_i f_i(\alpha)$, hence $ \alpha$ satisfies the monic polynomial $ x^d - \sum_{i=1}^n a_i f_i(x) \in \mathbf{Z}[x]$, so $ \alpha$ is integral. $ \qedsymbol$

Example 2.3.8   The rational number $ \alpha=1/2$ is not integral. Note that $ G=\mathbf{Z}[1/2]$ is not a finitely generated $ \mathbf {Z}$-module, since $ G$ is infinite and $ G/2G=0$. (You can see that $ G/2G=0$ implies that $ G$ is not finitely generated, by assuming that $ G$ is finitely generated, using the structure theorem to write $ G$ as a product of cyclic groups, and noting that $ G$ has nontrivial $ 2$-torsion.)

Proposition 2.3.9   The set $ \overline{\mathbf{Z}}$ of all algebraic integers is a ring, i.e., the sum and product of two algebraic integers is again an algebraic integer.

Proof. Suppose $ \alpha, \beta\in \overline{\mathbf{Z}}$, and let $ m, n$ be the degrees of the minimal polynomials of $ \alpha, \beta$, respectively. Then $ 1,\alpha,\ldots,\alpha^{m-1}$ span $ \mathbf{Z}[\alpha]$ and $ 1,\beta,\ldots,\beta^{n-1}$ span $ \mathbf{Z}[\beta]$ as $ \mathbf {Z}$-module. Thus the elements $ \alpha^i\beta^j$ for $ i \leq m, j\leq n$ span $ \mathbf{Z}[\alpha, \beta]$. Since $ \mathbf{Z}[\alpha + \beta]$ is a submodule of the finitely-generated module $ \mathbf{Z}[\alpha, \beta]$, it is finitely generated, so $ \alpha+\beta$ is integral. Likewise, $ \mathbf{Z}[\alpha\beta]$ is a submodule of $ \mathbf{Z}[\alpha, \beta]$, so it is also finitely generated and $ \alpha\beta$ is integral. $ \qedsymbol$

Example 2.3.10   We illustrate an example of a sum and product of two algebraic integers being an algebraic integer. We first make the relative number field obtained by adjoining a root of $ x^3 - 5$ to the field $ \mathbf{Q}(\sqrt{2})$:
sage: k.<a, b> = NumberField([x^2 - 2, x^3 - 5])
sage: k
Number Field in a with defining polynomial x^2 + -2 over its base field

Here $ a$ and $ b$ are roots of $ x^2-2$ and $ x^3 - 5$, respectively.

sage: a^2
sage: b^3

We compute the minimal polynomial of the sum and product of $ \sqrt[3]{5}$ and $ \sqrt{2}$. The command absolute_minpoly gives the minimal polynomial of the element over the rational numbers.

sage: (a+b).absolute_minpoly()
x^6 - 6*x^4 - 10*x^3 + 12*x^2 - 60*x + 17
sage: (a*b).absolute_minpoly()
x^6 - 200
Of course the minimal polynomial of the product is $ \sqrt[3]{5}
\sqrt{2}$ is trivial to compute by hand. The minimal polynomial of $ \alpha = \sqrt[3]{5} + \sqrt{2}$ could be computed by hand by computing the determinant of the matrix given by left multiplication of $ \alpha$ on this basis:

$\displaystyle 1,\sqrt{2}, \sqrt[3]{5}, \sqrt[3]{5}\sqrt{2}, \sqrt[3]{5}^2, \sqrt[3]{5}^2\sqrt{2}.

The following is an alternative more symbolic way to compute the minimal polynomials above, though it is not provably correct. We compute $ \alpha$ to 100 bits precision (via the n command), then use the LLL algorithm (via the algdep command) to heuristically find a linear relation between the first $ 6$ powers of $ \alpha$.

sage: a = 5^(1/3); b = sqrt(2)
sage: c = a+b; c
5^(1/3) + sqrt(2)
sage: (a+b).n(100).algdep(6)
x^6 - 6*x^4 - 10*x^3 + 12*x^2 - 60*x + 17
sage: (a*b).n(100).algdep(6)
x^6 - 200

Definition 2.3.11 (Number field)   A number field is a field $ K$ that contains the rational numbers $ \mathbf {Q}$ such that the degree $ [K:\mathbf{Q}] = \dim_\mathbf{Q}(K)$ is finite.

If $ K$ is a number field, then by the primitive element theorem there is an $ \alpha \in K$ so that $ K = \mathbf{Q}(\alpha)$. Let $ f(x) \in \mathbf{Q}[x]$ be the minimal polynomial of $ \alpha$. For any fixed choice of $ \overline{\mathbf{Q}}$, there is some $ \alpha'\in\overline{\mathbf{Q}}$ such that $ f(\alpha')=0$. The map $ K\to \overline{\mathbf{Q}}$ that sends $ \alpha$ to $ \alpha'$ defines an embedding $ K\hookrightarrow \overline{\mathbf{Q}}$. Thus any number field can be embedded (in $ [K:\mathbf{Q}]$ possible ways) in any fixed choice $ \overline{\mathbf{Q}}$ of an algebraic closure of $ \mathbf {Q}$.

Definition 2.3.12 (Ring of Integers)   The ring of integers of a number field $ K$ is the ring

$\displaystyle \O_K = \{x \in K :$    $x$ satisfies a monic polynomial with integer coefficients $\displaystyle \}.

Note that $ \O_K$ is a ring, because if we fix an embedding of $ K$ into $ \overline{\mathbf{Q}}$, then

$\displaystyle \O_K = K \cap \overline{\mathbf{Z}}.

The field $ \mathbf {Q}$ of rational numbers is a number field of degree $ 1$, and the ring of integers of $ \mathbf {Q}$ is $ \mathbf {Z}$. The field $ K=\mathbf{Q}(i)$ of Gaussian integers has degree $ 2$ and $ \O_K = \mathbf{Z}[i]$. The field $ K=\mathbf{Q}(\sqrt{5})$ has ring of integers $ \O_K = \mathbf{Z}[(1+\sqrt{5})/2]$. Note that the Golden ratio $ (1+\sqrt{5})/2$ satisfies $ x^2 - x - 1$. The ring of integers of $ K=\mathbf{Q}(\sqrt[3]{9})$ is $ \mathbf{Z}[\sqrt[3]{3}]$, where $ \sqrt[3]{3}=\frac{1}{3}(\sqrt[3]{9})^2$.

Definition 2.3.13 (Order)   An order in $ \O_K$ is any subring $ R$ of $ \O_K$ such that the quotient $ \O_K/R$ of abelian groups is finite. (Note that $ R$ must contain $ 1$ because it is a ring, and for us every ring has a $ 1$.)

As noted above, $ \mathbf{Z}[i]$ is the ring of integers of $ \mathbf{Q}(i)$. For every nonzero integer $ n$, the subring $ \mathbf{Z}+ni\mathbf{Z}$ of $ \mathbf{Z}[i]$ is an order. The subring $ \mathbf {Z}$ of $ \mathbf{Z}[i]$ is not an order, because $ \mathbf {Z}$ does not have finite index in $ \mathbf{Z}[i]$. Also the subgroup $ 2\mathbf{Z}+ i\mathbf{Z}$ of $ \mathbf{Z}[i]$ is not an order because it is not a ring.

We define the number field $ \mathbf{Q}(i)$ and compute its ring of integers, which has discriminant $ -4$.

sage: K.<i> = NumberField(x^2 + 1)
sage: OK = K.ring_of_integers(); OK
Order with module basis 1, i in Number Field in i with 
defining polynomial x^2 + 1
sage: OK.discriminant()

Next we compute the order $ \mathbf{Z}+ 3i \mathbf{Z}$.

sage: O3 = K.order(3*i); O3
Order with module basis 1, 3*i in Number Field in i with 
defining polynomial x^2 + 1
sage: O3.gens()
[1, 3*i]

Notice that the distriminant is $ -36 = -4 \cdot 3^2$:

sage: O3.discriminant()

We test whether certain elements are in the order.

sage: 5 + 9*i in O3
sage: 1 + 2*i in O3

We will frequently consider orders because they are often much easier to write down explicitly than $ \O_K$. For example, if $ K = \mathbf{Q}(\alpha)$ and $ \alpha$ is an algebraic integer, then $ \mathbf{Z}[\alpha]$ is an order in $ \O_K$, but frequently $ \mathbf{Z}[\alpha]\neq \O_K$.

Example 2.3.14   In this example $ [\O_K : \mathbf{Z}[a]] = 2197$. First we define the number field $ K=\mathbf{Q}(a)$ where $ a$ is a root of $ x^3 - 15 x^2 - 94 x - 3674$, then we compute the order $ \mathbf{Z}[a]$ generated by $ a$.
sage: K.<a> = NumberField(x^3 - 15*x^2 - 94*x - 3674)
sage: Oa = K.order(a); Oa
Order with module basis 1, a, a^2 in Number Field in a with defining 
polynomial x^3 - 15*x^2 - 94*x - 3674

Next we compute the maximal order $ \O_K$ of $ K$ with a basis, and compute that the index of $ \mathbf{Z}[a]$ in $ \O_K$ is $ 2197=13^3$.

sage: OK = K.maximal_order()
sage: OK.basis()
[25/169*a^2 + 10/169*a + 1/169, 5/13*a^2 + 1/13*a, a^2]
sage: Oa.index_in(OK)

Lemma 2.3.15   Let $ \O_K$ be the ring of integers of a number field. Then $ \O_K\cap \mathbf{Q}=\mathbf{Z}$ and $ \mathbf{Q}\O_K = K$.

Proof. Suppose $ \alpha\in \O_K\cap\mathbf{Q}$ with $ \alpha=a/b \in \mathbf{Q}$ in lowest terms and $ b>0$. Since $ \alpha$ is integral, $ \mathbf{Z}[a/b]$ is finitely generated as a module, so $ b=1$ (see Example 2.3.8).

To prove that $ \mathbf{Q}\O_K = K$, suppose $ \alpha \in K$, and let $ f(x) \in \mathbf{Q}[x]$ be the minimal monic polynomial of $ \alpha$. For any positive integer $ d$, the minimal monic polynomial of $ d\alpha$ is $ d^{\deg(f)}f(x/d)$, i.e., the polynomial obtained from $ f(x)$ by multiplying the coefficient of $ x^{\deg(f)}$ by $ 1$, multiplying the coefficient of $ x^{\deg(f)-1}$ by $ d$, multiplying the coefficient of $ x^{\deg(f)-2}$ by $ d^2$, etc. If $ d$ is the least common multiple of the denominators of the coefficients of $ f$, then the minimal monic polynomial of $ d\alpha$ has integer coefficients, so $ d\alpha$ is integral and $ d\alpha\in \O_K$. This proves that $ \mathbf{Q}\O_K = K$. $ \qedsymbol$

William Stein 2012-09-24