Fact-checked by Grok 2 weeks ago

Binary quadratic form

A binary quadratic form is a homogeneous polynomial of degree two in two variables, most commonly expressed as f(x, y) = ax^2 + bxy + cy^2, where a, b, and c are integers. The discriminant of such a form, defined as d = b^2 - 4ac, plays a central role in its classification and properties, determining whether the form is positive definite, negative definite, or indefinite based on the sign and nature of d. Binary quadratic forms are fundamental objects in , particularly in the study of quadratic fields and the representation of integers. Two forms are considered if one can be transformed into the other via a given by an element of the \mathrm{SL}(2, \mathbb{Z}), which preserves the and leads to the notion of equivalence classes under the action of this group. The set of equivalence classes of forms with a fixed discriminant forms the class group, whose order is the class number, connecting binary quadratic forms to the of the in quadratic fields. The systematic theory of binary quadratic forms was developed by in his 1801 work , particularly in Section V, where he introduced composition laws for forms and applied them to problems like determining which primes can be represented by specific forms, such as sums of two squares. Gauss's framework also laid the groundwork for genus theory, which classifies forms into genera based on local conditions modulo primes, providing insights into the distribution of represented integers. These forms have since found applications in solving Diophantine equations, computing class numbers, and understanding the arithmetic of quadratic extensions, with ongoing research exploring generalizations to other rings and fields.

Definition and Properties

Formal definition

A binary quadratic form is a homogeneous quadratic polynomial in two variables, expressed as
f(x, y) = ax^2 + bxy + cy^2,
where a, b, and c are integers.\ This expression arises naturally in number theory, where the focus lies on integer coefficients to facilitate the analysis of Diophantine problems and integer representations.\
Such forms are frequently taken to be primitive, meaning that the coefficients satisfy \gcd(a, b, c) = 1.$$](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) Although binary quadratic forms with real coefficients are considered in more general algebraic contexts, the integer case predominates in applications like solving Pell equations and studying class numbers of quadratic fields.[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) Geometrically, the equation f(x, y) = k for a fixed nonzero k traces a conic section in the , providing a link to classical without delving into projective transformations.\ Common notation for the form includes the (a, b, c) or the explicit ax^2 + bxy + cy^2.[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) The b^2 - 4ac serves as an important under certain transformations, with further properties explored elsewhere.\

Discriminant

The discriminant of a binary quadratic form f(x, y) = ax^2 + bxy + cy^2 with integer coefficients a, b, and c is defined by the formula [ d = b^2 - 4ac. $$](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html)\[](https://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf)\[](https://warwick.ac.uk/fac/sci/maths/people/staff/michaud/thirdyearessay.pdf) This quantity arises naturally from the symmetric matrix representation of the form, \[ f(x, y) = \begin{pmatrix} x & y \end{pmatrix} \begin{pmatrix} a & b/2 \\ b/2 & c \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}, where the determinant of the matrix M = \begin{pmatrix} a & b/2 \\ b/2 & c \end{pmatrix} satisfies \det(M) = ac - (b/2)^2 = -d/4, so d = -4 \det(M).$$](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html) For integral binary quadratic forms, the discriminant d is always an integer and satisfies d \equiv 0 \pmod{4} or d \equiv 1 \pmod{4}, specifically d \equiv b^2 \pmod{4}.[](https://warwick.ac.uk/fac/sci/maths/people/staff/michaud/thirdyearessay.pdf)\[](https://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) A form is called primitive if \gcd(a, b, c) = 1; in this case, the discriminant is a fundamental discriminant, meaning d is square-free when d \equiv 1 \pmod{4}, or d/4 is square-free and congruent to 2 or 3 modulo 4 when d \equiv 0 \pmod{4}.[](https://metaphor.ethz.ch/x/2019/fs/401-4110-19L/sc/modform.pdf)\[](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html) Although the theory of binary quadratic forms focuses on integer coefficients, forms over the rationals or reals are also considered, where the discriminant retains its formula and role as an invariant under linear transformations with determinant 1. Over the reals, d acts as a complete invariant under the action of \mathrm{SL}(2, \mathbb{R}), distinguishing the isomorphism classes of such forms.[](https://www.ams.org/bookstore/pspdf/dol-52-prev.pdf)

Classification by sign

Binary quadratic forms are classified according to the sign of their discriminant d = b^2 - 4ac. When d < 0, the form is definite; specifically, if a > 0, it is positive definite, meaning ax^2 + bxy + cy^2 > 0 for all integers x, y not both zero.[](https://dummit.cos.northeastern.edu/teaching_sp21_4527/4527_lecture_35_binary_quadratic_forms.pdf) This property arises because the associated quadratic form matrix has negative discriminant and positive leading coefficient, ensuring all eigenvalues are positive.[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) Conversely, if a < 0, the form is negative definite, with ax^2 + bxy + cy^2 < 0 for all nonzero integer pairs (x, y).[](https://crypto.stanford.edu/pbc/notes/numbertheory/form.html) Positive and negative definite forms are essentially equivalent up to sign change and thus share similar theoretical structures, though positive definite forms are more commonly studied in applications requiring minima.[](https://www.math.uni-bonn.de/people/toma/notes/BA-korrigiert.pdf) When d > 0, the form is indefinite, taking both positive and negative values over nonzero integers.[](https://kimballmartin.github.io/ntii/chap4.pdf) The matrix has one positive and one negative eigenvalue, allowing the quadratic expression to change sign depending on the direction in the plane. Indefinite forms are connected to real quadratic fields and exhibit infinite automorphism groups generated by units, which correspond to solutions of associated Pell-like equations.[](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html) For the degenerate case where d = 0, the form factors as the square of a , such as (x + y)^2 = x^2 + 2xy + y^2, and is neither definite nor indefinite in the usual sense.[](https://kimballmartin.github.io/ntii/chap4.pdf) These forms represent zero nontrivially and have one, limiting their role in number-theoretic applications compared to nondegenerate cases. The has significant implications: positive definite forms attain a global positive minimum over lattices, facilitating their use in optimization problems like , where Voronoi's algorithm enumerates perfect forms to find dense lattice packings.[](https://www.universiteitleiden.nl/binaries/content/assets/science/mi/scripties/master/2017-2018/msc-scriptie-wpj-van-woerden.pdf) Indefinite forms, by contrast, lack such bounded minima but feature hyperbolic dynamics tied to continued fractions and infinite units, influencing and ideal class groups in orders.[](https://www.sciencedirect.com/science/article/pii/0022314X70900661) This distinction, first systematized by Gauss, underpins much of the arithmetic theory of quadratic forms.

Equivalence and Automorphisms

Equivalence relations

Two binary quadratic forms f(x, y) = ax^2 + bxy + cy^2 and g(x, y) = a'x^2 + b'xy + c'y^2 with coefficients are properly equivalent, denoted f \sim g, if there exists a \begin{pmatrix} p & q \\ r & s \end{pmatrix} \in \mathrm{SL}(2, \mathbb{Z}) (i.e., with entries and ps - qr = 1) such that [ g(x, y) = f(px + qy, rx + sy). [](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf)[](https://www.maths.gla.ac.uk/~abartel/docs/binquad.pdf) This relation is an [equivalence relation](/page/Equivalence_relation) on the set of binary quadratic forms, partitioning them into equivalence classes.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) A broader notion is **improper equivalence**, which allows matrices in $\mathrm{GL}(2, \mathbb{Z})$ with [determinant](/page/Determinant) $\pm [1](/page/1)$, thereby including orientation-reversing transformations such as reflections.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) This equivalence is also reflexive, symmetric, and transitive, and it refines the proper equivalence classes by potentially merging pairs related by [determinant](/page/Determinant) $-[1](/page/1)$.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) Under both proper and improper [equivalence](/page/Equivalence), the [discriminant](/page/Discriminant) $d = b^2 - 4ac$ is preserved, since a [change of variables](/page/Change_of_variables) by a [matrix](/page/Matrix) with [determinant](/page/Determinant) $\pm 1$ multiplies the [discriminant](/page/Discriminant) by $(\det M)^2 = 1$. Thus, equivalent forms share the same [discriminant](/page/Discriminant), which serves as a complete [invariant](/page/Invariant) for coarse classification but not for distinguishing within the same $d$.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) The [equivalence](/page/Equivalence) classes are precisely the orbits of binary quadratic forms under the natural action of $\mathrm{SL}(2, \mathbb{Z})$ (for proper [equivalence](/page/Equivalence)) or $\mathrm{GL}(2, \mathbb{Z})$ (for improper [equivalence](/page/Equivalence)) via linear substitutions.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf)[](https://www.maths.gla.ac.uk/~abartel/docs/binquad.pdf) For a fixed [discriminant](/page/Discriminant) $d$, there may be multiple distinct classes; for example, with $d = -24$, the forms $2x^2 + 3y^2$ and $x^2 - 2xy + 7y^2$ are properly inequivalent, as the former does not represent 1 while the latter does at $(x, y) = (1, 0)$.[](https://www.maths.gla.ac.uk/~abartel/docs/binquad.pdf) Similarly, for $d = -15$, the forms $x^2 + xy + 4y^2$ and $2x^2 + xy + 2y^2$ belong to different proper [equivalence](/page/Equivalence) classes.[](https://www.maths.gla.ac.uk/~abartel/docs/binquad.pdf) ### Automorphism group The [automorphism group](/page/Automorphism_group) of a binary quadratic form $f(x, y) = ax^2 + bxy + cy^2$ with [integer](/page/Integer) coefficients consists of all matrices $M \in \mathrm{SL}(2, \mathbb{Z})$ such that $f(M \begin{pmatrix} x \\ y \end{pmatrix}) = f(x, y)$ for all [integers](/page/Integer) $x, y$. These matrices, called automorphs of $f$, preserve the form under [integer](/page/Integer) linear substitutions and form a finite or infinite group depending on the sign of the [discriminant](/page/Discriminant) $\Delta = b^2 - 4ac$. This group is precisely the [stabilizer](/page/Stabilizer) of $f$ under the natural action of $\mathrm{SL}(2, \mathbb{Z})$ on the space of binary quadratic forms.[](https://swc-math.github.io/aws/2009/09HankeNotes.pdf)[](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html) For positive definite forms, where $\Delta < 0$, the [automorphism group](/page/Automorphism_group) is always finite. It is trivial (isomorphic to $\mathbb{Z}/2\mathbb{Z}$, generated by the identity and $-\mathrm{id}$) except in the special cases $\Delta = -3$ and $\Delta = -4$, where it is isomorphic to $\mathbb{Z}/6\mathbb{Z}$ and $\mathbb{Z}/4\mathbb{Z}$, respectively. For example, the form $x^2 + y^2$ ($\Delta = -4$) has automorphs including the 90-degree rotation matrix $\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$ and its powers, alongside negation, yielding the full cyclic group of order 4. These finite groups arise because automorphs must map the form's values to an ellipsoid bounded by a finite set of integral points, limiting possible transformations.[](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html)[](http://math.gsu.edu.tr/azeytin/pdfs/bqf.pdf) In contrast, for indefinite forms with $\Delta > 0$, the automorphism group is infinite, typically isomorphic to $\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}$. The infinite cyclic component is generated by a fundamental automorph whose entries solve a Pell-like equation of the form $u^2 - d v^2 = \pm 4$, where $d = \Delta/4$ if $\Delta \equiv 0 \pmod{4}$ or $d = \Delta$ otherwise; higher powers of this generator produce infinitely many distinct automorphs. This structure reflects the units of the corresponding order in the real quadratic field $\mathbb{Q}(\sqrt{d})$, with the $\mathbb{Z}/2\mathbb{Z}$ factor accounting for the sign change via $-\mathrm{id}$. For instance, the form $x^2 - 2y^2$ ($\Delta = 8$) has automorphs generated by solutions to $u^2 - 2v^2 = \pm 4$, starting from the fundamental unit $(u, v) = (3, 2)$.[](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html)[](http://math.gsu.edu.tr/azeytin/pdfs/bqf.pdf)[](https://arxiv.org/abs/0804.0725) ## Reduction and Class Structure ### Reduction procedure The reduction procedure for binary quadratic forms aims to transform a given form into a canonical representative within its [equivalence class](/page/Equivalence_class) under SL(2, ℤ) actions, facilitating the study of class structure. For positive definite forms ([discriminant](/page/Discriminant) d < 0), Gauss developed an algorithm that yields a unique reduced form per proper equivalence class.[](https://arxiv.org/pdf/1502.06289) A positive definite binary quadratic form $ ax^2 + bxy + cy^2 $ with $ a > 0 $, $ c > 0 $, and d = b² - 4ac < 0 is reduced if it satisfies |b| ≤ a ≤ c, and additionally b ≥ 0 whenever |b| = a or a = c.[](https://math.hawaii.edu/~kmanguba/mastersproject.pdf) This ensures the form is in a fundamental domain for the action of [SL](/page/SL)(2, ℤ). The algorithm iteratively applies unimodular transformations to achieve these inequalities, terminating because each step decreases the value of a + c until bounded by √|d|/3.[](https://arxiv.org/pdf/1502.06289) The step-by-step Gauss reduction algorithm proceeds as follows: 1. If a > c, interchange a and c while replacing b with -b (applying the [transformation matrix](/page/Transformation_matrix) $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$). 2. Compute k = round(b / (2a)), the [integer](/page/Integer) closest to b/(2a). Apply the shear transformation $\begin{pmatrix} 1 & k \\ 0 & 1 \end{pmatrix}$, which updates the coefficients to a' = a, b' = b - 2ka, c' = c - bk + ak². 3. Repeat steps 1 and 2 until |b| ≤ a ≤ c and the sign condition on b holds. If after step 2, a > c, return to step 1. This process is computationally efficient, running in O(log |d|) steps since the coefficients decrease rapidly, with each iteration bounded by the discriminant magnitude.[](https://crypto.stanford.edu/pbc/notes/numbertheory/form.html) For example, starting with the form 2x² + 3xy + 3y² (d = -15), apply step 2 with k = 1: new b' = 3 - 4 = -1, c' = 3 - (3)(1) + 2(1)² = 2. The form becomes 2x² - xy + 2y². Now a = 2 = c, but |b| = 1 ≤ 2. Apply the negation transformation (matrix $\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$) to make b ≥ 0, yielding the [reduced form](/page/Reduced_form) 2x² + xy + 2y².[](https://math.hawaii.edu/~kmanguba/mastersproject.pdf) For indefinite forms (d > 0, not a square), reduction differs due to the [hyperbolic geometry](/page/Hyperbolic_geometry) of the action, producing a [cycle](/page/Cycle) of reduced forms rather than a single unique one per proper [equivalence class](/page/Equivalence_class); however, a [canonical](/page/Canonical) representative can be selected from the [cycle](/page/Cycle). A form ax² + bxy + cy² is reduced if 0 < b < √d and |√d - 2|a|| < b (with a > 0 for the principal representative).[](https://mathworld.wolfram.com/ReducedBinaryQuadraticForm.html) The procedure uses [continued fraction](/page/Continued_fraction) expansion of the associated quadratic irrational τ = (b + √d)/(2|a|), whose [period](/page/Period) corresponds to the cycle of reduced forms in the [equivalence class](/page/Equivalence_class). Specifically, compute the continued fraction convergents of τ; the semi-reduced forms along the [period](/page/Period) yield the cycle, and the fundamental unit ε of the order ℤ[(d + b)/2a] satisfies the Pell-like equation x² - (d/4)y² = ±1, generated by the [automorphism](/page/Automorphism) corresponding to the cycle length.[](http://www.numbertheory.org/php/reduce.html) This approach terminates in O(√d) steps, as the continued fraction [period](/page/Period) is at most O(√d). Uniqueness holds in that each proper [equivalence class](/page/Equivalence_class) contains exactly one such cycle, with the minimal a > 0 form serving as [canonical](/page/Canonical).[](https://math.hawaii.edu/~kmanguba/mastersproject.pdf) For instance, the form x² + xy - y² (d = 5) is already reduced, with [continued fraction](/page/Continued_fraction) of τ = (1 + √5)/2 (the [golden ratio](/page/Golden_ratio)) having period 1, linking to the fundamental unit (1 + √5)/2 of ℚ(√5).[](http://www.numbertheory.org/php/reduce.html) ### Reduced forms A reduced positive definite binary quadratic form $ax^2 + bxy + cy^2$ with negative [discriminant](/page/Discriminant) $d = b^2 - 4ac < 0$ satisfies the conditions $|b| \leq a \leq c$ and $b \geq 0$ whenever $|b| = a$ or $a = c$.[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) This canonical representative ensures that $a$ achieves the minimal positive value represented by the form over all nonzero integer pairs $(x, y)$, distinguishing it among equivalent forms.[](https://math.hawaii.edu/~kmanguba/mastersproject.pdf) For indefinite binary quadratic forms with positive discriminant $d > 0$, a form $ax^2 + bxy + cy^2$ is reduced if $|\sqrt{d} - 2|a|| < b < \sqrt{d}$.[](https://mathworld.wolfram.com/ReducedBinaryQuadraticForm.html) These conditions align with the form's roots lying in a fundamental domain related to continued fraction expansions, ensuring a standardized representation.[](https://arxiv.org/pdf/1502.06289) In both cases, all primitive binary quadratic forms of a fixed discriminant $d$ (with $\gcd(a, b, c) = 1$) are equivalent under SL(2, $\mathbb{Z}$) transformations to finitely many reduced forms, providing a complete set of canonical representatives for enumeration and classification.[](https://crypto.stanford.edu/pbc/notes/numbertheory/form.html) Reduced forms satisfy $d = b^2 - 4ac$ subject to the respective bounds on $a$, $b$, and $c$, facilitating the study of form classes without redundancy.[](https://kimballmartin.github.io/ntii/chap4.pdf) These reduced forms are obtained through the reduction procedure outlined in prior sections.[](https://math.hawaii.edu/~kmanguba/mastersproject.pdf) ### Class number The class number $ h(d) $ of a discriminant $ d < 0 $ is defined as the number of proper equivalence classes of primitive positive definite binary quadratic forms of discriminant $ d $.[](https://things.maths.cam.ac.uk/catam/II/15pt3.pdf) For such discriminants, the finiteness of $ h(d) $ follows from the existence of a finite set of reduced representatives for each class.[](https://metaphor.ethz.ch/x/2019/fs/401-4110-19L/sc/modform.pdf) Specifically, $ h(d) $ equals the number of reduced primitive binary quadratic forms of discriminant $ d $, providing a practical method to compute it by enumeration.[](https://mathworld.wolfram.com/ClassNumber.html) Siegel's theorem establishes an upper bound on the growth of the class number, stating that $ h(d) = O(|d|^{1/2 + \varepsilon}) $ for any $ \varepsilon > 0 $ as $ |d| \to \infty $.[](https://hrj.episciences.org/6488/pdf) For discriminants $ d > 0 $, the class number $ h(d) $ counts the number of proper equivalence classes of primitive indefinite binary quadratic forms under the action of $ \mathrm{SL}(2, \mathbb{Z}) $, which is finite despite each class having an infinite [automorphism group](/page/Automorphism_group). This $ h(d) $ equals the narrow class number $ h^+(K) $ of the [quadratic field](/page/Quadratic_field) $ K = \mathbb{Q}(\sqrt{d}) $. The ordinary class number $ h(K) $ of $ K $ equals $ h(d) $ if the fundamental unit has [norm](/page/Norm) −1, and $ h(d)/2 $ otherwise.[](https://www.math.uni-hamburg.de/personen/charlton/teaching/primes_17/handout2_quadratic_field.pdf) The class number $ h(d) $ for primitive binary quadratic forms of discriminant $ d < 0 $ coincides with the (ordinary) class number of the quadratic field $ \mathbb{Q}(\sqrt{d}) $; for $ d > 0 $, it coincides with the narrow class number.[](http://www.numbertheory.org/php/classnoneg.html) ## Representation of Integers ### Representation problem A binary quadratic form $f(x, y) = ax^2 + bxy + cy^2$ represents an [integer](/page/Integer) $n$ if there exist integers $x, y \in \mathbb{Z}$ such that $f(x, y) = n$. The central representation problem asks for a [characterization](/page/Characterization) of all such $n$ for a given form $f$, or more generally, for all forms in an equivalence class under $SL_2(\mathbb{Z})$-action, or across the entire class group of forms with fixed [discriminant](/page/Discriminant). This problem originated with Gauss's study of which primes can be expressed in specific forms like $x^2 + ny^2$, and it connects [arithmetic](/page/History_of_arithmetic) properties of integers to the structure of quadratic fields.[](https://www.math.uni-bonn.de/people/toma/notes/BA-korrigiert.pdf)[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) For positive definite forms (those with negative discriminant and positive leading coefficient), the number of integer solutions $(x, y)$ to $f(x, y) = n$ is finite for any fixed $n > 0$, reflecting the boundedness of the level sets of $f$. The set of represented integers corresponds to norms of ideals in the quadratic order associated to the discriminant, and the full characterization relies on the ideal class group, which acts transitively on the representations within a genus. Equivalence classes preserve the represented integers, allowing the problem to be reduced to studying primitive or reduced representatives.[](https://www.math.uni-bonn.de/people/toma/notes/BA-korrigiert.pdf) Genus theory, developed by Gauss, links the representation problem to local solvability conditions: an integer $n$ can be represented by some form of discriminant $d$ only if it satisfies quadratic character conditions modulo the odd primes dividing $d$ (and modulo 4 if $d \equiv 0 \pmod{4}$), ensuring the congruence $f(x, y) \equiv n \pmod{p}$ has solutions for each such prime $p$. These conditions define the principal genus and determine the subgroup of representable integers invariant under the class group action.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) The local conditions mirror the Hasse principle for quadratic forms over number fields, where global solubility of $f(x, y) = n$ over $\mathbb{Q}$ follows from solubility over $\mathbb{Q}_p$ for all primes $p$ (including the archimedean place); for integral representations, the genus captures these local obstructions exactly, with global representation by a specific class requiring additional class group membership. For indefinite forms, while local solvability ensures representation by the genus, the finite class number determines representation by a specific class. The infinite unit group generates infinitely many solutions for each represented n.[](https://gauss.math.yale.edu/~sr2532/forms.pdf) Asymptotic results quantify the distribution of represented integers: for a fixed [equivalence class](/page/Equivalence_class) of positive definite forms, the number of distinct positive integers $n \leq X$ represented is asymptotically $c \frac{X}{\sqrt{\log X}}$ for some constant $c > 0$ depending on the [discriminant](/page/Discriminant), as established in the classical case and generalized via the circle method or spectral methods on automorphic forms. In the indefinite case, the count grows like $c X$ for some constant $c > 0$, reflecting a positive [density](/page/Density) of represented integers. These densities highlight the role of the class number in scaling the represented set.[](https://dms.umontreal.ca/~andrew/PDF/quadraticforms.pdf)[](https://projecteuclid.org/journals/duke-mathematical-journal/volume-135/issue-2/Estimates-for-representation-numbers-of-quadratic-forms/10.1215/S0012-7094-06-13522-6.short) ### Specific examples A prominent example of representation by a binary quadratic form is provided by $f(x, y) = x^2 + y^2$, which has discriminant $-4$. This form represents every odd prime $p \equiv 1 \pmod{4}$, along with 2, as established by [Fermat's theorem](/page/Fermat's_theorem) on sums of two squares. Specific instances include $5 = 1^2 + 2^2$, $13 = 2^2 + 3^2$, and $17 = 4^2 + 1^2$.[](https://math.uchicago.edu/~may/REU2017/REUPapers/Patel.pdf) Another illustrative case is the form $g(x, y) = x^2 + 2y^2$ with discriminant $-8$. This positive definite form represents primes congruent to 1 or 3 modulo 8. Examples are $3 = 1^2 + 2 \cdot 1^2$, $11 = 3^2 + 2 \cdot 1^2$, and $19 = 1^2 + 2 \cdot 3^2$.[](https://www.math.uni-bonn.de/people/toma/notes/BA-korrigiert.pdf) For discriminant $-20$, consider the reduced form $h(x, y) = 2x^2 + 2xy + 3y^2$. This form represents odd primes $p \equiv 3$ or $7 \pmod{20}$. Small positive integers it represents include $2 = 2 \cdot 1^2 + 2 \cdot 1 \cdot 0 + 3 \cdot 0^2$, $3 = 2 \cdot 0^2 + 2 \cdot 0 \cdot 1 + 3 \cdot 1^2$, and $7 = 2 \cdot 1^2 + 2 \cdot 1 \cdot 1 + 3 \cdot 1^2$. Larger examples like $23 = 2 \cdot 1^2 + 2 \cdot 1 \cdot (-3) + 3 \cdot (-3)^2$ and $43 = 2 \cdot 4^2 + 2 \cdot 4 \cdot 1 + 3 \cdot 1^2$ demonstrate its action on primes satisfying the congruence condition.[](https://dms.umontreal.ca/~andrew/PDFpre/FITCh2.pdf) The following table lists small positive integers represented by the principal forms for discriminants $-4$ and $-8$, along with corresponding integer solutions $(x, y)$ (considering absolute values and primitive pairs where applicable): | n | Form $x^2 + y^2$ (d = -4) | Form $x^2 + 2y^2$ (d = -8) | |----|-----------------------------|------------------------------| | 1 | (1, 0) | (1, 0) | | 2 | (1, 1) | (0, 1) | | 3 | — | (1, 1) | | 4 | (2, 0) | (2, 0) | | 5 | (1, 2) | — | | 8 | (2, 2) | (0, 2) | | 9 | (3, 0) | (1, 2) or (3, 0) | | 10 | (3, 1) | — | | 11 | — | (3, 1) | These representations highlight how different forms capture distinct sets of integers based on their discriminants.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) For indefinite binary quadratic forms, where the discriminant is positive, representations can yield infinitely many solutions. A classic example is the principal form $k(x, y) = x^2 - d y^2$ for square-free $d > 0$, which represents small integers like $\pm 1$ through solutions to the Pell equation $x^2 - d y^2 = 1$. For $d = 2$ (discriminant 8), solutions include the trivial $(1, 0)$ and nontrivial $(3, 2)$ since $3^2 - 2 \cdot 2^2 = 1$, with further solutions generated by powers of the fundamental unit. Similarly, for $d = 5$ (discriminant 20), $(9, 4)$ gives $9^2 - 5 \cdot 4^2 = 1$. These solutions correspond to units in the [ring of integers](/page/Ring_of_integers) of $\mathbb{Q}(\sqrt{d})$ and illustrate how such forms represent [Pell numbers](/page/Pell_number) in their solution sequences.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) Geometrically, for a positive definite binary quadratic form, the equation $a x^2 + b x y + c y^2 = n$ describes an [ellipse](/page/Ellipse) in the plane, and representations of $n$ correspond to [lattice](/page/Lattice) points (integer coordinates) lying on this [ellipse](/page/Ellipse). The number of such points provides the representation count, with the ellipse's shape determined by the form's coefficients and scaled by $n$. For indefinite forms, the conic becomes a [hyperbola](/page/Hyperbola), allowing infinitely many [lattice](/page/Lattice) points under certain conditions.[](https://arxiv.org/abs/math/0307279) ### Equivalent representations In the theory of binary quadratic forms, equivalence provides a [mechanism](/page/Mechanism) for transforming representations of integers between forms within the same [class](/page/Class). Specifically, if a binary quadratic form $f(x, y) = ax^2 + bxy + cy^2$ represents an integer $n$ via integers $x, y$ such that $f(x, y) = n$, and $g$ is equivalent to $f$ via a [matrix](/page/Matrix) $M = \begin{pmatrix} \alpha & \beta \\ \gamma & \delta \end{pmatrix} \in \mathrm{SL}(2, \mathbb{Z})$ (so $\det M = 1$), then $g(u, v) = f(\alpha u + \beta v, \gamma u + \delta v)$. The corresponding representation by $g$ uses the transformed variables $(u, v)^t = M^{-1} (x, y)^t$, ensuring $g(u, v) = n$.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) This [equivalence relation](/page/Equivalence_relation) preserves the set of integers represented by the forms: all forms in an [equivalence class](/page/Equivalence_class) represent precisely the same integers. For positive definite forms (discriminant $d < 0$), the represented values are identical across the class. For indefinite forms (discriminant $d > 0$), the sets of represented integers are the same up to multiplication by units of the associated [order](/page/Order) in the [quadratic field](/page/Quadratic_field), reflecting the action of the infinite automorphism group involving Pell equation solutions.[](https://planetmath.org/representationofintegersbyequivalentintegralbinaryquadraticforms)[](https://dms.umontreal.ca/~andrew/Courses/Chapter4.pdf) Representations become ambiguous when an integer $n$ is represented by forms from multiple distinct equivalence classes, which occurs precisely when the class number of the discriminant is greater than 1. In such cases, solving the representation problem requires checking multiple reduced forms, one per class.[](https://dms.umontreal.ca/~andrew/Courses/Chapter4.pdf) The structure of equivalence classes, each containing a unique reduced form, enables uniform solutions to representation equations by focusing computations on reduced representatives. This reduces the problem to finitely many checks per discriminant, streamlining algorithms for determining whether $n$ is represented and finding explicit solutions.[](https://mathweb.ucsd.edu/~apollack/9_305S_course_notes_binary_quadratic_forms.pdf) A concrete illustration arises with sums of two squares, given by the principal form $f(x, y) = x^2 + y^2$ (discriminant $-4$), which has class number 1. All representations of $n$ by this form are related by automorphisms under $\mathrm{SL}(2, \mathbb{Z})$; for instance, the solutions $(1, 2)$ and $(2, 1)$ to $5 = 1^2 + 2^2$ transform into each other via [the matrix](/page/The_Matrix) $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$, yielding equivalent representations.[](https://dms.umontreal.ca/~andrew/Courses/Chapter4.pdf) ## Composition Laws ### Form composition Form composition refers to a binary operation that combines two binary quadratic forms of the same discriminant $d$ to produce a third form also of discriminant $d$. This operation, first systematically developed by [Carl Friedrich Gauss](/page/Carl_Friedrich_Gauss), endows the set of such forms (up to equivalence) with a group structure, facilitating the study of their arithmetic properties.[](https://annals.math.princeton.edu/wp-content/uploads/annals-v159-n1-p03.pdf) Gauss's composition law provides a general method to compose any two primitive binary quadratic forms $f(x,y) = ax^2 + bxy + cy^2$ and $g(x',y') = a'x'^2 + b'x'y' + c'y'^2$ of discriminant $d = b^2 - 4ac = (b')^2 - 4a'c'$, where $d \equiv 0$ or $1 \pmod{4}$. The law arises from a bilinear construction on pairs of variables, yielding a new form $h(X,Y)$ such that $f(x,y) \cdot g(x',y') = h(X,Y)$, with $X$ and $Y$ linear combinations of the products $xx', xy', yx', yy'$. This ensures the resulting form has the same discriminant $d$.[](https://annals.math.princeton.edu/wp-content/uploads/annals-v159-n1-p03.pdf)[](https://projecteuclid.org/journals/bulletin-of-the-american-mathematical-society/volume-54/issue-12/Composition-of-binary-quadratic-forms/bams/1183513326.pdf) A simplified version, known as Dirichlet [composition](/page/Composition), applies when the two forms share the same middle [coefficient](/page/Coefficient), i.e., for $f = (a, b, c)$ and $g = (a', b, c')$ with $\gcd(a, a', b) = 1$. The composite form is then $h = (aa', b, c'')$, where c'' = \frac{b^2 - d}{4aa'}. This operation is uniquely determined under the given coprimality condition and preserves the [discriminant](/page/Discriminant) $d$.[](https://projecteuclid.org/journals/bulletin-of-the-american-mathematical-society/volume-54/issue-12/Composition-of-binary-quadratic-forms/bams/1183513326.pdf)[](https://www.ias.ac.in/article/fulltext/reso/024/06/0633-0651) The [composition](/page/Composition) operation is associative and commutative, forming an [abelian group](/page/Abelian_group) on the equivalence classes of [primitive](/page/Primitive) forms of fixed [discriminant](/page/Discriminant) $d$. The [identity element](/page/Identity_element) is the principal form, which is $ (1, 0, -\frac{d}{4}) $ if $d \equiv 0 \pmod{4}$, or $ (1, 1, \frac{1-d}{4} ) $ if $d \equiv 1 \pmod{4}$.[](https://annals.math.princeton.edu/wp-content/uploads/annals-v159-n1-p03.pdf)[](https://www.ias.ac.in/article/fulltext/reso/024/06/0633-0651) Geometrically, binary quadratic forms correspond to positive definite lattices in $\mathbb{R}^2$ equipped with a quadratic [norm](/page/Norm), and [composition](/page/Composition) interprets as a bilinear pairing or [tensor product](/page/Tensor_product) construction on these [lattices](/page/Lattice), preserving the [discriminant](/page/Discriminant) as an [invariant](/page/Invariant) of the lattice structure.[](https://annals.math.princeton.edu/wp-content/uploads/annals-v159-n1-p03.pdf)[](https://dummit.cos.northeastern.edu/docs/numthy_9_geometry_of_numbers.pdf) ### Class composition The equivalence classes of binary quadratic forms of fixed discriminant $d$ under proper equivalence (via $\mathrm{SL}(2, \mathbb{Z})$-transformations) form an [abelian group](/page/Abelian_group) under an extension of the [composition](/page/Composition) operation, known as the form [class](/page/Class) group.[](https://link.springer.com/chapter/10.1007/978-1-4612-4542-1_4) The [identity element](/page/Identity_element) is the [principal](/page/The_Principal) [class](/page/Class), consisting of forms equivalent to the principal form $x^2 - (d/4)y^2$ when $d \equiv 0 \pmod{4}$ or $x^2 + xy + ((1-d)/4)y^2$ when $d \equiv 1 \pmod{4}$.[](https://dummit.cos.northeastern.edu/teaching_sp21_4527/4527_lecture_36_composition_of_quadratic_forms.pdf) This group structure arises because [composition](/page/Composition) is associative up to [equivalence](/page/Equivalence), commutative, and every [class](/page/Class) has an inverse given by composing with the "opposite" form obtained by negating the middle coefficient.[](https://link.springer.com/chapter/10.1007/978-1-4612-4542-1_4) For discriminants $d < 0$, the form class group is finite, with order equal to the class number $h(d)$.[](https://www.math.columbia.edu/~chaoli/tutorial2012/SethNeel.pdf) A fundamental theorem establishes that this group is isomorphic to the ideal class group of the quadratic order of discriminant d in the imaginary quadratic field $\mathbb{Q}(\sqrt{d})$, providing a bridge between classical form theory and algebraic number theory. The structure of the class group is abelian and finite, often analyzable via its primary decomposition; it frequently exhibits 2-torsion, corresponding to elements of order 2. For certain discriminants, such as $d = -40$, the group is isomorphic to $\mathbb{Z}/2\mathbb{Z}$, where every non-principal class squares to the principal class under composition.[](https://dummit.cos.northeastern.edu/teaching_sp21_4527/4527_lecture_36_composition_of_quadratic_forms.pdf) To compute the product of two classes in the group, select reduced representatives of each class, apply the Dirichlet composition law to obtain a composite form, and then reduce that form to its unique reduced representative, whose class is the product.[](https://link.springer.com/chapter/10.1007/978-1-4612-4542-1_4) This algorithm leverages the uniqueness of reduced forms for $d < 0$, ensuring efficient computation in practice.[](https://www.math.columbia.edu/~chaoli/tutorial2012/SethNeel.pdf) The class group structure plays a key role in solving norm equations in quadratic fields, as the composition of forms corresponds to the multiplicative structure of ideals: if ideals $\mathfrak{a}$ and $\mathfrak{b}$ have norms represented by forms in classes $$ and $$, then the norm of $\mathfrak{a}\mathfrak{b}$ is represented by a form in the class $ \cdot $. This connection facilitates determining which integers are norms from the field, with principal ideals corresponding to principal forms.[](https://dummit.cos.northeastern.edu/teaching_sp21_4527/4527_lecture_36_composition_of_quadratic_forms.pdf) ## Genera Theory ### Definition of genera In the theory of binary quadratic forms, a genus is a coarser equivalence relation that groups classes of forms sharing the same discriminant $D$ based on their local representability properties at all primes. Specifically, two classes of primitive forms of discriminant $D$ belong to the same genus if they represent the same sets of residue classes modulo $|D|$ in $(\mathbb{Z}/|D|\mathbb{Z})^*$, or equivalently, if they are equivalent under the action of the [idele class group](/page/idele_class_group) in the corresponding [quadratic field](/page/quadratic_field), capturing global forms through local conditions everywhere.[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf)[](https://www.math.columbia.edu/~chaoli/tutorial2012/SethNeel.pdf) Genera are defined using genus characters, which are quadratic Dirichlet characters associated to the prime discriminants dividing the discriminant $D$. For a fundamental discriminant $d < 0$, these include the Kronecker symbols $\left( \frac{d_k}{\cdot} \right)$ for each prime discriminant $d_k$ dividing $d$ (corresponding to the odd primes and possibly 2). Two forms lie in the same genus if their classes map to the same coset in the quotient of the kernel of the principal genus character by its subgroup of squares, partitioning the class group into genera via these local invariants.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf)[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) The number of genera for forms of fundamental discriminant $d < 0$ is $2^{\mu - 1}$, where $\mu$ is the number of genus characters: let $r$ be the number of distinct odd prime divisors of $|d|$; if $d \equiv 1 \pmod{4}$, then $\mu = r$; if $d \equiv 0 \pmod{4}$, let $n = |d|/4$; $\mu = r$ if $n \equiv 3 \pmod{4}$, and $\mu = r + 1$ otherwise. This finite count arises from the structure of the 2-Sylow subgroup of the class group, with the $-1$ accounting for the principal genus character's kernel.[](https://www.math.uni-bonn.de/people/toma/notes/BA-korrigiert.pdf)[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) The principal genus is the unique genus containing the principal form (such as $x^2 + |d|/4 y^2$ if $d \equiv 0 \pmod{4}$), and it consists precisely of the squares of classes in the [class group](/page/Class_group), corresponding to the trivial coset under the genus characters. Forms in the principal genus represent integers that are quadratic residues locally at all primes dividing $2d$.[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf)[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) Genera play a key role in the representation problem by determining the necessary and sufficient local conditions for an integer to be represented by some form of the discriminant: an odd prime $p$ not dividing $D$ is represented by a form in a given genus if and only if $p$ lies in the corresponding coset of representable residues modulo $|D|$, ensuring compatibility with the [Hasse principle](/page/Hasse_principle) for quadratic forms over the rationals.[](https://www.math.columbia.edu/~chaoli/tutorial2012/SethNeel.pdf)[](http://math.uchicago.edu/~may/REU2014/REUPapers/Kaplan.pdf) ### Principal genus and genus characters In the theory of genera for binary quadratic forms of fixed negative discriminant $d$, the distinct genera are distinguished by a system of genus characters, which are quadratic Dirichlet characters $\left( \frac{d_k}{\cdot} \right)$ associated to the prime discriminants $d_k$ dividing $|d|$. For each odd prime $p$ dividing $d$, there is a character corresponding to the prime discriminant involving $p$, supplemented by additional characters modulo 4 or 8 to account for the ramified prime 2 when $d$ is even. These characters classify forms based on whether they represent quadratic residues or non-residues modulo the relevant primes, capturing the local solvability conditions of the equation $f(x,y) = n$ for integers $n$.[](https://scholarworks.umt.edu/cgi/viewcontent.cgi?article=1141&context=tme)[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) Each primitive binary quadratic form $f = ax^2 + bxy + cy^2$ of discriminant $d$ is assigned a vector of character values $\left( \left( \frac{d_j}{a} \right) \right)$, where $\left( \frac{d_j}{a} \right)$ is the Kronecker symbol for each prime discriminant $d_j$ dividing $d$, with additional 2-adic factors for even $d$. Forms belong to the same genus if and only if their assigned character vectors coincide, ensuring that genera group forms with identical local representation properties modulo $|d|$.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf)[](https://web.math.ucsb.edu/~stopple/BQF.exercises.pdf) The principal genus is the distinguished genus where all character values are trivial (i.e., +1), encompassing the equivalence class of the principal form, such as $x^2 + \frac{|d|}{4} y^2$ when $d \equiv 0 \pmod{4}$. This genus coincides exactly with the set of squares in the form class group $C(d)$, meaning the image of the squaring map $ \mapsto ^2$. The Duplication Theorem establishes this identification, affirming that the kernel of the genus character homomorphism $\psi: C(d) \to \{ \pm 1 \}^\mu$ (where $\mu$ is the number of independent characters) is precisely the subgroup of squares $C(d)^2$. Consequently, the principal genus is self-dual under composition, while non-principal genera pair with their duplicates under squaring, resulting in each non-principal genus containing an equal number of classes mapping to squares and non-squares in the principal genus, unlike the principal genus itself which comprises all squares.[](https://math.berkeley.edu/~tb65536/QuadraticForms.pdf)[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) The genus characters have key applications in determining the primes represented by a given genus. An odd prime $p$ not dividing $d$ is represented by some form in a specific genus if and only if $p$ satisfies the character conditions of that genus, i.e., $\chi(p)$ matches the fixed value of each character $\chi$ for the genus. For the principal genus, this simplifies to the single condition $\left( \frac{d}{p} \right) = 1$, enabling the resolution of classical representation problems such as which primes are sums of two squares.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) ## Historical Development ### Early contributions The investigation of binary quadratic forms originated in the 17th century with [Pierre de Fermat](/page/Pierre_de_Fermat)'s work on representing primes as sums of two squares using the form $x^2 + y^2$. Fermat claimed, in marginal notes later published posthumously, that an odd prime $p$ can be written as $p = x^2 + y^2$ with integers $x, y$ if and only if $p \equiv 1 \pmod{4}$, while 2 is represented as $1^2 + 1^2$.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) He extended similar ideas to other forms, such as $x^2 + 3y^2$, noting that primes congruent to 1 modulo 3 could be represented this way, though without full proofs.[](https://scholarworks.umt.edu/cgi/viewcontent.cgi?article=1141&context=tme) These efforts arose in the context of [Diophantine equations](/page/Diophantine_equations) and the representation problem, highlighting which integers could be expressed by specific quadratic forms.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) Leonhard Euler built upon Fermat's claims in the mid-18th century, providing the first rigorous proof of the two-squares theorem in 1749 and exploring representations by forms like $x^2 + 2y^2$ and $x^2 + 3y^2$. Euler investigated broader Diophantine equations tied to quadratic forms, generalizing Diophantus's identity to show that the product of two sums of two squares is itself a sum of two squares via the composition $(x_1^2 + y_1^2)(x_2^2 + y_2^2) = (x_1 x_2 - y_1 y_2)^2 + (x_1 y_2 + y_1 x_2)^2$, an early precursor to formal composition laws.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) His studies also connected quadratic forms to quadratic residues and the solvability of equations like those for primes of certain forms.[](https://scholarworks.umt.edu/cgi/viewcontent.cgi?article=1141&context=tme) Additionally, Euler applied continued fractions to solve Pell equations of the form $x^2 - d y^2 = \pm 1$, linking these to automorphisms of indefinite binary quadratic forms and fundamental solutions.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) In the late 18th century, Joseph-Louis Lagrange systematized the theory by defining [equivalence](/page/Equivalence) of binary quadratic forms under invertible integer linear substitutions, showing that equivalent forms represent the same integers.[](https://scholarworks.umt.edu/cgi/viewcontent.cgi?article=1141&context=tme) He introduced the [discriminant](/page/Discriminant) $\Delta = b^2 - 4ac$ as a key invariant preserved under equivalence, which determines essential properties like definiteness and the set of representable numbers.[](https://scholarworks.umt.edu/cgi/viewcontent.cgi?article=1141&context=tme) Lagrange developed a reduction procedure for positive definite forms (negative [discriminant](/page/Discriminant)), showing that every such form is equivalent to a reduced form where $|b| \leq a \leq c$ and $a > 0$, thereby establishing the finiteness of equivalence classes for a fixed [discriminant](/page/Discriminant).[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) His 1773 memoir also proved Fermat's conjectures for representations by $x^2 + ny^2$ with $n=2,3$, and connected [reduction](/page/Reduction) to continued fractions for solving Pell equations and classifying indefinite forms.[](https://scholarworks.umt.edu/cgi/viewcontent.cgi?article=1141&context=tme) ### Gauss's Disquisitiones Carl Friedrich Gauss's *[Disquisitiones Arithmeticae](/page/Disquisitiones_Arithmeticae)*, published in 1801, dedicates Section V to the systematic study of binary quadratic forms, marking a pivotal advancement in [number theory](/page/Number_theory).[](https://archive.org/details/disquisitionesa00gaus) Written in Latin and completed by 1798 when Gauss was just 21, the work unifies disparate earlier ideas into a rigorous [framework](/page/Framework), emphasizing forms of the type $ax^2 + bxy + cy^2$ with integer coefficients and fixed discriminant $d = b^2 - 4ac$.[](https://yalebooks.yale.edu/book/9780300094732/disquisitiones-arithmeticae/) This section introduces foundational concepts that connect representation of integers by forms to deeper arithmetic structures, laying the groundwork for modern [algebraic number theory](/page/Algebraic_number_theory).[](https://bpb-us-w2.wpmucdn.com/web.sas.upenn.edu/dist/0/713/files/2020/07/M361Final.pdf) Gauss defines two binary quadratic forms to be equivalent if one can be transformed into the other via a unimodular substitution, specifically by an integer matrix in $\mathrm{SL}_2(\mathbb{Z})$ (or more broadly $\mathrm{GL}_2(\mathbb{Z})$ with determinant $\pm 1$), preserving the discriminant.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) For positive definite forms (where $d < 0$ and $a > 0$), he develops a reduction theory to identify a canonical representative in each equivalence class: a form $(a, b, c)$ is reduced if $|b| \leq a \leq c$ and, in cases of equality, $b \geq 0$.[](https://bpb-us-w2.wpmucdn.com/web.sas.upenn.edu/dist/0/713/files/2020/07/M361Final.pdf) Gauss proves that every such form is properly equivalent to a unique reduced form, enabling the enumeration of classes and facilitating computations of representations.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) Additionally, he establishes a composition law that operates on equivalence classes of primitive forms (gcd$(a, b, c) = 1$) of the same discriminant, defining a binary operation yielding another form in the set and endowing the classes with the structure of a finite abelian group, whose order is the class number $h(d)$.[](https://annals.math.princeton.edu/wp-content/uploads/annals-v159-n1-p03.pdf) In his genera theory, Gauss introduces a [classification](/page/Classification) of form classes using [genus](/page/Genus) characters—quadratic characters associated with the prime factors of the [discriminant](/page/Discriminant)—to group equivalent forms into [genera](/page/Genus) based on shared [representation](/page/Representation) properties [modulo](/page/Modulo) those primes.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) For a fundamental [discriminant](/page/Discriminant) $d < 0$ with $t$ distinct odd prime factors (and accounting for the [factor](/page/Factor) 4 if applicable), the number of genera is $2^{t-1}$, and each [genus](/page/Genus) contains the same number of classes.[](https://bpb-us-w2.wpmucdn.com/web.sas.upenn.edu/dist/0/713/files/2020/07/M361Final.pdf) A key [theorem](/page/Theorem) states that the class number $h(d)$ is divisible by $2^{t-1}$, implying $h(d) \geq 2^{t-1}$ and providing a lower bound that highlights the divisibility structure of the class group.[](https://libres.uncg.edu/ir/uncg/f/Shepherd_uncg_0154M_11099.pdf) These innovations, by linking form classes to [arithmetic](/page/History_of_arithmetic) invariants, established binary quadratic forms as a cornerstone of [algebraic number theory](/page/Algebraic_number_theory), influencing subsequent developments in ideal theory and [class field theory](/page/Class_field_theory).[](https://annals.math.princeton.edu/wp-content/uploads/annals-v159-n1-p03.pdf) ### Later advancements In the 1830s, Peter Gustav Lejeune Dirichlet introduced a simplified composition law for binary quadratic forms, which streamlined the algebraic structure by focusing on forms sharing a common variable and avoiding the more intricate bilinear constructions of earlier approaches.[](https://dms.umontreal.ca/~andrew/PDF/QuadForms4PiInSky.pdf) This Dirichlet composition facilitated explicit computations of the form class group and its structure.[](https://www.ias.ac.in/article/fulltext/reso/024/06/0633-0651) Additionally, in 1839, Dirichlet derived the class number formula for imaginary quadratic fields with negative discriminant $d < 0$, expressing the class number $h(d)$ in terms of the value at $s=1$ of the Dirichlet $L$-function associated to the Kronecker symbol, specifically $h(d) = \frac{w \sqrt{|d|}}{2\pi} L(1, \chi_d)$, where $w$ is the number of units and $\chi_d$ is the non-principal character modulo $|d|$.[](https://projecteuclid.org/journals/bulletin-of-the-american-mathematical-society-new-series/volume-13/issue-1/Gauss-class-number-problem-for-imaginary-quadratic-fields/bams/1183552617.pdf) During the [20th century](/page/20th_century), the theory of binary quadratic forms was deeply integrated into [algebraic number theory](/page/Algebraic_number_theory), revealing a [bijection](/page/Bijection) between equivalence classes of primitive binary quadratic forms of [discriminant](/page/Discriminant) $D$ and ideal classes in the quadratic [order](/page/Order) of [conductor](/page/Conductor) $f$ in $\mathbb{Q}(\sqrt{D})$, where $D = df^2$ and $d$ is the fundamental [discriminant](/page/Discriminant).[](https://corentinperretgentil.gitlab.io/static/documents/correspondence-bqf-qf.html) This correspondence, building on earlier insights, allows the form class group to be identified with the [Picard group](/page/Picard_group) of the [order](/page/Order), enabling the use of ideal-theoretic tools for studying representation problems and class invariants.[](http://www.numbertheory.org/PDFS/quadr.pdf) Carl Ludwig Siegel advanced the analytic side in the 1930s with his mass formula, which computes the weighted average class number across all genera of binary quadratic forms of a given discriminant by summing the reciprocals of the automorphism group orders, providing an exact value in terms of local densities and Euler products.[](https://arxiv.org/pdf/2105.01270) Siegel also developed generalized theta series attached to binary quadratic forms, whose Fourier coefficients count integer representations and transform as modular forms, yielding applications to average orders of class numbers and equidistribution in the space of lattices.[](https://arxiv.org/pdf/1505.02693) Computational advancements in the late [20th century](/page/20th_century) include subexponential-time algorithms for determining the class group of quadratic orders, such as those based on [infrastructure](/page/Infrastructure) computations in real quadratic fields and reduction techniques for imaginary cases, implemented in systems like [Magma](/page/Magma) and PARI/GP for practical enumeration up to large discriminants.[](https://link.springer.com/book/10.1007/978-3-540-46368-9) Despite these developments, open problems persist, including the effective computation of class numbers for large discriminants without assuming the generalized [Riemann hypothesis](/page/Riemann_hypothesis), as current algorithms remain exponential in the worst case.[](https://link.springer.com/book/10.1007/978-3-540-46368-9) Furthermore, connections to the [Birch](/page/Birch)–Swinnerton–Dyer conjecture arise through elliptic curves with complex multiplication by the quadratic order, where the conjecture predicts the rank in terms of $L$-functions whose special values relate to class number formulas, linking [representation theory](/page/Representation_theory) to analytic continuations over imaginary quadratic fields.[](https://people.mpim-bonn.mpg.de/zagier/files/scanned/LseriesBSDandClassNumberGauss/fulltext.pdf)