Binary quadratic form Created 2026-09-24 Updated 2026-11-05
A binary quadratic form is a quadratic form in two variables, written or . In number theory an integral binary quadratic form has integer polynomial coefficients . It represents an integer when for some integers .
The homogeneous polynomial identity distinguishes a form from a general quadratic polynomial with constant or linear terms. The discriminant of a binary quadratic form is . For example, has and represents , while has and represents at .
Changing integer coordinates can conceal the same arithmetic. Substituting into gives . The transformation has determinant one and an integer inverse, so both forms represent exactly the same integers. Proper equivalence of binary quadratic forms records this reversible change, and the reduction algorithm for a positive definite binary quadratic form chooses a small representative for each such equivalence class.
Write an integral binary quadratic form as . For proper equivalence of binary quadratic forms, the allowed changes of variables have determinant one. Here is the needed reduction rather than an appeal to class-number tables. A shear changes to without changing or the discriminant of a binary quadratic form. Choose so . If the resulting , the determinant-one change replaces by , strictly decreasing the positive integer leading coefficient. Repeating must terminate with . If and , the same rotation makes positive; the choice already fixes the other boundary sign. This is a reduced positive definite binary quadratic form.
Since , the reduction inequalities give , so . The integer is odd. For , only survives the boundary convention and . For , gives , not an integer. For , gives or ; for , gives or . None is integral. Therefore every form is properly equivalent to , establishing class number one for discriminant minus sixty-seven.
For infinitude, its determinant-one shears produce
Each has discriminant and is positive definite because it is a change of variables of the displayed positive form. Their middle coefficients are distinct, so they are infinitely many distinct elements of the set.
Write and associate the symmetric matrix . Define the left group action of by ; using instead describes the same equivalence classes. The transformed matrix is , so its determinant is unchanged. Hence the discriminant of a binary quadratic form
is invariant under proper equivalence of binary quadratic forms.
A proper representation here means with . Such a vector extends to the first column of an integer determinant-one matrix by Bezout identity. After that change of variables the form has leading coefficient , and discriminant , so its middle coefficient satisfies . Conversely, such a congruence gives the positive definite integral form
which represents at . It is primitive: a common divisor of all three coefficients would have its square dividing the squarefree discriminant 35.
For clarity, enumerate all the proper equivalence classes at this discriminant. Substitutions first arrange ; if , the determinant-one substitution makes the leading coefficient smaller. Repeating terminates because this coefficient is a positive integer. Thus every class has a reduced representative with . From it follows that , giving . Checking , with odd, yields
The two signs in the first pair are equivalent by replacing with , and in the second pair by the determinant-one swap. Thus the two forms in the question exhaust the classes.
The primitive representation criterion at discriminant minus thirty-five now follows. For odd prime to 35, the congruence modulo is solvable exactly when is a square modulo every prime divisor of . Necessity is immediate. For sufficiency, a nonzero root modulo each odd prime lifts to all required prime powers because its derivative is invertible; combine the lifts by the Chinese remainder theorem, also imposing . This gives the modulus-four condition since . We conclude
By quadratic reciprocity, the symbol equals . In particular each prime divisor must be a quadratic residue at both 5 and 7, or a nonresidue at both. The condition is on each prime divisor, not merely on the product Jacobi symbol of .
Use the reduction algorithm for a positive definite binary quadratic form. A determinant-one shear puts the middle coefficient in . If the resulting last coefficient is smaller than , the determinant-one substitution decreases the positive integer leading coefficient. Repeating terminates with a reduced positive definite binary quadratic form satisfying . These substitutions preserve proper equivalence of binary quadratic forms and the discriminant of a binary quadratic form.
The enumeration of reduced binary quadratic forms gives
Since , is odd. For , the possible values of are respectively . Each is a prime number greater than seven. But , so its positive divisor must be one. Then forces and . The two signs are properly equivalent: substituting in gives . Thus every form in question is properly equivalent to
A reduced positive definite binary quadratic form satisfies , with when or . These inequalities select representatives under proper equivalence of binary quadratic forms; the changes of variables have integer entries and determinant .
For the first binary quadratic form, put , . For the second, put , . Both changes preserve coprime integers, and give
Proper representation means using . For , gives a value greater than , while forces . For , the smallest values are and . For , again gives only primitively; gives , and gives at least . Thus the three smallest properly represented values are
For example the original variables can be chosen as for , and for .
Every positive definite binary quadratic form can be reduced: integer shears first make , and interchanging the variables when decreases the positive leading coefficient, so this procedure terminates. To enumerate the reduced forms of discriminant minus forty-four, reduction gives , hence . Checking with the reduced inequalities gives exactly
The second represents only even integers. The last two have the same represented values, by . The first and third are the reduced versions of and . Therefore every represented odd integer occurs in at least one of , whether or not its original representation was primitive.
Write an integral binary quadratic form as , with discriminant of a binary quadratic form . It is positive definite when and . Two forms are equivalent if one is obtained from the other by an integral linear change of variables whose matrix lies in . A positive definite form is reduced when
with when or .
To reduce a form, apply a unimodular shear with chosen so that the new middle coefficient has . If the new final coefficient is smaller than , exchange the variables, using a determinant-one rotation, so that the positive leading coefficient decreases from to . Repeating must stop because a positive integer cannot decrease indefinitely. At termination , and elementary sign changes impose the boundary convention. This is the reduction algorithm for a positive definite binary quadratic form, and proves that every positive definite form is equivalent to a reduced one.
The displayed forms have discriminant , so the intended discriminant is . For any reduced form of this discriminant, enumeration of reduced binary quadratic forms gives
The boundary convention and direct checking of leave only
Suppose first that a prime is represented by . The identity
shows modulo both and that is a nonzero square. Hence
Similarly,
Modulo , this says is a square, while modulo it says is a square. Since , the multiplicativity of the Legendre symbol gives
Conversely, suppose the two displayed Legendre symbols have the same sign. By quadratic reciprocity,
Choose an odd integer satisfying . Since is odd, is also divisible by , so
is a positive definite integral form of discriminant that represents . Reducing yields either or , and equivalence preserves represented integers. The necessary symbol calculation above determines which one: the positive pair selects , and the negative pair selects . Therefore
Write an integral binary quadratic form as . It is positive definite when and its discriminant is negative. Two forms are properly equivalent when one is obtained from the other by a change of variables in . A reduced positive definite binary quadratic form satisfies
with when or .
To prove reduction, choose in a proper equivalence class a form whose positive leading coefficient is minimal. Replacing by changes by , so choose to arrange . If the resulting , the determinant-one substitution would put in the leading position, contradicting minimality. Thus . Sign changes on the boundary give the stated convention. Hence every positive definite form is properly equivalent to a reduced one.
A unimodular integral substitution is a bijection of , so properly equivalent forms represent exactly the same integers.
Both given forms have discriminant . Reduction gives
The two reduced forms represent the same integers because
an integral change of variables of determinant . They are not properly equivalent: the uniqueness theorem for reduced positive definite forms says that each proper class has one reduced representative, and . Therefore the original forms represent the same integers but are not equivalent in the required proper sense.
Write an integral binary quadratic form as
A positive definite form is a reduced positive definite binary quadratic form when
with on the boundary or . The class number of a negative discriminant is the number of proper equivalence classes of primitive positive definite integral forms of discriminant .
Every such class has a reduced representative. For a reduced form,
so
There are only finitely many possible integers and , and then
is determined. Hence . There is at least one class: the principal form is
and
Thus , in agreement with the enumeration of reduced binary quadratic forms.
Now let be prime. The two forms
are primitive, positive definite, reduced, and have discriminant . They are not properly equivalent: represents one, while the least positive value of is two. Therefore
Assume henceforth that , so these are the only two classes. If
for a prime , then is odd and
Moreover , so is a quadratic residue modulo . This proves the necessity.
Conversely, suppose and is a quadratic residue modulo . By quadratic reciprocity, these two conditions imply
Indeed, for both relevant signs are positive, while for the signs from and reciprocity with cancel. Choose an even integer such that
Then
is a primitive positive definite integral form of discriminant and represents . It belongs to one of the two classes .
The second form cannot represent such a prime. If
then is odd and, since ,
This contradicts . Hence lies in the principal class , and proper equivalence of binary quadratic forms preserves represented integers. Therefore
This is the prime representation when h of minus eight q equals two.