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 - d u^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 w = \begin{cases} 2, & d Then Dirichlet showed that :h(d)= \begin{cases} \dfrac{w \sqrt}{2 \pi} 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}{2 q^{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==