In algebraic number theory, the **Hilbert class field** *E* of a number field *K* is the maximal abelian unramified extension of *K*. Its degree over *K* equals the class number of *K* and the Galois group of *E* over *K* is canonically isomorphic to the ideal class group of *K* using Frobenius elements for prime ideals in *K*.

In this context, the Hilbert class field of *K* is not just unramified at the finite places (the classical ideal theoretic interpretation) but also at the infinite places of *K*. That is, every real embedding of *K* extends to a real embedding of *E* (rather than to a complex embedding of *E*).

- If the ring of integers of
*K*is a unique factorization domain, in particular if , then*K*is its own Hilbert class field. - Let of discriminant . The field has discriminant and so is an everywhere unramified extension of
*K*, and it is abelian. Using the Minkowski bound, one can show that*K*has class number 2. Hence, its Hilbert class field is . A non-principal ideal of*K*is (2,(1+√−15)/2), and in*L*this becomes the principal ideal ((1+√5)/2). - The field has class number 3. Its Hilbert class field can be formed by adjoining a root of x
^{3}- x - 1, which has discriminant -23. - To see why ramification at the archimedean primes must be taken into account, consider the real quadratic field
*K*obtained by adjoining the square root of 3 to**Q**. This field has class number 1 and discriminant 12, but the extension*K*(*i*)/*K*of discriminant 9=3^{2}is unramified at all prime ideals in*K*, so*K*admits finite abelian extensions of degree greater than 1 in which all finite primes of*K*are unramified. This doesn't contradict the Hilbert class field of*K*being*K*itself: every proper finite abelian extension of*K*must ramify at some place, and in the extension*K*(*i*)/*K*there is ramification at the archimedean places: the real embeddings of*K*extend to complex (rather than real) embeddings of*K*(*i*). - By the theory of complex multiplication, the Hilbert class field of an imaginary quadratic field is generated by the value of the elliptic modular function at a generator for the ring of integers (as a
**Z**-module).

The existence of a (narrow) Hilbert class field for a given number field *K* was conjectured by David Hilbert (1902) and proved by Philipp Furtwängler.^{[1]} The existence of the Hilbert class field is a valuable tool in studying the structure of the ideal class group of a given field.

The Hilbert class field *E* also satisfies the following:

*E*is a finite Galois extension of*K*and [*E*:*K*] =*h*_{K}, where*h*_{K}is the class number of*K*.- The ideal class group of
*K*is isomorphic to the Galois group of*E*over*K*. - Every ideal of
*O*_{K}extends to a principal ideal of the ring extension*O*_{E}(principal ideal theorem). - Every prime ideal
*P*of*O*_{K}decomposes into the product of*h*_{K}/*f*prime ideals in*O*_{E}, where*f*is the order of [*P*] in the ideal class group of*O*_{K}.

In fact, *E* is the unique field satisfying the first, second, and fourth properties.

If *K* is imaginary quadratic and *A* is an elliptic curve with complex multiplication by the ring of integers of *K*, then adjoining the j-invariant of *A* to *K* gives the Hilbert class field.^{[2]}

In class field theory, one studies the ray class field with respect to a given modulus, which is a formal product of prime ideals (including, possibly, archimedean ones). The ray class field is the maximal abelian extension unramified outside the primes dividing the modulus and satisfying a particular ramification condition at the primes dividing the modulus. The Hilbert class field is then the ray class field with respect to the trivial modulus *1*.

The *narrow class field* is the ray class field with respect to the modulus consisting of all infinite primes. For example, the argument above shows that is the narrow class field of .