# What does the class number tell us about a quadratic form?

Given a quadratic form with discriminant $D$, what does the class number of $\mathbb{Q}(\sqrt{D})$ tell us?

(This question is inspired by a comment on the question here)

-
I guess you mean a binary quadratic form, i.e. of the form $a x^2 + b x y + c y^2$, with $a,b,c$ integers and of discrmimant $D$ (i.e. $b^2 - 4 a c = D$).
If $\mathbb Q(\sqrt{D})$ has class number one, then the conditions for solving $a x^2 + b x y + c y^2 = p$ ($p$ a prime not dividing $D$) depend only on the residue class of $p$ mod $D$, in fact only on the value of the Kronecker symbol of $p$ mod $D$.
If the class group is just a product of cyclic groups of order 2 (note that this can't be detected by the class number alone, which e.g. can't distinguish between $C_2 \times C_2$ and $C_4$) then the condition for solving $a x^2 + b x y + c y^2 = p$ depends only on the residue class of $p$ mod $D$, but one has to consider not just the Kronecker symbol mod $D$, but other Kronecker symbols modulo various divisors of $D$.
If the class group is not a product of cyclic groups of order 2 (e.g. if the class number is not a power of two) then there is no congruence condition on $p$ which guarantees being able to solve $a x^2 + b x y + c y^2$.