# Are reducible Integral Binary Quadratic Forms equivalent?

By an integral binary quadratic form (IBQF for short) I mean an $$f(x,y) = ax^2 + bxy + cy^2$$ with $a,b,c \in \mathbb{Z}$. Note that I am not assuming that they are all coprime.

Such an $f$ is said to be reducible if it factors as the product of two linear forms; equivalently, if its discriminant, defined as $\Delta(f) := b^2 - 4ac$, is a square in $\mathbb{Z}$.

I would like to say that, if two IBQFs $f$ and $g$ are reducible and have the same discriminant, then they must be equivalent, by which I mean that there exists a matrix $\gamma \in SL_2(\mathbb{Z})$ such that $$\gamma f = g.$$

Is this true?

That was fun. It turns out that, for discriminant $0$ and primitive, the two $SL_2 \mathbb Z$ classes are $f(x,y) = x^2$ and $g(x,y) = -x^2.$ For discriminant $1,$ the only class is $f(x,y) = xy.$

For discriminant $D = B^2$ with integer $B > 1,$ the count of classes is given by the Euler totient $\varphi(B),$ because all the distinct classes are given by taking $B > 0,$ also $\gcd(A,B) = 1$ and $1 \leq A < B,$ for each $A$ the class is given by $$f(x,y) = Ax^2 + B xy.$$ Notice that there is no $y^2$ term. Also note that, with $B \geq 2,$ taking $A=0$ would give an imprimitive form, namely $Bxy,$ so we exclude that. Oh, it turns out that there is no need to have $B = - \sqrt D,$ requires proof but it is all elementary manipulations of how elements of $SL_2 \mathbb Z$ act on forms.

GO FIGURE

• Thanks again for another great answer! I looked at Gauss's Disquisitiones, it looks like this result might be contained in Section 211 or thereabouts, but my latin isn't so great, so I can't be sure...but he does work out the discriminant 25 case. – Giuseppe May 13 '15 at 12:14

$$f(x,y) = x^2 - y^2$$ $$g(x,y) = 2 x y$$

A different pair: $$f(x,y) = x^2 - 9y^2$$ $$g(x,y) = -x^2 + 9 y^2$$

Here is a good one; $$f(x,y) = x^2 - 36y^2$$ $$g(x,y) = 9x^2 - 4 y^2.$$ While $9-4 = 5,$ we can easily check $x^2 - 36 y^2 \neq 5,$ either because $5$ is not a quadratic residue $\pmod 3,$ or by solving $(x+6y)(x-6y) = 5$ where each factor needs to be $\pm 1, \pm 5,$ and we find, in four possible ways, $x= \pm 3, y= \pm \frac{1}{3}.$

• Thank you very much for your concise reality check! But I'm confused...I thought that the number of SL(2,Z)-equivalence classes of IBQFs of discriminant D was equal to the class number of $Q(\sqrt{D})$. If D is a square (i.e., if f is reducible), then the class number of $Q(\sqrt{D})$ is 1, and hence all such reducible IBQFs of the same discriminant must be equivalent. But that evidently isn't the case :( So, might I ask, what is the number h(D) of SL(2,Z)-equiv classes of IBQFs of discriminant D when D is square? Is there a simple formula for it? – Giuseppe May 11 '15 at 18:54
• And, as a historical question, do you know if this reducible theory of IBQFs was known to Gauss? – Giuseppe May 11 '15 at 18:54
• @Giuseppe, when $D$ is not a square then there really is a rigid relationship between form class numbers, as here, and ideal class numbers; I was asked to write about that for MSE, see math.blogoverflow.com/2014/08/23/… As far as I know, Gauss wrote a very short summary about forms with square discriminant in the Disquisitiones and then went on to other things. Recommend Duncan A. Buell, Binary Quadratic Forms, to understand forms as homogeneous polynomials in two variables... – Will Jagy May 11 '15 at 19:01
• @Giuseppe, meanwhile, I recommend writing a program in some easy language and finding provisional lists for square discriminants up to some modest bound, then see if you can cut them into proper equivalence classes. Good practice for a Master's. One thing you may insist upon: your forms always integrally (and primitively) represent $0,$ so you are allowed to demand $$f(x,y) = a x^2 + b x y$$ with no $y^2$ term remaining. Then we know $b = \pm \sqrt D$ and we just need some bounds on $a.$ I would separate the primitive case $\gcd(a,b) = 1$ from non-primitive, it is traditional. – Will Jagy May 11 '15 at 19:08