How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Positive Definite Binary Quadratic Forms and Reduction
1 · Prerequisites
- Binary Operations, Monoids, Groups and Subgroups
- Congruences, the Integers Modulo n and the Chinese Remainder Theorem
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Matrices, the Matrix of a Linear Map, and Change of Basis
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- The ZFC Axioms and the Basic Set Constructions
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Summary
Integral binary quadratic forms are the ternary coefficient data behind , and this page studies how much of that data survives unimodular change of variables. The background actually used here is arithmetic rather than geometry: gcd language separates primitive forms from primitive representations, congruences modulo an integer classify discriminants and encode the discriminant-square criterion, and basic matrix multiplication makes substitution by a genuine right action.
The page defines discriminant, principal form, proper equivalence, positive definiteness, reduced form, and form class number. It proves that proper equivalence preserves represented integers and discriminant, identifies positive-definite forms by the sign conditions and , and shows that every positive-definite class has one reduced representative and no more. From there it bounds the leading coefficient of a reduced form in terms of the discriminant, deduces that each negative discriminant has only finitely many positive-definite classes, and turns reduction plus uniqueness into a decision procedure for proper equivalence.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Integral binary quadratic forms
Definition
An integral binary quadratic form is a homogeneous polynomial
with coefficients . We also denote this form by the triple
The coefficient of is written as , not .
Remarks
- The variables are two independent integer variables, so "binary" refers to the number of variables and "quadratic" to the total degree.
- Later items pass freely between the polynomial notation and the coefficient notation .
Integers represented, and primitively represented, by a binary quadratic form
Definition
Let be an integral binary quadratic form (Integral binary quadratic forms) and let .
We say that represents when there exist integers such that
We say that primitively represents when there exist integers with
(Common divisor, and the greatest common divisor , with the convention ).
Remarks
- Primitive representation is a condition on the representing pair , not on the coefficients of the form.
- A form can represent an integer without primitively representing it.
Primitive binary quadratic forms
Definition
An integral binary quadratic form (Integral binary quadratic forms) is primitive when the only integers dividing all three coefficients , , and are and .
Equivalently, is primitive when there is no positive integer greater than dividing all three coefficients simultaneously.
Remarks
- Primitive forms and primitive representations are different notions: Integers represented, and primitively represented, by a binary quadratic form concerns the pair , whereas this definition concerns the coefficient triple .
- The word "primitive" here is invariant under changing all three coefficients by a common sign.
The discriminant of a binary quadratic form
Definition
The discriminant of the integral binary quadratic form
is the integer
When the form is clear from context, we also write its discriminant as .
An integer is the discriminant of an integral binary quadratic form exactly when it is congruent to or modulo
Statement
An integer is the discriminant of an integral binary quadratic form if and only if
Facts & Assumptions
Given: An integer .
The discriminant of is (The discriminant of a binary quadratic form).
means that divides (Congruence modulo an integer: when , including the moduli and ).
Congruent integers may be added, subtracted, and multiplied (Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations).
Proof
Suppose is the discriminant of some integral form, say . Then .
If , then is an integral binary quadratic form and its discriminant is .
If , then is an integral binary quadratic form and its discriminant is .
If is even, then ; if is odd, then . Hence every discriminant is congruent to or modulo .
Step 2.1 proves the forward implication, while steps 1.2 and 1.3 prove the converse in the two possible congruence classes.
The principal binary quadratic form of a discriminant
Definition
Let be an integer with or (An integer is the discriminant of an integral binary quadratic form exactly when it is congruent to or modulo ).
The principal binary quadratic form of discriminant is
By the preceding proposition, both coefficient triples are integral in their respective cases, and by direct calculation each has discriminant .
Remarks
- This is terminology only: no class-group structure is asserted here.
- Later examples identify the principal form explicitly at small discriminants, such as at and at .
Proper equivalence of binary quadratic forms
Definition
Let and be integral binary quadratic forms. We say that and are properly equivalent when there exists a matrix
such that
for all integers .
When this holds we also write
Remarks
- The determinant condition is , so proper equivalence uses only orientation-preserving unimodular substitutions.
- On the companion page, an example shows that allowing determinant can merge two distinct proper-equivalence classes.
Integral substitution defines a right action of on integral binary quadratic forms
Statement
For an integral binary quadratic form and matrices , the substitution notation of Proper equivalence of binary quadratic forms satisfies
Thus integral substitution defines a right action of on integral binary quadratic forms.
Facts & Assumptions
Given: An integral binary quadratic form and matrices .
Proper equivalence is defined by the substitution for a determinant-one integer matrix (Proper equivalence of binary quadratic forms).
Matrix multiplication is associative, and identity matrices act as units on either side whenever the shapes are compatible (Matrix multiplication is associative, unital, distributive, and compatible with scalar multiplication).
Proof
If is the identity matrix, then for all , so .
Write and . Then , which is exactly by the definition of matrix multiplication.
The coefficients of are , , and , hence are integers. Therefore the substitutions stay inside the set of integral binary quadratic forms, and steps 1.1 and 1.2 are precisely the right-action axioms.
Properly equivalent binary quadratic forms represent the same integers, with primitive representations in bijection
Statement
Let and be integral binary quadratic forms. If and are properly equivalent, then:
- and represent exactly the same integers.
- Primitive representations correspond bijectively: for each integer , a pair with satisfies if and only if the pair has relatively prime coordinates and satisfies , where .
Facts & Assumptions
Given: Integral binary quadratic forms and , an integer , and a matrix with .
Proper equivalence means for all integers (Proper equivalence of binary quadratic forms).
The form represents when for some integers , and it primitively represents when moreover (Integers represented, and primitively represented, by a binary quadratic form).
Integral substitution defines a right action of on integral binary quadratic forms (Integral substitution defines a right action of on integral binary quadratic forms).
Proof
If , then by [F1], so every representation of by yields a representation of by .
Since , the inverse matrix is . By [L1], , so . Applying step 1.1 to and gives the converse implication. Therefore and represent exactly the same integers.
Let and . If and an integer divides both and , then divides and , so . The same argument with gives the converse, so the correspondence of steps 1.1 and 2.1 restricts to a bijection on primitive representations.
Proper equivalence preserves discriminant and primitivity of the form
Statement
Let and be properly equivalent integral binary quadratic forms. Then:
- and have the same discriminant.
- is primitive if and only if is primitive.
Facts & Assumptions
Given: Integral binary quadratic forms and , and a matrix with .
Proper equivalence means for a determinant-one integer matrix (Proper equivalence of binary quadratic forms).
The discriminant of is (The discriminant of a binary quadratic form).
The form is primitive when the only integers dividing all three coefficients are and (Primitive binary quadratic forms).
Integral substitution defines a right action of on integral binary quadratic forms (Integral substitution defines a right action of on integral binary quadratic forms).
Proof
Expanding gives , , and . A direct simplification yields , since . Thus and have the same discriminant.
Suppose an integer divides , , and . Then the formulas of step 1.1 show that also divides , , and .
Since , the inverse matrix is integral and lies in . By [L1], , so the same argument as in step 2.1 with shows that every common divisor of , , and also divides , , and .
Steps 2.1 and 3.1 show that and have exactly the same common divisors. Therefore one form is primitive exactly when the other is, by [F3].
A positive integer is primitively represented by some discriminant form exactly when is a square modulo
Statement
Let be a positive integer and let . Then the following are equivalent:
- some integral binary quadratic form of discriminant primitively represents ;
- is a square modulo .
Facts & Assumptions
Given: A positive integer and an integer .
A form primitively represents when for some integers with (Integers represented, and primitively represented, by a binary quadratic form).
The discriminant of is (The discriminant of a binary quadratic form).
Proper equivalence means substitution by a determinant-one integer matrix, and properly equivalent forms have the same discriminant (Proper equivalence of binary quadratic forms, Proper equivalence preserves discriminant and primitivity of the form).
if and only if for some integers ( and are coprime if and only if for some integers ; and in that case the only common divisors of and are and ).
means that divides (Congruence modulo an integer: when , including the moduli and ).
Proof
Suppose a form of discriminant primitively represents , say with . By [L1] choose integers with , and put .
Conversely, suppose for some integer . Then divides , so is an integer. The form has discriminant , and with , so it primitively represents .
The properly equivalent form has leading coefficient , so for some integers . By [F3], has the same discriminant , hence , which says exactly that .
Step 2.1 proves that primitive representation implies the square congruence, and step 1.2 proves the converse.
Positive-definite binary quadratic forms
Definition
An integral binary quadratic form (Integral binary quadratic forms) is positive definite when
for every real pair .
Remarks
- The condition is about positivity on , not only on .
- The next proposition turns this intrinsic condition into the coefficient test and .
An integral binary quadratic form is positive definite exactly when its leading coefficient is positive and its discriminant is negative
Statement
Let be an integral binary quadratic form, and let be its discriminant. Then is positive definite if and only if
Facts & Assumptions
Given: The integral binary quadratic form and its discriminant .
A form is positive definite when for every real pair (Positive-definite binary quadratic forms).
The discriminant is (The discriminant of a binary quadratic form).
Proof
Suppose is positive definite. Then by [F1].
Conversely, suppose and . For every real one has by direct expansion.
If and , then and because .
Also , so [F1] gives . Multiplying by from step 1.1 yields , hence .
If and , then step 1.2 gives because both summands are nonnegative and the second is positive.
Steps 2.2 and 1.3 cover every nonzero real pair, so is positive definite by [F1]. Together with steps 1.1 and 2.1, this proves the criterion.
Reduced positive-definite binary quadratic forms
Definition
A positive-definite binary quadratic form (Positive-definite binary quadratic forms) is reduced when
and, in the two boundary cases, the middle coefficient is required to be nonnegative:
Remarks
- The inequalities alone are not enough for uniqueness: the sign convention at the boundary removes the duplicate reduced representatives.
- The definition applies only to positive-definite forms; the companion page records that the indefinite theory uses a different convention and does not have uniqueness.
A non-reduced positive-definite form admits an equivalent positive-definite form with smaller reduction measure
Statement
Let be a positive-definite integral binary quadratic form that is not reduced. Define its reduction measure
where when whenever or , and otherwise. Then there exists a properly equivalent positive-definite form with
Facts & Assumptions
Given: A positive-definite integral binary quadratic form that is not reduced.
Proper equivalence is substitution by a determinant-one integer matrix (Proper equivalence of binary quadratic forms).
Proper equivalence preserves the discriminant, and hence preserves primitivity as well (Proper equivalence preserves discriminant and primitivity of the form).
A form is positive definite exactly when its leading coefficient is positive and its discriminant is negative (An integral binary quadratic form is positive definite exactly when its leading coefficient is positive and its discriminant is negative).
A positive-definite form is reduced exactly when and whenever or (Reduced positive-definite binary quadratic forms).
Proof
Since is positive definite, [F3] gives and .
If or if and , let . This matrix lies in , so is properly equivalent to ; by [F2] and [F3] it is again positive definite because its leading coefficient is and its discriminant is still . Its measure satisfies because gives a drop of at least , and when with the boundary defect disappears so .
Assume now that step 2.1 does not apply. Then and, because is not reduced, one must have . Choose the unique integer for which lies in , and let , where .
The new form is properly equivalent to , so it has the same discriminant by [F2]; its leading coefficient is still , so [F3] makes it positive definite. Also , hence , with strict inequality when .
If , then , so step 4.1 gives . In this case : if there is no boundary defect, while if then step 2.1 was excluded and therefore .
If , then step 2.1 is excluded, so and the only way can occur is . Then the chosen residue is , so and the boundary defect disappears: . Hence again .
If and , then , so already satisfies the reduced-form boundary sign conditions and . Therefore
If and , then step 5.1 gives because otherwise and would force , contradicting . If , then and If instead , let . Then is properly equivalent to , still positive definite, and , so again
If and , let . Then is properly equivalent to and positive definite. Since and ,
Step 2.1 covers the case or with ; steps 6.1, 6.2, and 6.3 cover the remaining case ; and step 5.2 covers the case with . Therefore every non-reduced positive-definite form is properly equivalent to a positive-definite form of smaller reduction measure.
Every positive-definite integral binary quadratic form is properly equivalent to a reduced form
Statement
Every positive-definite integral binary quadratic form is properly equivalent to a reduced form.
Facts & Assumptions
Given: A positive-definite integral binary quadratic form .
A positive-definite form is reduced exactly when it satisfies the inequalities and boundary sign condition of Reduced positive-definite binary quadratic forms.
If a positive-definite form is not reduced, then some properly equivalent positive-definite form has strictly smaller reduction measure (A non-reduced positive-definite form admits an equivalent positive-definite form with smaller reduction measure).
Every nonempty subset of has a least element (The well-ordering principle).
Proof
Let be the set of reduction measures of the positive-definite forms properly equivalent to . The set is nonempty because it contains the measure of , and .
By [L2], the set has a least element. Choose a positive-definite form properly equivalent to whose reduction measure is that least element.
If were not reduced, [L1] would produce a properly equivalent positive-definite form with strictly smaller reduction measure. Since is properly equivalent to and is properly equivalent to , the form is also properly equivalent to , so its measure lies in , contradicting the choice of .
Therefore is reduced, and it is properly equivalent to by construction.
The leading coefficient of a reduced positive-definite form is minimal in its proper-equivalence class
Statement
Let be a reduced positive-definite binary quadratic form, and let be any form properly equivalent to . Then the leading coefficient of is at least .
Facts & Assumptions
Given: A reduced positive-definite form and a matrix such that .
A reduced positive-definite form satisfies (Reduced positive-definite binary quadratic forms).
Proper equivalence means (Proper equivalence of binary quadratic forms).
Primitive representation means representation by a pair of coprime integers (Integers represented, and primitively represented, by a binary quadratic form).
Proof
Since is positive definite, . Also the leading coefficient of is .
Because , every common divisor of and divides , so . Thus the integer is primitively represented by .
Using from [F1], we have .
If , then because , so . If , then . Hence in all cases .
Combining steps 1.1, 2.1, and 3.1 gives . So the leading coefficient of is at least .
Properly equivalent reduced forms with the same leading coefficient are equal
Statement
Let and be reduced positive-definite binary quadratic forms. If and are properly equivalent, then .
Facts & Assumptions
Given: Reduced positive-definite forms and , and a matrix with .
Proper equivalence means (Proper equivalence of binary quadratic forms).
Reduced forms satisfy and , with whenever or , and similarly for (Reduced positive-definite binary quadratic forms).
The discriminant of is (The discriminant of a binary quadratic form).
Proof
The leading coefficient of is , and because one has . Since has leading coefficient exactly , equality holds throughout.
Equality in step 1.1 forces , so is one of , , or .
If , then and . The determinant condition gives and . The transformed middle coefficient is when and when , so and force unless and . But the boundary rule in [F2] forbids for a reduced form, so , hence and .
If , then and . Equality in step 1.1 gives , so reducedness of yields . The determinant condition gives , so , and direct substitution gives . Since is reduced, . If , then , and reducedness of with forces ; together with this gives , hence . If , then the same bound implies , so and ; because , this means , and the sign of shows . Then .
If , equality in step 1.1 forces and . By reducedness, . Replacing by if necessary does not change the substitution, so we may assume . Then , and the transformed middle coefficient is . Since , one has or ; reducedness excludes , so and . The discriminant identity then gives , so again .
The three cases of step 2.1 are exhaustive, and each yields . Therefore properly equivalent reduced forms with the same leading coefficient are equal.
Each proper-equivalence class of positive-definite integral binary quadratic forms contains exactly one reduced form
Statement
Each proper-equivalence class of positive-definite integral binary quadratic forms contains exactly one reduced form.
Facts & Assumptions
Given: A positive-definite integral binary quadratic form .
Every positive-definite integral binary quadratic form is properly equivalent to a reduced form (Every positive-definite integral binary quadratic form is properly equivalent to a reduced form).
In a reduced class, the leading coefficient is minimal among all properly equivalent forms (The leading coefficient of a reduced positive-definite form is minimal in its proper-equivalence class).
Properly equivalent reduced forms with the same leading coefficient are equal (Properly equivalent reduced forms with the same leading coefficient are equal).
Proof
By [L1], the proper-equivalence class of contains at least one reduced form.
Suppose and are reduced forms properly equivalent to . Then and are properly equivalent to each other. Applying [L2] first to against and then to against shows that their leading coefficients are equal.
With equal leading coefficients, [L3] gives . So the reduced representative is unique.
Existence from step 1.1 and uniqueness from step 3.1 prove the theorem.
A reduced positive-definite form of discriminant satisfies
Statement
Let be a reduced positive-definite binary quadratic form with discriminant . Then
Facts & Assumptions
Given: A reduced positive-definite form with discriminant .
Reduced forms satisfy (Reduced positive-definite binary quadratic forms).
The discriminant of is (The discriminant of a binary quadratic form).
Positive-definite forms have negative discriminant (An integral binary quadratic form is positive definite exactly when its leading coefficient is positive and its discriminant is negative).
Proof
From we get .
Since the form is positive definite, [L1] gives , so . Using step 1.1 yields .
Therefore , and since for a positive-definite form, taking square roots gives .
For each negative discriminant, there are only finitely many proper-equivalence classes of positive-definite integral binary quadratic forms
Statement
For every negative integer , there are only finitely many proper-equivalence classes of positive-definite integral binary quadratic forms of discriminant .
Facts & Assumptions
Given: A negative integer .
Each proper-equivalence class of positive-definite integral binary quadratic forms contains exactly one reduced form (Each proper-equivalence class of positive-definite integral binary quadratic forms contains exactly one reduced form).
A reduced positive-definite form of discriminant satisfies (A reduced positive-definite form of discriminant satisfies ).
Proof
By [L1], it is enough to show that only finitely many reduced forms have discriminant .
If is reduced with discriminant , then by [L2], so only finitely many positive integers can occur.
For each such , reducedness gives , so only finitely many integers can occur. Once and are fixed, the discriminant equation determines uniquely. Therefore only finitely many reduced triples have discriminant .
Hence there are only finitely many proper-equivalence classes of positive-definite integral binary quadratic forms of discriminant .
The class number of primitive positive-definite binary quadratic forms of discriminant
Definition
Let be an integer with or . The binary quadratic form class number is the number of proper-equivalence classes of primitive positive-definite integral binary quadratic forms of discriminant .
This number is finite by For each negative discriminant, there are only finitely many proper-equivalence classes of positive-definite integral binary quadratic forms, since primitive positive-definite forms of discriminant are a subclass of all positive-definite forms of discriminant .
Remarks
- The adjective "form" matters: later pages may compare this quantity with class numbers defined through ideals in quadratic orders.
- The companion page computes , , , and by enumerating reduced representatives.
Proper equivalence of positive-definite integral binary quadratic forms is decidable
Statement
There is an algorithm to decide whether two positive-definite integral binary quadratic forms are properly equivalent: reduce both forms, and compare the two reduced triples.
Facts & Assumptions
Given: Positive-definite integral binary quadratic forms and .
Every positive-definite integral binary quadratic form is properly equivalent to a reduced form (Every positive-definite integral binary quadratic form is properly equivalent to a reduced form).
Each proper-equivalence class contains exactly one reduced form (Each proper-equivalence class of positive-definite integral binary quadratic forms contains exactly one reduced form).
Proof
By [L1], choose reduced forms and properly equivalent to and , respectively.
If and are properly equivalent, then and lie in the same proper-equivalence class, so [L2] gives .
Conversely, if , then and are both properly equivalent to that same reduced form, hence are properly equivalent to each other.
Therefore and are properly equivalent exactly when their reduced representatives are equal. Since equality of two explicit coefficient triples is decidable, proper equivalence is decidable.
5 · Examples, counterexamples and false statements
None yet.
Sources
- William Stein, Elementary Number Theory and Elliptic Curves, Chapter 9
- Andrew Granville, Binary Quadratic Forms, Chapter 4
- William Stein, Elementary Number Theory and Elliptic Curves, Definition 9.4.2
- William Stein, Elementary Number Theory and Elliptic Curves, Definition 9.2.6
- William Stein, Elementary Number Theory and Elliptic Curves, Proposition 9.2.9
- William Stein, Elementary Number Theory and Elliptic Curves, Definition 9.2.10
- William Stein, Elementary Number Theory and Elliptic Curves, Definition 9.2.2
- William Stein, Elementary Number Theory and Elliptic Curves, Proposition 9.2.3
- Andrew Granville, Binary Quadratic Forms, Exercise 4.1d
- William Stein, Elementary Number Theory and Elliptic Curves, Proposition 9.2.4
- William Stein, Elementary Number Theory and Elliptic Curves, Proposition 9.2.8
- Andrew Granville, Binary Quadratic Forms, Proposition 4.1
- William Stein, Elementary Number Theory and Elliptic Curves, Section 9.2.4
- William Stein, Elementary Number Theory and Elliptic Curves, Definition 9.3.1
- William Stein, Elementary Number Theory and Elliptic Curves, Section 9.3.2
- Andrew Granville, Binary Quadratic Forms, algorithm (4.1.1)
- William Stein, Elementary Number Theory and Elliptic Curves, Theorem 9.3.2
- Andrew Granville, Binary Quadratic Forms, Exercise 4.1e
- Andrew Granville, Binary Quadratic Forms, Exercise 4.1f(a)
- Andrew Granville, Binary Quadratic Forms, Exercise 4.1f(b)
- Andrew Granville, Binary Quadratic Forms, Exercise 4.1f(c)
- William Stein, Elementary Number Theory and Elliptic Curves, proof of Proposition 9.4.1
- William Stein, Elementary Number Theory and Elliptic Curves, Proposition 9.4.1
- William Stein, Elementary Number Theory and Elliptic Curves, Definition 9.4.3
- Andrew Granville, Binary Quadratic Forms, Exercises 4.1e-4.1g