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.
Class number of a negative discriminant Created 2026-09-24 Updated 2026-11-05
For a negative discriminant of a binary quadratic form or , the class number of a negative discriminant counts proper equivalence classes of primitive binary quadratic forms that are positive definite and have discriminant .
Uniqueness of the reduced positive definite binary quadratic form in each class makes this the number of reduced primitive forms. Enumeration of reduced binary quadratic forms proves finiteness and gives an explicit procedure. For example, , represented by , while , with the four forms listed under reduced positive definite binary quadratic forms of discriminant minus thirty-nine.
Imprimitive forms do not enter . At , the reduced form has content two, so the three reduced forms listed under reduced forms of discriminant minus thirty-two contribute only two primitive classes. If is a fundamental discriminant, this form class number agrees with the class number of the imaginary quadratic field of discriminant . For nonfundamental , the associated order in a number field need not be the full ring of integers, so that distinction must be retained.
Conic type discriminant Created 2026-10-18 Updated 2026-10-25
For a second-degree equation , the number is the discriminant of a binary quadratic form associated with its quadratic part. For a nonempty, nondegenerate real conic section, a negative value gives an ellipse, zero a parabola, and a positive value a hyperbola. It is invariant under a rotation of orthonormal coordinates.[ref]
A short explanation uses the symmetric matrix
An orthogonal matrix changes this matrix to , whose determinant equals . The spectral theorem for real symmetric matrices then removes the mixed term. Equal-sign, opposite-sign and one-zero eigenvalues give the three types after the remaining linear terms and offsets are considered.
The qualification matters. The equations , and describe a point, a repeated straight line, and two crossing straight lines, respectively. Their quadratic discriminants have the signs expected of ellipse, parabola and hyperbola types, but all three are degenerate conics. Also, has an empty set of real solutions despite its negative quadratic discriminant.
Let be a positive odd integer with distinct prime factors. Then
where is the class number of a negative discriminant.
Assign each complete prime power in the prime factorization of to one of two factors . There are ordered integer factorizations with coprime factors. Interchanging and pairs them without a fixed pair, because and coprime equal factors would both be one. Thus there are unordered pairs.
Each pair gives the primitive binary quadratic form of discriminant of a binary quadratic form . It is a reduced positive definite binary quadratic form, so distinct pairs give distinct equivalence classes under proper equivalence by uniqueness of the reduced positive definite binary quadratic form. This proves the lower bound. For the excluded case , the separate value also satisfies the weaker numerical inequality .
Let be an odd prime and let be an integer congruent to zero or one modulo four. Some integral binary quadratic form of discriminant of a binary quadratic form represents if and only if is a square modulo .
For necessity, a representing vector must have , since a common divisor greater than one would make its square divide . Bézout's identity completes this vector to the first column of a determinant-one integer matrix. Under that proper equivalence, the leading polynomial coefficient becomes , so the transformed form is . Its discriminant gives .
Conversely, choose a root modulo and adjust its parity so . Adding changes parity because is odd. Then
has integer polynomial coefficients, discriminant and value at . If , it is positive definite. If , it is also a primitive binary quadratic form: a common divisor of its coefficients would have to be , contradicting .
The conclusion concerns some form, not every form of that discriminant. For , the construction gives , which represents three. The same-discriminant form does not represent three. Deciding the particular form requires the proper equivalence classes, not only the local square test. When , imprimitive forms can occur, so primitiveness must be checked separately.
Discriminant of a binary quadratic form Created 2026-09-24 Updated 2026-11-05
The discriminant of a binary quadratic form is . For integer polynomial coefficients, is congruent to zero or one modulo four. Completing the square gives
Thus for real polynomial coefficients with , positive definiteness holds exactly when . For the form is an indefinite quadratic form, taking values of both signs; for it is degenerate. For example, has , whereas has .
Over the real numbers, use the symmetric matrix . Its determinant is . An integer coordinate change gives , so
In particular unimodular matrices preserve , proving its invariance under proper equivalence. Changes with other determinants can change the discriminant. For instance, replacing by takes to and multiplies by four. The chosen half-coefficient matrix convention matters in this calculation.
Enumeration of reduced binary quadratic forms Created 2026-09-24 Updated 2026-11-05
Let with or . A reduced positive definite binary quadratic form of discriminant of a binary quadratic form satisfies
Consequently every reduced form can be found by a finite search:
  • choose ;
  • choose with ;
  • put and retain ;
  • on or , retain only .
To count the class number of a negative discriminant, additionally retain only primitive binary quadratic forms, those with . Otherwise the search also lists imprimitive forms. For example, gives and , but only the first is primitive, so . This distinction is essential when turning an enumeration into a class-number claim.
The discriminant of a binary quadratic form is . If the form is positive-definite, evaluating it at gives . For , completing the square gives
Evaluating along shows that positivity also requires . Conversely these two inequalities make both displayed coefficients positive, proving
A reduced positive definite binary quadratic form satisfies , with if or . The last convention avoids counting both boundary representatives. For fixed negative discriminant, these inequalities imply
There are finitely many such integers , finitely many integers with , and then is determined. Hence the number of reduced forms is finite. If no admissible integer coefficients have the given discriminant, this number is zero.
For , the bound gives . The integrality of and the boundary sign convention give respectively
These are all the reduced positive definite binary quadratic forms of discriminant minus thirty-nine. Thus
represented by , , , and .
The discriminant of a binary quadratic form is ; it is unchanged by a unimodular matrix change of integral variables and satisfies or . For such a , the discriminant criterion for prime representation by a binary quadratic form says that some integral binary quadratic form of discriminant of a binary quadratic form represents an odd prime exactly when is a square modulo , including zero. Equivalently,
These versions agree: a square root modulo can be chosen even when and odd when , by adding if needed, and then the Chinese remainder theorem applies.
For completeness, if , then is primitive, since any common divisor would have its square divide . Complete to a basis of with determinant one using Bézout's identity. The transformed binary quadratic form has leading coefficient and discriminant of a binary quadratic form . Conversely, a suitable makes an integral binary quadratic form representing at .
For , the discriminant of a binary quadratic form is . The prime is represented. If is represented, reducing modulo gives , which also excludes . To prove sufficiency for , quadratic reciprocity gives
The criterion constructs a positive definite binary quadratic form of discriminant of a binary quadratic form . It is primitive: a common divisor of its coefficients would divide , and if that divisor were , then would divide , impossible for .
We must still establish that this form is equivalent to , rather than merely some form of the same discriminant of a binary quadratic form. In a positive definite integral binary quadratic form, replace by to arrange . If , apply and repeat. Each such exchange strictly decreases the positive integer leading coefficient, so this reduction algorithm for a positive definite binary quadratic form terminates with . Then , so . With , parity forces , giving . With , the only integral choices are , and these are not primitive. Thus every primitive positive definite binary quadratic form of discriminant of a binary quadratic form is equivalent to , and preserves its represented integers. Therefore
For an integral binary quadratic form with and , the reduced positive definite binary quadratic form convention is , with on either boundary or . Since , the enumeration of reduced binary quadratic forms for has . The integer is odd. For , only is retained and ; for , both give . Thus the complete list is
A proper representation of a prime uses a primitive representing vector. Completing that vector to a matrix in transforms a representing form to , so its discriminant of a binary quadratic form gives . Conversely, choose an odd satisfying this congruence and put . This is integral, and is positive definite and represents at . This proves the discriminant criterion for prime representation by a binary quadratic form here.
For , quadratic reciprocity gives . Including the ramified prime, the answer is therefore
For example supplies a proper representation of . Reduction transfers every such representation to one of the three displayed forms.
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
Write an integral binary quadratic form as , with discriminant of a binary quadratic form . If is prime, then : any common divisor would have its square dividing . Complete to a matrix in using Bezout identity. After the associated integral change of variables, the properly equivalent form has leading coefficient , say . Its discriminant of a binary quadratic form gives , hence .
Conversely suppose . Since is an integral-form discriminant of a binary quadratic form, or . Choose with even integer parity for and odd integer parity for . This is possible because is odd. Then is divisible by , and
is an integral form of discriminant of a binary quadratic form representing . This proves the discriminant criterion for prime representation by a binary quadratic form, including the case ; no assumption that is a fundamental discriminant was used.
Both forms have discriminant of a binary quadratic form . The reduction algorithm for a positive definite binary quadratic form gives and for a reduced positive definite representative. Enumerating gives
The second and fourth forms are imprimitive and represent only even integers. Every odd prime represented by a form of discriminant of a binary quadratic form must therefore be represented by or .
For a prime , quadratic reciprocity gives
Every prime has this symbol equal to one and hence is represented by one of the two primitive forms, by part (b). But an odd prime represented by and different from three is , so these primes must be represented by . Similarly, primes have both symbols equal to , and are represented by , since a prime represented by is . Both residue classes are coprime to 15, so Dirichlet theorem on primes in arithmetic progressions proves each form represents infinitely many primes.
The same modulo-three distinction excludes every prime other than three from being represented by both. The form does not represent three; represents three and five but neither is represented by , and two is represented by neither. Therefore there are no primes represented by both forms.
Here with and field discriminant . The imaginary-quadratic Minkowski bound for ideal classes is , so each ideal class has an integral representative of ideal norm at most four. Representatives therefore use prime ideals above two and three. Put
The prime two ramifies, with , and three splits into . No element has field norm two, because ; thus is nontrivial of order two. Norm-four ideals represent and add no generator, so the class group is generated by .
The element has field norm 18. It belongs to and , but not , since reduction there gives . Its ideal therefore factors as
The exponents follow from the ideal norm 18, or from the root defining . Hence , so has order four and already generates all possible classes. Therefore
As a separate check, the reduced forms of discriminant of a binary quadratic form are , giving exactly four classes.
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
A reduced positive definite binary quadratic form satisfies
with when or . Its discriminant of a binary quadratic form is . The first displayed inequality already gives , while gives
Taking the positive square root yields
Moreover, , so . For fixed negative , the displayed bounds leave only finitely many possible integers and , and then is uniquely determined. Hence only finitely many reduced forms have discriminant .
For , the bound gives , so . The modular congruence condition makes odd. If , then and ; the boundary convention retains . If , then and ; the boundary convention retains . Thus the complete list is
An integral positive definite binary quadratic form
is reduced when
with when or . Its discriminant is .
For , reduction gives , so or . Since , is even. If , then forces , and . If , then ; integrality of
leaves and , and the boundary convention retains only . Hence the complete list is
Now suppose the prime is represented by . If , the equation is impossible modulo four, so is odd. The integers and then have opposite parity, and therefore
Also , since otherwise ; hence
The Chinese remainder theorem gives the stronger conclusion
In particular,
as required.
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.