In number theory, quadratic integers are a generalization of the rational integers to quadratic fields. These are algebraic integers of the degree 2. Important examples include the Gaussian integers and the Eisenstein integers. Though they have been studied for more than a hundred years, many open problems remain.

## Definition

Quadratic integers are solutions of equations of the form:

x2 + Bx + C = 0

for integers B and C. Such solutions have the form , where Template:Mvar, Template:Mvar are integers, and where ω is defined by:

$\omega ={\begin{cases}{\sqrt {D}}&{\mbox{if }}D\equiv 2,3{\pmod {4}}\\{{1+{\sqrt {D}}} \over 2}&{\mbox{if }}D\equiv 1{\pmod {4}}\end{cases}}$ (Template:Mvar is a square-free integer. Note that the case $D\equiv 0{\pmod {4}}$ is impossible, since it would imply that D is divisible by 4, a perfect square, which contradicts the fact that D is square-free.).

This characterization was first given by Richard Dedekind in 1871.

The set of all quadratic integers is not closed even under addition. But for any fixed Template:Mvar the set of corresponding quadratic integers forms a ring, and it is these quadratic integer rings which are usually studied. Medieval Indian mathematicians had already discovered a multiplication of quadratic integers of the same Template:Mvar, which allows one to solve some cases of Pell's equation. The study of quadratic integers admits an algebraic version: the study of quadratic forms with integer coefficients.

Fixing a square-free integer Template:Mvar, the quadratic integer ring Z[ω] = { Template:Mvar + ω Template:Mvar : Template:Mvar, Template:MvarZ}  is a subring of the quadratic field $\mathbf {Q} ({\sqrt {D}})$ . Moreover, Z[ω] is the integral closure of Z in $\mathbf {Q} ({\sqrt {D}})$ . In other words, it is the ring of integers ${\mathcal {O}}_{\mathbf {Q} ({\sqrt {D}})}$ of Q(Template:Sqrt) and thus a Dedekind domain. The quadratic integer rings usually form the first class of examples on which one can build theories, inaccessible in the general case, for example the Kronecker–Weber theorem in class field theory, see below.

### Examples of complex quadratic integer rings

For Template:Mvar < 0, ω is a complex (imaginary or otherwise non-real) number. Therefore, it is natural to treat a quadratic integer ring as a set of algebraic complex numbers.

Both rings mentioned above are rings of integers of cyclotomic fields Q4) and Q3) correspondingly. In contrast, Z[[[:Template:Sqrt]]] is not even a Dedekind domain.

### Examples of real quadratic integer rings

For Template:Mvar > 0, ω is a positive irrational and the corresponding quadratic integer ring is a set of algebraic real numbers. Pell's equation , a case of Diophantine equations, naturally leads to these rings for Template:Mvar ≡ 2, 3 (mod 4) . Algebraic study of real quadratic integer rings involves determining of the invertible elements group.

### Class number

Equipped with the norm

$N(a+b{\sqrt {D}})=a^{2}-Db^{2}$ ,

${\mathcal {O}}_{\mathbf {Q} ({\sqrt {D}})}$ is an Euclidean domain (and thus a unique factorization domain, UFD) when Template:Mvar = −1, −2, −3, −7, −11. On the other hand, it turned out that Z[[[:Template:Sqrt]]] is not a UFD because, for example, 6 has two distinct factorizations into irreducibles:

$6=2(3)=(1+{\sqrt {-5}})(1-{\sqrt {-5}}).$ (In fact, Z[[[:Template:Sqrt]]] has class number 2.) The failure of the unique factorization led Ernst Kummer and Dedekind to develop a theory that would enlarge the set of “prime numbers”; the result was the introduction of the notion of ideal, and the definition of what is now called a Dedekind domain: All the ring of integers of number fields are Dedekind domains, and the ideals of a Dedekind domain have the property of unique factorization into products of prime ideals.

Being a Dedekind domain, a quadratic integer ring is a UFD if and only if it is a principal ideal domain (i.e., its class number is one). However, there are quadratic integer rings that are principal ideal domains but not Euclidean domains. For example, Q[[[:Template:Sqrt]]] has class number 1 but its ring of integers is not Euclidean. There are effective methods to compute ideal class groups of quadratic integer rings, but many theoretical questions about their structure are still open after a hundred years.Template:As of?