In algebraic number theory, a quadratic field is an algebraic number field of degree two over <math>\mathbf{Q}</math>, the rational numbers.
Every such quadratic field is some <math>\mathbf{Q}(\sqrt{d})</math> where <math>d</math> is a (uniquely defined) square-free integer different from <math>0</math> and <math>1</math>. If <math>d>0</math>, the corresponding quadratic field is called a real quadratic field, and, if <math>d<0</math>, 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.
Ring of integers
Discriminant
For a nonzero square free integer <math>d</math>, the discriminant of the quadratic field <math>K = \mathbf{Q}(\sqrt{d})</math> is <math>d</math> if <math>d</math> is congruent to <math>1</math> modulo <math>4</math>, and otherwise <math>4d</math>. For example, if <math>d</math> is <math>-1</math>, then <math>K</math> is the field of Gaussian rationals and the discriminant is <math>-4</math>. The reason for such a distinction is that the ring of integers of <math>K</math> is generated by <math>(1+\sqrt{d})/2</math> in the first case and by <math>\sqrt{d}</math> in the second case.
The set of discriminants of quadratic fields is exactly the set of fundamental discriminants (apart from <math>1</math>, which is a fundamental discriminant but not the discriminant of a quadratic field).
Prime factorization into ideals
Any prime number <math>p</math> gives rise to an ideal <math>p\mathcal{O}_K</math> in the ring of integers <math>\mathcal{O}_K</math> of a quadratic field <math>K</math>. In line with general theory of splitting of prime ideals in Galois extensions, this may be
;<math>p</math> is inert: <math>(p)</math> is a prime ideal.
: The quotient ring is the finite field with <math>p^2</math> elements: <math>\mathcal{O}_K / p\mathcal{O}_K = \mathbf{F}_{p^2}</math>.
;<math>p</math> splits: <math>(p)</math> is a product of two distinct prime ideals of <math>\mathcal{O}_K</math>.
: The quotient ring is the product <math>\mathcal{O}_K/p\mathcal{O}_K = \mathbf{F}_p\times\mathbf{F}_p</math>.
;<math>p</math> is ramified:<math>(p)</math> is the square of a prime ideal of <math>\mathcal{O}_K</math>.
:The quotient ring contains non-zero nilpotent elements.
The third case happens if and only if <math>p</math> divides the discriminant <math>D</math>. The first and second cases occur when the Kronecker symbol <math>(D/p)</math> equals <math>-1</math> and <math>+1</math>, respectively. For example, if <math>p</math> is an odd prime not dividing <math>D</math>, then <math>p</math> splits if and only if <math>D</math> is congruent to a square modulo <math>p</math>. The first two cases are, in a certain sense, equally likely to occur as <math>p</math> runs through the primes—see Chebotarev density theorem.
The law of quadratic reciprocity implies that the splitting behaviour of a prime <math>p</math> in a quadratic field depends only on <math>p</math> modulo <math>D</math>, where <math>D</math> 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 <math>K = \mathbf{Q}(\sqrt{d})</math> has discriminant
<math display=block>\Delta_K = \begin{cases}
d & d \equiv 1 \pmod 4 \\
4d & d \equiv 2,3 \pmod 4;
\end{cases}</math>
so the Minkowski bound is<math display=block>M_K = \begin{cases}
2\sqrt{|\Delta|}/\pi & d < 0 \\
\sqrt{|\Delta|}/2 & d > 0 .
\end{cases}
</math>
Then, the ideal class group is generated by the prime ideals whose norm is less than <math>M_K</math>. This can be done by looking at the decomposition of the ideals <math>(p)</math> for <math>p \in \mathbf{Z}</math> prime where <math>|p| < M_k.</math>
