In
mathematicsMathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...
, the
ring of integers is the set of
integerThe integers are formed by the natural numbers together with the negatives of the non-zero natural numbers .They are known as Positive and Negative Integers respectively...
s making an
algebraic structureIn abstract algebra, an algebraic structure consists of one or more sets, called underlying sets or carriers or sorts, closed under one or more operations, satisfying some axioms. Abstract algebra is primarily the study of algebraic structures and their properties...
Z with the operations of integer addition, negation, and multiplication. It is a
commutative ringIn ring theory, a branch of abstract algebra, a commutative ring is a ring in which the multiplication operation is commutative. The study of commutative rings is called commutative algebra....
, and is the prototypical such by virtue of satisfying only those equations holding of all commutative rings with identity; indeed it is the
initialIn category theory, an abstract branch of mathematics, an initial object of a category C is an object I in C such that for every object X in C, there exists precisely one morphism I → X...
commutative ring, as well as being the initial ring.
More generally the
ring of integers of an
algebraic number fieldIn mathematics, an algebraic number field F is a finite field extension of the field of rational numbers Q...
K, often denoted by O
K (or

), is the
ringIn mathematics, a ring is an algebraic structure consisting of a set together with two binary operations usually called addition and multiplication, where the set is an abelian group under addition and a semigroup under multiplication such that multiplication distributes over addition...
of
algebraic integers contained in
K.
Using this notation, we can write
ZThe integers are formed by the natural numbers together with the negatives of the non-zero natural numbers .They are known as Positive and Negative Integers respectively...
= O
Q since
Z as above is the ring of integers of the
fieldIn abstract algebra, a field is a commutative ring whose nonzero elements form a group under multiplication. As such it is an algebraic structure with notions of addition, subtraction, multiplication, and division, satisfying certain axioms...
Q of
rational numberIn mathematics, a rational number is any number that can be expressed as the quotient or fraction a/b of two integers, with the denominator b not equal to zero. Since b may be equal to 1, every integer is a rational number...
s. And indeed, in
algebraic number theoryAlgebraic number theory is a major branch of number theory which studies algebraic structures related to algebraic integers. This is generally accomplished by considering a ring of algebraic integers O in an algebraic number field K/Q, and studying their algebraic properties such as factorization,...
the elements of
Z are often called the "rational integers" because of this.
An alternative term is
maximal order, since the ring of integers of a number field is indeed the unique maximal
order in the field.
The ring of integers O
K is a
Z-
moduleIn abstract algebra, the concept of a module over a ring is a generalization of the notion of vector space, wherein the corresponding scalars are allowed to lie in an arbitrary ring...
. Indeed it is a
freeIn mathematics, a free module is a free object in a category of modules. Given a set S, a free module on S is a free module with basis S.Every vector space is free, and the free vector space on a set is a special case of a free module on a set.-Definition:...
Z-module, and thus has an
integral basis, that is a basis
b1,...,
bn ∈ O
K of the
Q-vector space
K such that each element
x in O
K can be uniquely represented as

with
ai ∈
Z. The rank
n of O
K as a free
Z-module is equal to the
degreeIn mathematics, more specifically field theory, the degree of a field extension is a rough measure of the "size" of the extension. The concept plays an important role in many parts of mathematics, including algebra and number theory — indeed in any area where fields appear prominently.-...
of
K over
Q.
The rings of integers in number fields are
Dedekind domainIn abstract algebra, a Dedekind domain or Dedekind ring, named after Richard Dedekind, is an integral domain in which every nonzero proper ideal factors into a product of prime ideals. It can be shown that such a factorization is then necessarily unique up to the order of the factors...
s.
Examples
If
p is a prime, ζ is a
pth
root of unityIn mathematics, a root of unity, or de Moivre number, is any complex number that equals 1 when raised to some integer power n. Roots of unity are used in many branches of mathematics, and are especially important in number theory, the theory of group characters, field theory, and the discrete...
and
K=
Q(ζ) is the corresponding
cyclotomic fieldIn number theory, a cyclotomic field is a number field obtained by adjoining a complex primitive root of unity to Q, the field of rational numbers...
, then an integral basis of O
K=
Z[ζ] is given by (1, ζ, ζ
2, ..., ζ
p−2).
If
d is a
square-free integerIn mathematics, a square-free, or quadratfrei, integer is one divisible by no perfect square, except 1. For example, 10 is square-free but 18 is not, as it is divisible by 9 = 32...
and
K =
Q(
d 1/2) is the corresponding
quadratic fieldIn algebraic number theory, a quadratic field is an algebraic number field K of degree two over Q. It is easy to show that the map d ↦ Q is a bijection from the set of all square-free integers d ≠ 0, 1 to the set of all quadratic fields...
, then an integral basis of O
K is given by (1, (1 +
d1/2)/2) if
d ≡ 1 (
modIn mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" after they reach a certain value—the modulus....
4) and by (1,
d 1/2) if
d ≡ 2 or 3 (mod 4).
The ring of
p-adic integers
Zp is the ring of integers of a
p-adic numbers
Qp.