If I understood the definition of class numbers of discriminant $D$ for binary quadratic forms (b.q.f.) correctly, the class number $h(D)$ for a given discriminant $D$ is the number of equivalence classes $(*)$ of b.q.f. with discriminant $D$.
$(*)$ Two binary quadratic forms $f_1, f_2$ are equivalent if there exists $M \in \text{SL}(2 \times 2, \mathbb{Z})$ such that $f_1(x, y) = f_2(M\cdot(x, y)^t)$.
I'm currently reading Don Zagiers "Zetafunktionen and quadratische Körper". He writes that there are two more very imported invariants of binary quadratic forms and is going to use them to further refine the classification. Namely:
- the gcd of the coefficients of the b.q.F.
- the sign of the first coefficient
In the case $D<0$ the first coefficients of two equivalent b.q.f. have the same sign. He writes: In the case $D < 0 $ we therefore only need to look at b.q.f with positive first coefficient (positive definite). He also writes, that we only need to consider b.q.f. where the gcd of the coefficients equals $1$ (a primitive b.q.f), since a b.q.f. of Discriminant $D$, where the gcd equals $r$ is $r$ times a primitive b.q.f of Discriminant $\frac{D}{r}$. He than defines the class number for discriminant $D$ as:
$$h(D) := \begin{cases} \text{number of equivalence classes of primitive b.q.f.} \\ \text{with discriminant $D$ if $D>0$} \\[10pt] \text{number of equivalence classes of primitive, positive definite b.q.f.} \\ \text{with discriminant $D$ if $D < 0$} \end{cases}$$
Somehow this isn't clear to me. Is this definition equivalent to the original definition I gave in the first paragraph. Is the statement here that we can find a representative of a specific form? Or do we truly refine the number of equivalence classes?