TITLE: Binary quadratic forms over Z and class numbers of quadratic ﬁelds.
QUESTION [11 upvotes]: What is the relation between the classiﬁcation of binary quadratic forms over $\mathbb Z$,  and the problem of ﬁnding the class numbers of quadratic ﬁelds?
What would be a nice reference for this?

REPLY [11 votes]: For a very beautiful, modern, and general treatment, see this paper of Melanie Matchett Wood.  The classical comparison is explained at the beginning of the paper, and then it goes on to develop very general results.  I think it is a very beautiful treatment of the subject; even the classical statements are made much clearer than is usual (in my experience) in more traditional treatments.

REPLY [5 votes]: Along with Cox, I like Duncan Buell, Binary Quadratic Forms because it does pretty much everything with integral forms, including indefinite forms and those with odd $b$ in $f(x,y) = a x^2 + b x y + c y^2.$ It gives explicit calculations for composition, particularly computer algorithms. see HERE