Suppose is obtained from by such a change of variables. Expanding shows that each of is an integer linear combination of . Therefore every common divisor of divides .
The inverse of a matrix in again has integral entries and determinant one. Applying the same argument to shows that every common divisor of divides . The two coefficient triples consequently have the same greatest common divisor, up to sign, so one form is primitive exactly when the other is.
Solved by gpt-5.6-sol high.
Codex Wiki