# Show that if a quadratic form is primitive then so are equivalent forms

A Quadratic form is primitive if the greatest common divisor of the coefficients of it's terms is 1.

I saw in number theory book that "it is easily seen that any form equivalent to a primitive form is also primitive" but I cannot seem to show this to be true myself.

Any help with what I assume is a very simple proof would be much appreciated!

If $q(x,y)=ax^2+bxy+cy^2$ then $$\gcd(a,b,c)=\gcd(a,a+b+c,c)=\gcd(q(1,0),q(1,1),q(0,1)).$$

If moreover $q(x,y)$ equals $Q(X,Y):=AX^2+BXY+CY^2$ with $X=\alpha x+\beta y$ and $Y=\gamma x+\delta y$ then $\gcd(a,b,c)=\gcd(\text{three values of }Q)$ is a multiple of $\gcd(A,B,C)$.

And conversely, if your change of variables is invertible.

• I'm failing to see how to arrive at the last conclusion about that the gcd of some $Q$-values is a multiple of $\gcd(A,B,C)$, could you elaborate if you remember it after these years? Jan 5, 2023 at 0:32
• @TheOutZ any $Q$-value is a multiple of $\gcd(A,B,C).$ Jan 5, 2023 at 4:20
• I must be as thick as a brick, but how do we arrive at that? Is it basic properties of the gcd? Is it somehow by definition? Jan 5, 2023 at 10:29
• @TheOutZ If $d$ divides $A,B,C$ then it divides $Au+Bv+Cw$ for any integers $u,v,w.$ Jan 5, 2023 at 11:51
• Oh my... thank you. Couldn't have been more obvious. Jan 5, 2023 at 12:03

Beginning with $\langle A,B,C \rangle,$ all equivalent forms can be created by a sequence of operations of simple types. Convenient to use three: $$\langle A,B,C \rangle \mapsto \langle C, \; -B, \; A \rangle,$$ $$\langle A,B,C \rangle \mapsto \langle A, \; B+2A, \; A+B+C \rangle,$$ $$\langle A,B,C \rangle \mapsto \langle A, \; B-2A, \; A-B+C \rangle.$$ In all three cases, you can check that $\gcd(A,B,C) = 1$ means that the three new coefficients are coprime as a triple.

There are more elegant ways to present the modular group, but this is closest to what you would do by hand.

Note that equivalence means this: take the Hessian matrix $H$ of second partial derivatives of your form, so that, for a column vector $x,$ $f(x) = (1/2) x^T H x.$ Then, given a matrix $P$ of integers and determinant $1,$ the Hessian matrix of the transformed item is $G =P^T H P.$