This is a continuation of this question: A class of quadratic equations

Let $f(x,y) = ax^2 + bxy + cy^2$ be an irreducible and indefinite binary quadratic form. Consider the equation

$$\displaystyle f(x,y) = a,$$

where $a$ is the $x^2$ coefficient of $f$. Plainly, this equation is soluble in the integers since $(x,y) = (1,0)$ is a solution. Since $f$ is indefinite and irreducible, an appropriate action by the unit group of the quadratic field generated by $f$ will give us infinitely many solutions.

I am interested in the case when one can find a solution with $y$ co-prime to $a$. This is not always possible. For example, the equation

$$\displaystyle 5x^2 - 7y^2 = 5$$

has fundamental solution $(6,5)$ and all solutions are of the form

$$\displaystyle \begin{pmatrix} 6 & 7 \\ 5 & 6 \end{pmatrix}^n \binom{\pm 6}{\pm 5}.$$

The issue appears to be that $a$ divides $b$, the $xy$ coefficient of $f$. However, this divisibility property is not preserved under substitution action by $\operatorname{GL}_2(\mathbb{Z})$, so this cannot be an intrinsic obstruction.

Here is the ultimate question I am interested in. Let $O_f(\mathbb{R})$ be the maximal subgroup of $\operatorname{GL}_2(\mathbb{R})$ which fixes $f$ by substitution. It is conjugate to the split orthogonal group $O(1,1)$. Let $O_f^-$ denote the subset of $O_f$ consisting of elements of negative determinant. This part is conjugate to

$$\displaystyle \left \{ \pm \begin{pmatrix} \cosh t & \sinh t \\ -\sinh t & -\cosh t \end{pmatrix}, t \in \mathbb{R} \right \}.$$

My question is the following: for $f$ an irreducible and indefinite binary quadratic form with integer coefficients, does $O_f^-$ always contain an element in $\operatorname{GL}_2(\mathbb{Z})$? In other words, is $O_f^- \cap \operatorname{GL}_2(\mathbb{Z})$ always non-empty?

One can show that the $O_f^-$ contains elements of the shape

$$\displaystyle \begin{pmatrix} m & \dfrac{bm + cn}{a} \\ n & - m \end{pmatrix},$$

where $(m,n)$ satisfies $f(m,n) = a$. If $n$ is co-prime to $a$, then since $am^2 + n(bm+cn) = a$, it follows that $n | bm + cn$ and the above is in $\operatorname{GL}_2(\mathbb{Z})$. If $a | n$ and $a | b$, then again it is in $\operatorname{GL}_2(\mathbb{Z})$.

I've done quite a few experiments and it seems that $O_f^- \cap \operatorname{GL}_2(\mathbb{Z})$ is always non-empty.

Any help would be appreciated!


2 Answers 2


Your ultimate question was answered by Gauss: $O_f^- \cap \operatorname{GL}_2(\mathbb{Z})$ is nonempty if and only if the class of $f$ is ambiguous (i.e. its square is the trivial class).

Indeed, $f(x,y)$ is improperly equivalent to itself if and only if $f(x,y)$ is properly equivalent to $f(y,x)$. As the classes of $f(x,y)$ and $f(y,x)$ are inverses to each other, the claim follows. For more details see Theorem 2.1 in Chapter 14 of Cassels: Rational quadratic forms.

Sections 4 and 6 of the mentioned chapter contain further information on ambiguous classes, e.g. each such class contains a form of type $[A,0,C]$ or $[A,A,C]$, and vice versa.

  • 1
    $\begingroup$ I was not aware that this was already proved in the literature; I came up with a proof on my own recently. In particular, the textbook I referenced contained an incorrect version of this theorem. $\endgroup$ Jul 30, 2016 at 17:45

For such quadratic forms.


If we consider all the equations of Pell. The resulting factorization of the number. $4a=tq$

And use these equations Pell.


Then the solution can be written in this form.



The proposed scenario implies to be $q=1$

You can select such as You have such a form.


$t=20$ ; $q=1$ ;


$p=167$ ; $s=31$



Equation $ax^2-cy^2=a$ Always comes down to the equation. ; $x^2-acy^2=1$

  • $\begingroup$ I don't understand your argument. Are you suggesting that it is always possible to pick $q = 1$? This would mean that the equation $x^2 - (b^2 - 4ac) y^2 = \pm 4a$ is always soluble, but I don't see why this has to be the case? $\endgroup$ Jul 26, 2016 at 12:07
  • $\begingroup$ I think I found a counter-example to your claim. For instance, consider the form $f(x,y) = 5x^2 + 3xy - 11y^2$. Then $4a = 20$, and you are asserting that $x^2 - 229y^2 = \pm 20$ has a solution. But this is not true, according to this online calculator: alpertron.com.ar/QUAD.HTM $\endgroup$ Jul 26, 2016 at 12:15
  • $\begingroup$ @StanleyYaoXiao I never said that the solution to any equations Pell will always be. The equations are written out - so you need to find out when decisions can be. For the case of. $5x^2+3xy-11y^2=5$ It is necessary to consider all possible equations of Pell. $p^2-229s^2=\pm{t}$ The choice for a case $q=1$ was the fact that they themselves asked me to find coprime numbers with a factor $a$. And as already said - the solution is always there. In some cases they are not coprime. $\endgroup$
    – individ
    Jul 26, 2016 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.