An integral quadratic form (IQF) is some instance of $f(x,y)=ax^2+bxy+cy^2$, where $a,b,c \in \mathbb{Z}$.

Let $f(x,y),g(x,y)$ denote IQFs. We say $f(x,y)$ and $g(x,y)$ are properly equivalent, denoted by $f(x,y)∼g(x,y)$, if there exist integers $p,q,r,s$ such that $f(x,y)=g(px+qy,rx+sy)$ and $ps−qr=1$

We say $f(x,y)$ represents $m \in \mathbb{Z}$ if there exist $x_0,y_0 \in \mathbb{Z}$ such that $f(x_0,y_0)=m$. We say $f(x,y)$ properly represents $m$ if it represents $m$ and $gcd(x_0,y_0)$.

Claim to be proven

If $f(x,y) \sim g(x,y)$ and $f(x,y)$ properly represents $m$, then $g(x,y)$ properly represents $m$.


I have been able to show that $\sim$ is an equivalence relation. Then, I assume $f(x,y) \sim g(x,y)$ and $f(x_0,y_0)=m$ where $gcd(x_0,y_0)=1$. Since $f(x,y) \sim g(x,y)$, we have $f(x_0,y_0)=g(px_0+qy_0,rx_0+sy_0)=m$, so $g(x,y)$ represents $m$. All that is left is to show that $gcd(px_0+qy_0,rx_0+sy_0)=1$. But I am not sure how to proceed. I have tried thinking of $p,q,r,s$ as a $2 \times2$ matrix with determinant $1$ acting on the $2 \times 1$ vector $[x_0,y_0]$. I think that something to do with rotations should be involved, but I am not sure how to properly express it such that the desired result, $gcd(px_0+qy_0,rx_0+sy_0)=1$, is obtained. Any help is appreciated.


2 Answers 2


with integer matrices with determinant $\pm 1,$ the gcd is preserved because the inverse of the matrix also has integer elements. From $f(x,y)=g(px+qy,rx+sy)$ we define $$ u = px+qy \; , \; \; \; v = rx+sy $$

Taking $g = \gcd (x,y) $ we see that $g|u $ and $g| v.$ Therefore $ g | \gcd ( u,v) $ Suppose we name $h = \gcd ( u,v).$ So far we have $g|h.$

We take the inverse matrix to arrive at $$ x = su-qv \; , \; \; \; y = -ru +p v $$

Well $h$ divides both $x,y$ so $h | g.$ But $g|h.$ So $h = g$


Summary: $(x,y)=(px+qy,rx+sy)$ as ideals, so $px+qy$ and $rx+sy$ are coprime since $x$ and $y$ are coprime.

All the detail:

If $ps-qr=1$, then $(px+qy)s-(rx+sy)q=x(ps-qr)=x$.

If $ps-qr=-1$, then $-(px+qy)s+(rx+sy)q=x(-ps+qr)=x$.

Hence $x$ is a linear combination of $px+qy,rx+sy$. So $x=c_1(px+qy)+c_2(rx+sy)$ for some $c_1,c_2 \in \mathbb{Z}$

Similarly, we can show $y$ is a linear combination of $px+qy,rx+sy$. So $y=c_3(px+qy)+c_4(rx+sy)$ for some $c_3,c_4 \in \mathbb{Z}$

By assumption $gcd(x,y)=1$. By Bezout's Identity there exist $a,b$ such that $ax+by=1$.

Using the above:





Let $c_5 :=ac_1+bc_3$, $c_6:=ac_2+bc_4$. Then the above becomes


Let $d=gcd(px+qy,rx+sy)$.

Then $(px+qy)=du$ and $rx+sy=dw$ for some $u,w \in \mathbb{Z}$.

Substituting into the above equation yields:



So $d$ divides $1$, and since $gcd$ is positive by definition, $d=1$. Hence $gcd(px+qy,rx+sy)=1$, as desired.


You must log in to answer this question.

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