# Local-to-global principle for equivalence of binary quadratic forms

Let $f,g$ be irreducible binary quadratic forms with integer coefficients. Define the twisted action of $\operatorname{GL}_2(\mathbb{R})$ on $f$ by

$$\displaystyle f_T(x,y) = \frac{1}{\det T} f(t_1 x + t_2 y, t_3 x + t_4 y)$$

with $T = \left(\begin{smallmatrix} t_1 & t_2 \\ t_3 & t_4 \end{smallmatrix} \right)$. Then whenever $f$ and $g$ have the same discriminant, they are equivalent with respect to $\operatorname{GL}_2(\mathbb{Q})$-twisted action. To see this, put $f = f_2 x^2 + f_1 xy + f_0 y^2$ with $\Delta(f) = f_1^2 - 4 f_2 f_0$. Then $f$ is equivalent to $x^2 - \frac{\Delta(f)}{4}y^2$ via the map $T = \left(\begin{smallmatrix} 2 & -f_1 \\ 0 & 2 f_2 \end{smallmatrix} \right)$. Thus $f$ is equivalent to $g$ via the map $T' = \left(\begin{smallmatrix} 2 & -f_1 \\ 0 & 2 f_2 \end{smallmatrix}\right) \left(\begin{smallmatrix} 2 g_2 & g_1 \\ 0 & 2 \end{smallmatrix} \right)$. It is therefore enough to know that $f,g$ have integer coefficients, irreducible over $\mathbb{Q}$ and that $f,g$ are equivalent over $\operatorname{GL}_2(\mathbb{R})$ to ensure that they are $\operatorname{GL}_2(\mathbb{Q})$-equivalent.

What about $\operatorname{GL}_2(\mathbb{Z})$-equivalence? Suppose we know that $f,g \in \mathbb{Z}[x,y]$ and $\Delta(f) = \Delta(g)$ not a square, and for each prime $p$, there exists $T_p \in \operatorname{GL}_2(\mathbb{Z}_p)$ such that $f_{T_p} = g$. Does it follow that $f,g$ are $\operatorname{GL}_2(\mathbb{Z})$-equivalent?

• What you write is not quite correct. Let $f(x,y)=xy+7y^2$, then $f_2=0$ and your matrix $T$ is degenerate.... – Mikhail Borovoi Jun 19 '17 at 18:58
• Right, I was thinking that $f$ and $g$ are irreducible, in which case what you say cannot happen as $f_2 f_0 \ne 0$. I will modify the statement – Stanley Yao Xiao Jun 19 '17 at 19:02
• What is an irreducible quadratic form? – Mikhail Borovoi Jun 19 '17 at 19:05
• @MikhailBorovoi an integral binary quadratic form is irreducible (over $\mathbb{Q}$, or equivalently, over $\mathbb{Z}$) if it does not factor into two linear factors over the rational numbers. In particular, any binary quadratic form with the $x^2$ or $y^2$ coefficient being zero is automatically reducible (because then $x$ or $y$ would be a factor defined over the rationals). – Stanley Yao Xiao Jun 19 '17 at 19:07
• Are you seeking an "integral" version of the Hasse-Minkowski theorem in the binary case? If I remember correctly, for $q_1 = x^2 + 82y^2$ and $q_2 = 2x^2 + 41y^2$, the quadratic lattices $(\mathbf{Z}^2, q_1)$ and $(\mathbf{Z}^2, q_2)$ with the same (non-square) discriminant are isometric over $\mathbf{Z}_p$ for all primes $p$ (and over $\mathbf{R}$), but they are clearly not isometric over $\mathbf{Z}$ (e.g., $q_1(\mathbf{Z}^2)$ does not contain $41 \in q_2(\mathbf{Z}^2)$). – nfdc23 Jun 19 '17 at 20:44