# Ring of integers

In mathematics, the ring of integers of an algebraic number field K is the ring of all integral elements contained in K. An integral element is a root of a monic polynomial with rational integer coefficients, xn + cn−1xn−1 + … + c0. This ring is often denoted by OK or $\mathcal O_K$. Since any integer number belongs to K and is its integral element, the ring Z is always a subring of OK.

The ring Z is the simplest possible ring of integers.[1] Namely, Z = OQ where Q is the field of rational numbers. And indeed, in algebraic number theory the elements of Z are often called the "rational integers" because of this.

The ring of integers of a number field is the unique maximal order in the field.

## Properties

The ring of integers OK is a Z-module. Indeed it is a free Z-module, and thus has an integral basis, that is a basis b1, … ,bn ∈ OK of the Q-vector space K such that each element x in OK can be uniquely represented as

$x=\sum_{i=1}^na_ib_i,$

with aiZ. The rank n of OK as a free Z-module is equal to the degree of K over Q.

The rings of integers in number ﬁelds are Dedekind domains.

## Examples

If p is a prime, ζ is a pth root of unity and K = Q(ζ) is the corresponding cyclotomic field, then an integral basis of OK = Z[ζ] is given by (1, ζ, ζ2, … , ζp−2).

If d is a square-free integer and K = Q(d) is the corresponding quadratic field, then OK is a ring of quadratic integers and its integral basis is given by (1, (1 + d)/2) if d ≡ 1 (mod 4) and by (1, d) if d ≡ 2, 3 (mod 4).

## Generalization

One defines the ring of integers of a non-archimedean local field F as the set of all elements of F with absolute value ≤1; this is a ring because of the strong triangle inequality. If F is the completion of an algebraic number field, its ring of integers is the completion of the latter's ring of integers.

For example, the p-adic integers Zp are the ring of integers of the p-adic numbers Qp.

## Notes

1. ^ The ring of integers, without specifying the field, refers to the ring Z of "ordinary" integers, the prototypical object for all those rings. It is a consequence of the ambiguity of the word "integer" in abstract algebra.