# Quadratic field

In algebraic number theory, a quadratic field is an algebraic number field of degree two over $\mathbf {Q}$, the rational numbers.
Every such quadratic field is some $\mathbf {Q} ({\sqrt {d}})$ where $d$ is a (uniquely defined) square-free integer different from $0$ and $1$. If $d>0$, the corresponding quadratic field is called a real quadratic field, and, if $d<0$, it is called an imaginary quadratic field or a complex quadratic field, corresponding to whether or not it is a subfield of the field of the real numbers.
Quadratic fields have been studied in great depth, initially as part of the theory of binary quadratic forms. There remain some unsolved problems. The class number problem is particularly important.

## Discriminant

For a nonzero square free integer $d$, the discriminant of the quadratic field $K=\mathbf {Q} ({\sqrt {d}})$ is $d$ if $d$ is congruent to $1$ modulo $4$, and otherwise $4d$. For example, if $d$ is $-1$, then $K$ is the field of Gaussian rationals and the discriminant is $-4$. The reason for such a distinction is that the ring of integers of $K$ is generated by $(1+{\sqrt {d}})/2$ in the first case and by ${\sqrt {d}}$ in the second case.
The set of discriminants of quadratic fields is exactly the set of fundamental discriminants (apart from $1$, which is a fundamental discriminant but not the discriminant of a quadratic field).

## Prime factorization into ideals

Any prime number $p$ gives rise to an ideal $p{\mathcal {O}}_{K}$ in the ring of integers ${\mathcal {O}}_{K}$ of a quadratic field $K$. In line with general theory of splitting of prime ideals in Galois extensions, this may be

### $p$ is inert

    $(p)$ is a prime ideal.
    The quotient ring is the finite field with $p^{2}$ elements: ${\mathcal {O}}_{K}/p{\mathcal {O}}_{K}=\mathbf {F} _{p^{2}}$.

### $p$ splits

    $(p)$ is a product of two distinct prime ideals of ${\mathcal {O}}_{K}$.
    The quotient ring is the product ${\mathcal {O}}_{K}/p{\mathcal {O}}_{K}=\mathbf {F} _{p}\times \mathbf {F} _{p}$.

### $p$ is ramified

    $(p)$ is the square of a prime ideal of ${\mathcal {O}}_{K}$.
    The quotient ring contains non-zero nilpotent elements.
The third case happens if and only if $p$ divides the discriminant $D$. The first and second cases occur when the Kronecker symbol $(D/p)$ equals $-1$ and $+1$, respectively. For example, if $p$ is an odd prime not dividing $D$, then $p$ splits if and only if $D$ is congruent to a square modulo $p$. The first two cases are, in a certain sense, equally likely to occur as $p$ runs through the primes—see Chebotarev density theorem.
The law of quadratic reciprocity implies that the splitting behaviour of a prime $p$ in a quadratic field depends only on $p$ modulo $D$, where $D$ is the field discriminant.

## Class group

Determining the class group of a quadratic field extension can be accomplished using Minkowski's bound and the Kronecker symbol because of the finiteness of the class group. A quadratic field $K=\mathbf {Q} ({\sqrt {d}})$ has discriminant $\Delta _{K}={\begin{cases}d&d\equiv 1{\pmod {4}}\\4d&d\equiv 2,3{\pmod {4}};\end{cases}}$ so the Minkowski bound is$M_{K}={\begin{cases}2{\sqrt {|\Delta |}}/\pi &d<0\\{\sqrt {|\Delta |}}/2&d>0.\end{cases}}$
Then, the ideal class group is generated by the prime ideals whose norm is less than $M_{K}$. This can be done by looking at the decomposition of the ideals $(p)$ for $p\in \mathbf {Z}$ prime where $|p|<M_{k}.$ $^{page72}$ These decompositions can be found using the Dedekind–Kummer theorem.

## Quadratic subfields of cyclotomic fields
### The quadratic subfield of the prime cyclotomic field

A classical example of the construction of a quadratic field is to take the unique quadratic field inside the cyclotomic field generated by a primitive $p$th root of unity, with $p$ an odd prime number. The uniqueness is a consequence of Galois theory, there being a unique subgroup of index $2$ in the Galois group over $\mathbf {Q}$. As explained at Gaussian period, the discriminant of the quadratic field is $p$ for $p=4n+1$ and $-p$ for $p=4n+3$. This can also be predicted from enough ramification theory. In fact, $p$ is the only prime that ramifies in the cyclotomic field, so $p$ is the only prime that can divide the quadratic field discriminant. That rules out the 'other' discriminants $-4p$ and $4p$ in the respective cases.

### Other cyclotomic fields

If one takes the other cyclotomic fields, they have Galois groups with extra $2$-torsion, so contain at least three quadratic fields. In general a quadratic field of field discriminant $D$ can be obtained as a subfield of a cyclotomic field of $D$-th roots of unity. This expresses the fact that the conductor of a quadratic field is the absolute value of its discriminant, a special case of the conductor-discriminant formula.

## Orders of quadratic number fields of small discriminant

The following table shows some orders of small discriminant of quadratic fields. The maximal order of an algebraic number field is its ring of integers, and the discriminant of the maximal order is the discriminant of the field. The discriminant of a non-maximal order is the product of the discriminant of the corresponding maximal order by the square of the determinant of the matrix that expresses a basis of the non-maximal order over a basis of the maximal order. All these discriminants may be defined by the formula of Discriminant of an algebraic number field § Definition.
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.
| Order | Discriminant | Class number | Units | Comments |
| $\mathbf {Z} \left[{\sqrt {-5}}\right]$ | $-20$ | $2$ | $\pm 1$ | Ideal classes $(1)$, $(2,1+{\sqrt {-5}})$ |
| $\mathbf {Z} \left[(1+{\sqrt {-19}})/2\right]$ | $-19$ | $1$ | $\pm 1$ | Principal ideal domain, not Euclidean |
| $\mathbf {Z} \left[2{\sqrt {-1}}\right]$ | $-16$ | $1$ | $\pm 1$ | Non-maximal order |
| $\mathbf {Z} \left[(1+{\sqrt {-15}})/2\right]$ | $-15$ | $2$ | $\pm 1$ | Ideal classes $(1)$, $(1,(1+{\sqrt {-15}})/2)$ |
| $\mathbf {Z} \left[{\sqrt {-3}}\right]$ | $-12$ | $1$ | $\pm 1$ | Non-maximal order |
| $\mathbf {Z} \left[(1+{\sqrt {-11}})/2\right]$ | $-11$ | $1$ | $\pm 1$ | Euclidean |
| $\mathbf {Z} \left[{\sqrt {-2}}\right]$ | $-8$ | $1$ | $\pm 1$ | Euclidean |
| $\mathbf {Z} \left[(1+{\sqrt {-7}})/2\right]$ | $-7$ | $1$ | $\pm 1$ | Kleinian integers |
| $\mathbf {Z} \left[{\sqrt {-1}}\right]$ | $-4$ | $1$ | $\pm 1,\pm i$ (cyclic of order $4$) | Gaussian integers |
| $\mathbf {Z} \left[(1+{\sqrt {-3}})/2\right]$ | $-3$ | $1$ | $\pm 1,(\pm 1\pm {\sqrt {-3}})/2$. | Eisenstein integers |
| $\mathbf {Z} \left[{\sqrt {-21}}\right]$ | $-84$ | $4$ | | Class group non-cyclic: $(\mathbf {Z} /2\mathbf {Z} )^{2}$ |
| $\mathbf {Z} \left[(1+{\sqrt {5}})/2\right]$ | $5$ | $1$ | $\pm ((1+{\sqrt {5}})/2)^{n}$ (norm $(-1)^{n}$) | |
| $\mathbf {Z} \left[{\sqrt {2}}\right]$ | $8$ | $1$ | $\pm (1+{\sqrt {2}})^{n}$ (norm $(-1)^{n}$) | |
| $\mathbf {Z} \left[{\sqrt {3}}\right]$ | $12$ | $1$ | $\pm (2+{\sqrt {3}})^{n}$ (norm $1$) | |
| $\mathbf {Z} \left[(1+{\sqrt {13}})/2\right]$ | $13$ | $1$ | $\pm ((3+{\sqrt {13}})/2)^{n}$ (norm $(-1)^{n}$) | |
| $\mathbf {Z} \left[(1+{\sqrt {17}})/2\right]$ | $17$ | $1$ | $\pm (4+{\sqrt {17}})^{n}$ (norm $(-1)^{n}$) | |
| $\mathbf {Z} \left[{\sqrt {5}}\right]$ | $20$ | $1$ | $\pm ({\sqrt {5}}+2)^{n}$ (norm $(-1)^{n}$) | Non-maximal order |
Some of these examples are listed in Artin, Algebra (2nd ed.), §13.8.