An integer quadratic form is a function $Q(x,y) = ax^2 + bxy + cy^2$ where the numbers $a,b,c \in \mathbb Z$.

Call the set of values a quadratic forms takes on $V(Q) = \{ Q(x,y) \in \mathbb Z | x,y \in \mathbb Z \}$.

Two quadratic forms $Q,R$ are said to be equivalent if there is a $SL_2(\mathbb Z)$ matrix $M$ such that $R(x,y) = Q((x,y)M)$.

This is the definition used in for example, 1.1 page 4 of http://www.rzuser.uni-heidelberg.de/~hb3/publ/bf.pdf . Under that definition two quadratic forms maybe be "opposite" but not equal, and take on the same set of values.

I'm interested in the equivalence we get with $GL_2(\mathbb Z)$ matrices, We'll say $R \sim Q$ if there is a $GL_2(\mathbb Z)$ matrix $M$ such that $R(x,y) = Q((x,y)M)$.

Let $Q,R$ be two integer quadratic forms: Does $V(Q) = V(R)$ imply $Q \sim R$? If it's true how would it be proved? If false when does it fail?

I'm not assuming that the QFs have the same discriminant or are positive definite.

  • $\begingroup$ M would be a 2x2 matrix acting on the 2-vector (u,v). $\endgroup$ Nov 24, 2015 at 17:34
  • $\begingroup$ M need not have determinant 1, it could have determinant -1. $\endgroup$ Nov 24, 2015 at 17:40
  • $\begingroup$ Are you assuming the forms are positive definite? $\endgroup$
    – rogerl
    Nov 24, 2015 at 19:41
  • $\begingroup$ no not assuming they are positive definite forms. $\endgroup$ Nov 24, 2015 at 19:44
  • $\begingroup$ See also math.stackexchange.com/questions/1088886 $\endgroup$ Jun 4, 2017 at 14:44

2 Answers 2


As you mentioned on Chat, Kap and I wrote a note on forms of different discriminants (but positive definite forms, meaning negative discriminants). This was corrected and extended by John Voight, now at Dartmouth; also published.

The best known examples are the pair $x^2 + xy + y^2$ and $x^2 + 3 y^2.$ The proof that these represent the same numbers is some 2 by 2 matrices, some things mod 2. Same for the indefinite pair $x^2 + xy - y^2$ and $x^2 - 5 y^2.$

Probably worth pointing out that the forms $x^2 + xy + 2ky^2$ and $x^2 + (8k-1)y^2$ represent all the same odd numbers, including any odd primes. The latter form does not represent $2$ or $-2,$ if you can say the same about the former form they agree on primes. We called these "Trivial Pairs." Um; as with Gauss, we discard these if the discriminant is square, meaning we demand $8k - 1 \neq -w^2,$ or $k \neq \frac{1 - w^2}{8}.$

The question changes if you allow square discriminants.

There may be infinitely many other indefinite pairs, we did not check.

If the discriminant is not a square, two forms of the same discriminant that share even a single prime are $GL_2 \mathbb Z$ equivalent. In traditional terms, they are either equivalent or opposite.

Forms with square discriminant, such as $xy$ or $x^2 - y^2,$ are unusual in representing entire arithmetic progressions. Primes do not control things.

For self study, I recommend Buell, Binary Quadratic Forms. I find it easier reading than Buchmann and Vollmer. I also recommend L. E. Dickson Introduction to the Theory of Numbers. For just the first section, I also like Cox, Primes of the Form $x^2 + n y^2.$ Cox does a good job on positive forms, genera, composition. No indefinite forms, though, no Pell. As you can see from my answers, I like the first chapter in Conway, The Sensual Quadratic Form. The wonderful thing there is the "Topograph" construction. I have written a bunch of software to tell me how to avoid arithmetic mistakes in drawing those. These give the best way for talking about a fixed indefinite form $A x^2 + B x y + C y^2$ with $B^2 - 4 AC > 0 $ but not a square. The "cycle" method of Lagrange does not do well when $|n|$ is too large, in finding all solutions to $A x^2 + B x y + C y^2 = n.$ Lagrange's method gives all answers when $|n| < \frac{1}{2} \sqrt{B^2 - 4 AC};$ this result is Theorem 85 in Dickson. Oh, both Lagrange and Conway are talking about primitive representations, $\gcd(x,y) = 1.$

  • 1
    $\begingroup$ Thank you so much! It was especially surprising to get a negative answer. $\endgroup$ Nov 24, 2015 at 20:27

Since we know how the old components of a base change $B$ are given by $v_{new}=B^{-1}v_{old}$ we use it on the quadratic form $v\mapsto v^{\top}Qv$.

But let us note that $$v^{\top}Qv=(BB^{-1}v)^{\top}Q(BB^{-1}w)=(B^{-1}v)^{\top}(B^{\top}QB)(B^{-1}w)=v'^{\top}\overline Q v'.$$

Then $\overline Q=B^{\top}QB$ would be the matrix in the new coordinates.


$ ax^2+bxy+cy^2= (x,y)\left( \begin{array}{cc}a&\frac{b}{2}\\ \frac{b}{2}&c\end{array}\right) \left(\begin{array}{c} x\\y\end{array}\right) =(BB^{-1}{\mathbf v})^{\top}Q(BB^{-1}{\mathbf v})=(u,v)B^{\top}QB \left(\begin{array}{c}u\\v\end{array}\right) $

$\qquad \qquad\qquad=(u,v)\left( \begin{array}{cc}m&\frac{n}{2}\\ \frac{n}{2}&r\end{array}\right) \left(\begin{array}{c} u\\v\end{array}\right)=mu^2+nuv+rv^2$

  • $\begingroup$ Thanks! I don't have a base change to start with, I am starting with the fact that the forms represent the same set and want to prove that there exists a base change (or not). $\endgroup$ Nov 24, 2015 at 17:44
  • 1
    $\begingroup$ note that one of your quadratic form can be written as $ ax^2+bxy+cy^2=(x,y)\left( \begin{array}{cc}a&\frac{b}{2}\\\frac{b}{2}&c\end{array}\right) \left(\begin{array}{c}x\\y\end{array} \right) $, so, you can obtain other quadratics (with de same value) simply by choosing any other non singular matrix $B$ $\endgroup$
    – janmarqz
    Nov 24, 2015 at 17:52
  • $\begingroup$ The unique way to have a coordinates change on terms of only integers used, is to take $B\in GL_2{\Bbb Z}$, which is admitted by my algorithm, right?... if b is even : ) $\endgroup$
    – janmarqz
    Nov 24, 2015 at 18:34
  • $\begingroup$ Thanks for your input. You assume B exists, but my question is to prove B exists. $\endgroup$ Nov 24, 2015 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .