In number theory, quadratic integers are a generalization of the integers to quadratic fields. Quadratic integers are algebraic integers of degree two, that is, solutions of equations of the form

x2 + Bx + C = 0

with B and C integers. When algebraic integers are considered, the usual integers are often called rational integers.

Common examples of quadratic integers are the square roots of integers, such as 2, and the complex number i = –1, which generates the Gaussian integers. Another common example is the non-real cubic root of unity −1 + –3/2, which generates the Eisenstein integers.

Quadratic integers occur in the solutions of many Diophantine equations, such as Pell's equations, and other questions related to integral quadratic forms. The study of rings of quadratic integers is basic for many questions of algebraic number theory.

## History

Medieval Indian mathematicians had already discovered a multiplication of quadratic integers of the same D, which allowed them to solve some cases of Pell's equation.

The characterization of the quadratic integers was first given by Richard Dedekind in 1871.[1][2]

## Definition

A quadratic integer is an algebraic integer of degree two. More explicitly, it is a complex number ${\displaystyle x={\frac {-B\pm {\sqrt {B^{2}-4C}}}{2}}}$, which solves an equation of the form x2 + Bx + C = 0, with B and C integers. Each quadratic integer that is not an integer is not rational—namely, it's a real irrational number if B2 – 4C > 0 and non-real if B2 – 4C < 0—and lies in a uniquely determined quadratic field ${\displaystyle \mathbb {Q} ({\sqrt {D}})}$, the extension of ${\displaystyle \mathbb {Q} }$ generated by the square-root of the unique square-free integer D that satisfies B2 – 4C = DE2 for some integer E. D may be positive or negative.

The quadratic integers (including the ordinary integers), which belong to a quadratic field ${\displaystyle \mathbb {Q} ({\sqrt {D}})}$, form an integral domain called the ring of integers of ${\displaystyle \mathbb {Q} ({\sqrt {D}}).}$

Here and in the following, D is supposed to be a square-free integer. This does not restrict the generality, as the equality a2D = aD (for any positive integer a) implies ${\displaystyle \mathbb {Q} ({\sqrt {D}})=\mathbb {Q} ({\sqrt {a^{2}D}}).}$

Every quadratic integer may be written a + ωb, where a and b are integers, and where ω is defined by:

${\displaystyle \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}}}$

(as D has been supposed square-free the case ${\displaystyle D\equiv 0{\pmod {4}}}$ is impossible, since it would imply that D would be divisible by the square 4).[3]

Although the quadratic integers belonging to a given quadratic field form a ring, the set of all quadratic integers is not a ring, because it is not closed under addition, as ${\displaystyle {\sqrt {2}}+{\sqrt {3}}}$ is an algebraic integer, which has a minimal polynomial of degree four.

## Norm and conjugation

A quadratic integer in ${\displaystyle \mathbb {Q} ({\sqrt {D}})}$ may be written

a + bD,

where a and b are either both integers, or, only if D ≡ 1 (mod 4), both halves of odd integers. The norm of such a quadratic integer is

N(a + bD) = a2Db2.

The norm of a quadratic integer is always an integer. If D < 0, the norm of a quadratic integer is the square of its absolute value as a complex number (this is false if D > 0). The norm is a completely multiplicative function, which means that the norm of a product of quadratic integers is always the product of their norms.

Every quadratic integer a + bD has a conjugate

${\displaystyle {\overline {a+b{\sqrt {D}}}}=a-b{\sqrt {D}}.}$

A quadratic integer has the same norm as its conjugate, and this norm is the product of the quadratic integer and its conjugate. The conjugate of a sum or a product of quadratic integers is the sum or the product (respectively) of the conjugates. This means that the conjugation is an automorphism of the ring of the integers of ${\displaystyle \mathbb {Q} ({\sqrt {D}})}$—see § Quadratic integer rings, below.

Every square-free integer (different from 0 and 1) D defines a quadratic integer ring, which is the integral domain consisting of the algebraic integers contained in ${\displaystyle \mathbf {Q} ({\sqrt {D}}).}$ It is the set Z[ω] = {a + ωb : a, bZ}, where ${\displaystyle \omega ={\tfrac {1+{\sqrt {D}}}{2}}}$ if D = 4k +1, and ω = D otherwise. It is often denoted ${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {D}})}}$, because it is the ring of integers of Q(D), which is the integral closure of Z in ${\displaystyle \mathbf {Q} ({\sqrt {D}}).}$ The ring Z[ω] consists of all roots of all equations x2 + Bx + C = 0 whose discriminant B2 − 4C is the product of D by the square of an integer. In particular D belongs to Z[ω], being a root of the equation x2D = 0, which has 4D as its discriminant.

The square root of any integer is a quadratic integer, as every integer can be written n = m2D, where D is a square-free integer, and its square root is a root of x2m2D = 0.

The fundamental theorem of arithmetic is not true in many rings of quadratic integers. However, there is a unique factorization for ideals, which is expressed by the fact that every ring of algebraic integers is a Dedekind domain. Being the simplest examples of algebraic integers, quadratic integer are commonly the starting examples of most studies of algebraic number theory.[4]

The quadratic integer rings divide in two classes depending on the sign of D. If D > 0, all elements of ${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {D}})}}$ are real, and the ring is a real quadratic integer ring. If D < 0, the only real elements of ${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {D}})}}$ are the ordinary integers, and the ring is a complex quadratic integer ring.

For real quadratic integer rings, the ideal class number, which measures the failure of unique factorization, is given in OEIS A003649; for the imaginary case, they are given in OEIS A000924.

### Units

A quadratic integer is a unit in the ring of the integers of ${\displaystyle \mathbb {Q} ({\sqrt {D}})}$ if and only if its norm is 1 or –1. In the first case its multiplicative inverse is its conjugate. It is the negation of its conjugate in the second case.

If D < 0, the ring of the integers of ${\displaystyle \mathbb {Q} ({\sqrt {D}})}$ has at most six units. In the case of the Gaussian integers (D = –1), the four units are 1, –1, –1, ––1. In the case of the Eisenstein integers (D = –3), the six units are ±1, ±1 ± –3/2. For all other negative D, there are only two units, which are 1 and –1.

If D > 0, the ring of the integers of ${\displaystyle \mathbb {Q} ({\sqrt {D}})}$ has infinitely many units that are equal to ±ui, where i is an arbitrary integer, and u is a particular unit called a fundamental unit. Given a fundamental unit u, there are three other fundamental units, its conjugate ${\displaystyle {\overline {u}},}$ and also ${\displaystyle -u}$ and ${\displaystyle -{\overline {u}}.}$ Commonly, one calls the fundamental unit, the unique one which has an absolute value greater than 1 (as a real number). It is the unique fundamental unit that may be written as a + bD, with a and b positive (integers or halves of integers).

The fundamental units for the 10 smallest positive square-free D are 1 + 2, 2 + 3, 1 + 5/2 (the golden ratio), 5 + 26, 8 + 37, 3 + 10, 10 + 311, 3 + 13/2, 15 + 414, 4 + 15. For larger D, the coefficients of the fundamental unit may be very large. For example, for D = 19, 31, 43, the fundamental units are respectively 170 + 39 19, 1520 + 273 31 and 3482 + 531 43.

### Examples of complex quadratic integer rings

For D < 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.

• A classic example is ${\displaystyle \mathbf {Z} [{\sqrt {-1}}]}$, the Gaussian integers, which was introduced by Carl Gauss around 1800 to state his biquadratic reciprocity law.[5]
• The elements in ${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {-3}})}=\mathbf {Z} \left[{{1+{\sqrt {-3}}} \over 2}\right]}$ are called Eisenstein integers.

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

Both above examples are principal ideal rings and also Euclidean domains for the norm. This is not the case for

${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {-5}})}=\mathbf {Z} \left[{\sqrt {-5}}\right],}$

which is not even a unique factorization domain. This can be shown as follows.

In ${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {-5}})},}$ we have

${\displaystyle 9=3\cdot 3=(2+{\sqrt {-5}})(2-{\sqrt {-5}}).}$

The factors 3, ${\displaystyle 2+{\sqrt {-5}}}$ and ${\displaystyle 2-{\sqrt {-5}}}$ are irreducible, as they have all a norm of 9, and if they were not irreducible, they would have a factor of norm 3, which is impossible, the norm of an element different of ±1 being at least 4. Thus the factorization of 9 into irreducible factors is not unique.

The ideals ${\displaystyle \langle 3,1+{\sqrt {-5}}\rangle }$ and ${\displaystyle \langle 3,1-{\sqrt {-5}}\rangle }$ are not principal, as a simple computation shows that their product is the ideal generated by 3, and, if they were principal, this would imply that 3 would not be irreducible.

### Examples of real quadratic integer rings

For D > 0, ω is a positive irrational real number, and the corresponding quadratic integer ring is a set of algebraic real numbers. The solutions of the Pell's equation X2DY2 = 1, a Diophantine equation that has been widely studied, are the units of these rings, for D ≡ 2, 3 (mod 4).

### Principal rings of quadratic integers

Unique factorization property is not always verified for rings of quadratic integers, as seen above for the case of Z[−5]. However, as for every Dedekind domain, a ring of quadratic integers is a unique factorization domain if and only if it is a principal ideal domain. This occurs if and only if the class number of the corresponding quadratic field is one.

The imaginary rings of quadratic integers that are principal ideal rings have been completely determined. These are ${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {D}})}}$ for

D = −1, −2, −3, −7, −11, −19, −43, −67, −163.

This result was first conjectured by Gauss and proven by Kurt Heegner, although Heegner's proof was not believed until Harold Stark gave a later proof in 1967. (See Stark–Heegner theorem.) This is a special case of the famous class number problem.

There are many known positive integers D > 0, for which the ring of quadratic integers is a principal ideal ring. However, the complete list is not known; it is not even known if the number of these principal ideal rings is finite or not.

### Euclidean rings of quadratic integers

When a ring of quadratic integers is a principal ideal domain, it is interesting to know whether it is a Euclidean domain. This problem has been completely solved as follows.

Equipped with the norm ${\displaystyle N(a+b{\sqrt {D}})=a^{2}-Db^{2}}$ as a Euclidean function, ${\displaystyle {\mathcal {O}}_{\mathbf {Q} ({\sqrt {D}})}}$ is a Euclidean domain for negative D when

D = −1, −2, −3, −7, −11,[7]

and, for positive D, when

D = 2, 3, 5, 6, 7, 11, 13, 17, 19, 21, 29, 33, 37, 41, 57, 73 (sequence A048981 in the OEIS).

There is no other ring of quadratic integers that is Euclidean with the norm as a Euclidean function.[8]

For negative D, a ring of quadratic integers is Euclidean if and only if the norm is a Euclidean function for it. It follows that, for

D = −19, −43, −67, −163,

the four corresponding rings of quadratic integers are among the rare known examples of principal ideal domains that are not Euclidean domains.

On the other hand, the generalized Riemann hypothesis implies that a ring of real quadratic integers that is a principal ideal domain is also a Euclidean domain for some Euclidean function, which can indeed differ from the usual norm.[9] The values D = 14, 69 were the first for which the ring of quadratic integers was proven to be Euclidean, but not norm-Euclidean.[10][11]

## Notes

1. Dedekind 1871, Supplement X, p. 447
2. Bourbaki 1994, p. 99
3. "Why is quadratic integer ring defined in that way?". math.stackexchange.com. Retrieved 2016-12-31.
4. M. Artin, Algebra (2nd ed) Ch 13
5. Dummit, pg. 229
6. de Bruijn, N. G. (1981), "Algebraic theory of Penrose's non-periodic tilings of the plane, I, II" (PDF), Indagationes Mathematicae, 43 (1): 39–66
7. Dummit, pg. 272
8. LeVeque, William J. (2002) [1956]. Topics in Number Theory, Volumes I and II. New York: Dover Publications. pp. II:57, 81. ISBN 978-0-486-42539-9. Zbl 1009.11001.
9. P. Weinberger, On Euclidean rings of algebraic integers. In: Analytic Number Theory (St. Louis, 1972), Proc. Sympos. Pure Math. 24(1973), 321–332.
10. M. Harper, ${\displaystyle \mathbb {Z} [{\sqrt {14}}]}$ is Euclidean. Can. J. Math. 56(2004), 55–70.
11. David A. Clark, A quadratic field which is Euclidean but not norm-Euclidean, Manuscripta Mathematica, 83(1994), 327–330