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 .