# Class number formula

In number theory, the class number formula relates many important invariants of an algebraic number field to a special value of its Dedekind zeta function.

## General statement of the class number formula

We start with the following data:
* K is a number field.
* [K : Q] = n = r$_1$ + 2r$_2$, where r$_1$ denotes the number of real embeddings of K, and 2r$_2$ is the number of complex embeddings of K.
* ζ$_K$(s) is the Dedekind zeta function of K.
* h$_K$ is the class number, the number of elements in the ideal class group of K.
* Reg$_K$ is the regulator of K.
* w$_K$ is the number of roots of unity contained in K.
* D$_K$ is the discriminant of the extension K/Q.
Then:
    Theorem (Class Number Formula). ζ$_K$(s) converges absolutely for Re(s) > 1 and extends to a meromorphic function defined for all complex s with only one simple pole at s = 1, with residue
       $\lim _{s\to 1}(s-1)\zeta _{K}(s)={\frac {2^{r_{1}}\cdot (2\pi )^{r_{2}}\cdot \operatorname {Reg} _{K}\cdot h_{K}}{w_{K}\cdot {\sqrt {|D_{K}|}}}}$
This is the most general "class number formula". In particular cases, for example when K is a cyclotomic extension of Q, there are particular and more refined class number formulas.

## Proof

The idea of the proof of the class number formula is most easily seen when K = Q(i). In this case, the ring of integers in K is the Gaussian integers.
An elementary manipulation shows that the residue of the Dedekind zeta function at s = 1 is the average of the coefficients of the Dirichlet series representation of the Dedekind zeta function. The n-th coefficient of the Dirichlet series is essentially the number of representations of n as a sum of two squares of nonnegative integers. So one can compute the residue of the Dedekind zeta function at s = 1 by computing the average number of representations. As in the article on the Gauss circle problem, one can compute this by approximating the number of lattice points inside of a quarter circle centered at the origin, concluding that the residue is one quarter of pi.
The proof when K is an arbitrary imaginary quadratic number field is very similar.
In the general case, by Dirichlet's unit theorem, the group of units in the ring of integers of K is infinite. One can nevertheless reduce the computation of the residue to a lattice point counting problem using the classical theory of real and complex embeddings and approximate the number of lattice points in a region by the volume of the region, to complete the proof.

## Dirichlet class number formula

Peter Gustav Lejeune Dirichlet published a proof of the class number formula for quadratic fields in 1839, but it was stated in the language of quadratic forms rather than classes of ideals. It appears that Gauss already knew this formula in 1801.
This exposition follows Davenport.
Let d be a fundamental discriminant, and write h(d) for the number of equivalence classes of quadratic forms with discriminant d. Let $\chi =\left(\!{\frac {d}{m}}\!\right)$ be the Kronecker symbol. Then $\chi$ is a Dirichlet character. Write $L(s,\chi )$ for the Dirichlet L-series based on $\chi$. For d > 0, let t > 0, u > 0 be the solution to the Pell equation $t^{2}-du^{2}=4$ for which u is smallest, and write
    $\varepsilon ={\frac {1}{2}}(t+u{\sqrt {d}}).$
(Then $\varepsilon$ is either a fundamental unit of the real quadratic field $\mathbb {Q} ({\sqrt {d}})$ or the square of a fundamental unit.) For d < 0, write w for the number of automorphisms of quadratic forms of discriminant d; that is,
    $w={\begin{cases}2,&d<-4;\\4,&d=-4;\\6,&d=-3.\end{cases}}$
Then Dirichlet showed that
    $h(d)={\begin{cases}{\dfrac {w{\sqrt {|d|}}}{2\pi }}L(1,\chi ),&d<0;\\{\dfrac {\sqrt {d}}{2\ln \varepsilon }}L(1,\chi ),&d>0.\end{cases}}$
This is a special case of Theorem 1 above: for a quadratic field K, the Dedekind zeta function is just $\zeta _{K}(s)=\zeta (s)L(s,\chi )$, and the residue is $L(1,\chi )$. Dirichlet also showed that the L-series can be written in a finite form, which gives a finite form for the class number. Suppose $\chi$ is primitive with prime conductor $q$. Then
    $L(1,\chi )={\begin{cases}-{\dfrac {\pi }{q^{3/2}}}\sum _{m=1}^{q-1}m\left({\dfrac {m}{q}}\right),&q\equiv 3\mod 4;\\-{\dfrac {1}{2q^{1/2}}}\sum _{m=1}^{q-1}\left({\dfrac {m}{q}}\right)\ln \left(\sin {\dfrac {m\pi }{q}}\right),&q\equiv 1\mod 4.\end{cases}}$

## Galois extensions of the rationals

If K is a Galois extension of Q, the theory of Artin L-functions applies to $\zeta _{K}(s)$. It has one factor of the Riemann zeta function, which has a pole of residue one, and the quotient is regular at s = 1. This means that the right-hand side of the class number formula can be equated to a left-hand side
    Π L(1,ρ)$^{dimρ}$
with ρ running over the classes of irreducible non-trivial complex linear representations of Gal(K/Q) of dimension dim(ρ). That is according to the standard decomposition of the regular representation.

## Abelian extensions of the rationals

This is the case of the above, with Gal(K/Q) an abelian group, in which all the ρ can be replaced by Dirichlet characters (via class field theory) for some modulus f called the conductor. Therefore all the L(1) values occur for Dirichlet L-functions, for which there is a classical formula, involving logarithms.
By the Kronecker–Weber theorem, all the values required for an analytic class number formula occur already when the cyclotomic fields are considered. In that case there is a further formulation possible, as shown by Kummer. The regulator, a calculation of volume in 'logarithmic space' as divided by the logarithms of the units of the cyclotomic field, can be set against the quantities from the L(1) recognisable as logarithms of cyclotomic units. There result formulae stating that the class number is determined by the index of the cyclotomic units in the whole group of units.
In Iwasawa theory, these ideas are further combined with Stickelberger's theorem.