For negative discriminant , a reduced positive definite binary quadratic form satisfies and odd with . Checking leaves only under the boundary convention. The reduction algorithm for a positive definite binary quadratic form therefore puts every form in this one proper equivalence of binary quadratic forms class. Its unimodular shears give infinitely many distinct forms .
Use the standard reduced-form convention , with when or . To reduce a positive definite integral binary quadratic form, choose a primitive integer vector at which the positive integer value is least. Complete that vector to a unimodular basis; it makes the leading coefficient that least value. A shear of the second basis vector by an integer multiple of the first replaces by , allowing . The new is the value at another primitive vector, hence . If , a shear makes without changing ; if and , the determinant-one swap reverses its sign. Thus every form is properly equivalent to a reduced positive definite binary quadratic form. This argument also gives the reduction algorithm for a positive definite binary quadratic form by successively decreasing its positive leading coefficient.
For a negative integral discriminant or , a prime is represented by some integral form of discriminant exactly when
Indeed a representing vector is primitive, since a common divisor of its coordinates would have its square divide . A unimodular change takes it to the first basis vector, giving a form and . Conversely a solution gives the positive definite form , which represents at . For odd this is the discriminant criterion for prime representation by a binary quadratic form: must be a square modulo , with parity chosen to satisfy the modulo-four condition.
For and odd , the Legendre symbol is . The supplementary laws make it positive exactly for . The prime also works directly, since has discriminant and represents . Therefore
The class here consists only of the prime .
For a reduced form, , so . The integer checks yield the reduced forms of discriminant minus thirty-two:
If one omits the boundary sign convention, also appears, but is properly equivalent to . The middle form is imprimitive and represents no odd integer. An odd integer represented by has odd and is . For to be odd, one of must be odd and the other even; substitution modulo eight gives in either case. If both are odd or both even, the value is even. Thus a prime represented by the last form is necessarily .
Conversely, a prime is represented by some discriminant- form, which reduces to one of the three displayed forms without changing its represented integers. The first and second cannot represent it, so the third must. Consequently
The prime is not an exception for this particular form: its minimum positive value is , as also follows from .
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
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
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.
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