|
This article develops the theory of integral binary quadratic forms invented by Gauss and developed by Gauss, Lagrange, and Legendre. The principal results are Theorem 8, which states that each positive integral binary quadratic form is properly equivalent to a unique reduced form, and Corollary 10, which states that for any given (negative) discriminant, there are a finite number of reduced forms of that discriminant. We also give a computational method for determining all reduced forms of a given discriminant.
An integral binary quadratic form is a quadratic form in two variables whose coefficients are integral, i.e. a polynomial
Such a form is said to represent an integer if there are
such that . If
, is said to represent properly. The form is said to be primitive if its coefficients are relatively prime (i.e.
).
We will use the terms “integral form”, “binary quadratic form”, and simply “form” interchangeably in what follows.
Using the definition of form equivalence given in the article on quadratic forms, we se that two forms and are equivalent if there is an invertible matrix
such that
Invertible matrics in
are matrices with determinant . So if
and
then if
it follows that is equivalent to .
An equivalence is a proper equivalence if the determinant of is , and an improper equivalence otherwise. If is properly equivalent to , we write .
Note that while both equivalence and proper equivalence are equivalence relations, improper equivalence is not. For if is improperly equivalent to and is improperly equivalent to , then the product of the transformation matrices has determinant , so that is properly equivalent to .
Since proper equivalence is an equivalence relation, we will say that two forms are in the same class if they are properly equivalent.
is generated as a multiplicative group by the two matrices
so in particular we see that we can construct all equivalence transformations by composing the following three transformations:
| Transformation |
Matrix |
Determinant |
 |
 |
 |
 |
 |
 |
 |
 |
 |
Example: Let
,
. Then
so
The transformations to map into are
and
Example:
and
are always improperly equivalent via the transformation
. They are sometimes properly equivalent, and sometimes not (we will see this later).
Theorem 1 If are equivalent integral quadratic forms, then and represent the same set of integers.
Proof. Write
 where
Then
 , so if  represents  , so does  . Since the matrix has determinant 1, it is invertible and its inverse is another integer matrix, so the reverse statement follows as well. 
Lemma 2 properly represents an integer if and only if is properly equivalent to a form
.
Proof.
 : It is obvious by the above that  represents  ; the problem is to show that it represents  properly. Write
 ; then
 , where
 . Then
 . But clearly
 since otherwise we cannot have
 . So  represents  properly.
 : Write  , where  . Since  , we can find integers  such that  , and then

Definition 1 If  is a binary quadratic form, its discriminant,  is  .
Note that is always either congruent to 0 or mod 4, and that is even (odd) exactly when
.
Theorem 3 If are equivalent integral quadratic forms, then
.
Proof. For any form  , define
Then
Note further that
 .
Now in our particular case, if
, then
Hence
But
 , so since
 ,

Note that this proof shows that applying a set of transformations amount to multiplying by the transform matrix on the left and its transpose on the right.
Example: In the previous example, note that
, and
.
The converse of this theorem is not true - that is, there are forms of the same discriminant that represent different numbers. For example, and
both have discriminant , yet the second form represents while the first clearly does not.
A natural question is whether we can classify forms of a given discriminant based on the numbers they represent; this investigation begins with the following theorem:
Theorem 4 Let be an odd prime. Suppose both represent and
. Then .
Proof. Since  is prime,  obviously represents  properly. So
 . Note that the transformation
 results in a form whose middle term is  , so by an appropriate choice of  we can arrange that
 . Similarly,
 with
 . Note also that since
 , it follows that
 (i.e.  have the same parity).
Since
, we see that
, so for some . Since have the same parity and is odd, is even; since
, (since otherwise would be separated by at least , which is impossible).
Thus , so and hence . 
In summary, we have proved the following:
equivalent represent the same set of integers |
|
equivalent  |
|
both represent some odd prime  |
|
Definition 2 A positive binary form is one where
 .
From this point on, we will deal only with positive forms (i.e. those with negative discriminant and with ). Some but not all of this theory applies to forms with positive discriminant.
Proposition 5 If is positive, then . If
and either or , then is positive.
Proof. If  is positive, then  , so  .
If
 , then
 . Thus if  , then
 . The proof for the case  is identical. 
Definition 3 A primitive positive form
 is reduced if
This is equivalent to saying that
 and that  can be negative only if  or  . Thus  is reduced, but  is not.
It turns out that each proper equivalence class of primitive positive forms contains a single reduced form, and thus we can understand how many classes there are of a given discriminant by studying only the reduced forms.
Theorem 6 If is a primitive positive reduced form with discriminant
,
, then the minimum value assumed by if are not both zero is . If , then this value is assumed only for
; if ; it is assumed for
and
.
Note that the reduced form of discriminant ,
, also achieves its minimum value at
.
Theorem 7 If are primitive positive reduced forms with , then .
Proof. We take the cases
 and  separately.
First assume
so we can apply the above theorem.
Since , we can write
with
. Suppose
. Now, and have the same minimum value, so .
If , then achieves its minimum only at , so
and thus
. So
and thus . Since is also reduced, and thus and .
If instead , then instead of concluding that
we can only conclude that
or
. If
, the argument carries through as above. If
, then
, so
and thus
. Thus . But then since the discriminants are equal, and thus both
. So and we are done.
Finally, in the case , we see that for any such reduced form,
, so
. Thus since otherwise the form is not reduced. So the only reduced form of discriminant is in fact
. 
Theorem 8 Every primitive positive form is properly equivalent to a unique reduced form.
Proof. We just proved uniqueness, so we must show existence. Note that I used a different method of proof in class that relied on “infinite descent” to get the result in the first paragraph below; the method here is just as good but provides less insight into how to actually reduce a form.
We first show that any such form is properly equivalent to some form satisfying
. Among all forms properly equivalent to the given one, choose
such that is as small as possible (there may be multiple such forms; choose one of them). If , then
is properly equivalent to  , and we can choose  so that
 , contradicting our choice of minimal  . So  ; similarly,  . Finally, if  , simply interchange  and  (by applying the proper equivalence
 ) to get the required form.
To finish the proof, we show that if
, where
, then is properly equivalent to a reduced form. The form is already reduced unless and either or . But in these cases, the form
is reduced, so it suffices to show that and are properly equivalent. If , then
takes
to
, while if , then
takes
to
. 
Let's see how to reduce
to
:
| Form |
Transformation |
Result |
 |
 |
 |
 |
 |
 |
| |
|
 |
| |
|
 |
 |
 |
 |
 |
 |
 |
 |
|
|
Theorem 9 If
is a positive reduced form with , then
.
Proof.
 since the form is reduced. So
 , and the result follows. 
Corollary 10 If , then the number of primitive positive reduced forms of discriminant (which, by the foregoing, is equal to the number of classes of primitive positive forms of discriminant ) is finite.
Proof. Essentially obvious. Given a reduced form of discriminant  , there are only finitely many choices for  , by the proposition. This constrains us to finitely many choices for  , since
 .  and  determine  since  is fixed. 
Examples: :
even,
. So , corresponding to , is the only reduced form of discriminant .
:
odd,
. So . This gives us
 |
|
 |
not reduced since , properly equivalent to via
 |
 |
|
 |
reduced since
 |
There are three equivalence classes of positive reduced forms with discriminant .
:
, so is odd,
. So
or . So the forms are
 |
|
 |
not reduced since , properly equivalent to via
 |
 |
|
 |
reduced since
 |
 |
|
 |
not reduced since , equivalent to via
 |
There are four classes of forms of discriminant .
:
odd,
. So
, and
, so
. Since , we must have ; thus and thus we get only
. But is properly equivalent to via
, so there is only one equivalence class of positive reduced forms with discriminant .
|