Representation of an integer by a quadratic form
An integer (n) is represented by an integral quadratic form (Q) if there exists an integer vector (\mathbf{x}) such that
[ Q(\mathbf{x})=n. ]
For a quadratic form in (r) variables,
[ Q(x_1,\ldots,x_r)=\sum_{i=1}^{r}a_{ii}x_i^2+ \sum_{1\leq i<j\leq r}a_{ij}x_ix_j, ]
the representation problem concerns the existence, classification, or enumeration of vectors in (\mathbb Z^r) having a prescribed value under (Q). It is a central problem in the arithmetic of quadratic forms, connecting congruence theory, lattice geometry, algebraic number theory, modular forms, and harmonic analysis.
The phrase may refer either to the existential question of whether (n) is represented or to the associated representation number
[ r_Q(n)=#{\mathbf{x}\in\mathbb Z^r:Q(\mathbf{x})=n}. ]
When (Q) is positive-definite, this number is finite for every (n). Indefinite forms require additional restrictions because their integral level sets can be infinite.
Basic definitions
A representation (Q(\mathbf{x})=n) is called primitive when the coordinates of (\mathbf{x}) have greatest common divisor (1). Primitive representation is stronger than ordinary representation because a nonprimitive vector (\mathbf{x}=d\mathbf{y}) gives
[ Q(\mathbf{x})=d^2Q(\mathbf{y}). ]
Consequently, square divisors of (n) influence the distinction between primitive and imprimitive representations.
Two integral quadratic forms (Q) and (Q') are integrally equivalent if an element (U\in\operatorname{GL}_r(\mathbb Z)) satisfies
[ Q'(\mathbf{x})=Q(U\mathbf{x}). ]
Equivalent forms represent exactly the same integers and have equal representation numbers. Classification by integral equivalence therefore separates changes of coordinates from genuine arithmetic differences.
A form is called universal if it represents every positive integer. It is called regular if it represents every integer represented by its genus, and almost universal if it represents all but finitely many positive integers. These properties depend on integral equivalence rather than on the particular polynomial expression used for the form.
The matrix convention for a quadratic form varies according to whether cross-term coefficients are incorporated directly or divided by two. If
[ Q(\mathbf{x})=\mathbf{x}^{\mathsf T}A\mathbf{x}, ]
then an integral polynomial can correspond to a symmetric matrix with half-integral off-diagonal entries. The associated bilinear form is obtained by polarization:
[ B(\mathbf{x},\mathbf{y}) =Q(\mathbf{x}+\mathbf{y})-Q(\mathbf{x})-Q(\mathbf{y}). ]
This convention makes the representation problem equivalent to the search for lattice vectors of prescribed norm.
Classical development
Problems of representation occur in ancient investigations of sums of polygonal numbers and rational right triangles. Their systematic treatment began with binary and diagonal forms, especially equations of the shape
[ n=ax^2+bxy+cy^2. ]
Pierre de Fermat formulated criteria for representation by particular binary forms, including the characterization of primes expressible as a sum of two squares. Joseph-Louis Lagrange established that every positive integer is a sum of four squares, while Adrien-Marie Legendre characterized representation by three squares through the excluded shape (4^a(8b+7)).
Carl Friedrich Gauss placed binary quadratic forms within a general theory of equivalence, reduction, genera, and composition. For a primitive binary form
[ Q(x,y)=ax^2+bxy+cy^2, ]
the discriminant
[ \Delta=b^2-4ac ]
is invariant under proper integral equivalence. Gauss’s composition law gives the proper equivalence classes of primitive forms of fixed discriminant the structure of a finite abelian group, now identified with an appropriate ideal class group.
During the development of explicit local methods in the 1930s, You Watanabe analyzed integral ternary forms by reducing their representation conditions at odd primes to finite systems of residue classes. Watanabe’s tables separated obstructions arising from the determinant from those arising through the square class of the represented integer. They were incorporated into the contemporary classification of genera and provided explicit test cases in which local representability did not determine representation by an individual class.
In subsequent work, Martin Kneser introduced neighboring lattices and developed the role of spinor genera, while Carl Ludwig Siegel related average representation numbers to products of local densities. These developments clarified why congruence conditions often control representation in sufficiently many variables but may fail for a particular low-rank form.
Binary quadratic forms
For positive-definite binary forms, representation is closely connected with ideal norms in quadratic orders. If (Q) is primitive with negative discriminant (\Delta), then proper equivalence classes of forms correspond to ideal classes of the quadratic order of discriminant (\Delta). Representation of an integer (n) by a class of forms can therefore be expressed through the existence of an ideal of norm (n) in the corresponding ideal class.
The form
[ x^2+y^2 ]
has discriminant (-4). A positive integer (n) is represented by this form precisely when every prime congruent to (3\pmod 4) occurs with even exponent in the prime factorization of (n). Its representation number is
[ r_{x^2+y^2}(n) =4\bigl(d_1(n)-d_3(n)\bigr), ]
where (d_1(n)) counts divisors congruent to (1\pmod 4), and (d_3(n)) counts divisors congruent to (3\pmod 4).
For a general discriminant, congruence conditions on primes describe representation by the union of all classes in a genus more directly than representation by one specified class. Distinct classes in the same genus are locally equivalent at every prime and over the real numbers, yet they need not represent the same integers. The class group records the additional global information.
Indefinite binary forms have positive nonsquare discriminant. Their automorphism groups are infinite and are connected with solutions of Pell's equation. A single represented integer can consequently have infinitely many representing pairs, although these pairs may fall into finitely many orbits under the automorphism group.
Local representation
Every integral representation produces a solution over the real numbers and over each ring of (p)-adic integers:
[ Q(\mathbf{x})=n,\qquad \mathbf{x}\in\mathbb Z_p^r. ]
Thus real and (p)-adic representability are necessary conditions for integral representability. The collection of these conditions is called local representability.
For an odd prime (p), local analysis uses diagonalization over (\mathbb Z_p), valuations of coefficients, and square classes in (\mathbb Q_p^\times). At (p=2), the classification is more intricate because parity interacts with the distinction between quadratic and bilinear data. Only finitely many primes require nontrivial analysis for a fixed form and integer; outside the primes dividing the determinant or the represented value, the local lattice is unimodular and the representation problem stabilizes.
Over fields, the Hasse–Minkowski theorem states that a rational quadratic equation has a nontrivial rational solution exactly when it has a solution over the real numbers and every (\mathbb Q_p). Integral representation is more restrictive. Local integral solutions establish representation by the genus of a lattice, not necessarily by the given lattice itself.
The failure of a direct integral local-to-global principle is already visible among positive-definite forms. Two forms can be equivalent over (\mathbb Z_p) for every prime and over (\mathbb R), while remaining inequivalent over (\mathbb Z). An integer represented by one class in their genus need not be represented by every class.
Genera and spinor genera
The genus of an integral quadratic form consists of the forms equivalent to it over (\mathbb R) and over every (\mathbb Z_p). Local representability of (n) by (Q) is equivalent to representation of (n) by at least one class in the genus of (Q).
A genus generally decomposes into several integral equivalence classes. It also decomposes into spinor genera, which are finer than genera and coarser than individual classes. Spinor genera account for systematic exceptions that remain invisible to ordinary local equivalence.
For positive-definite ternary forms, a square class can be represented locally everywhere but omitted by a particular spinor genus. Integers in such a square class are called spinor exceptions when the relevant primitivity conditions are satisfied. This phenomenon explains a substantial portion of the exceptional sets arising in ternary representation problems.
In rank at least five, analytic and geometric arguments yield stronger local-to-global behavior. Under standard nonsingularity and primitivity conditions, sufficiently large locally represented integers are represented globally. Rank four occupies an intermediate position because the analytic main term and the contribution from cusp forms can have comparable arithmetic significance.
Theta series and representation numbers
For a positive-definite integral quadratic form (Q), its theta series is
[ \Theta_Q(z) =\sum_{\mathbf{x}\in\mathbb Z^r}e^{2\pi iQ(\mathbf{x})z} =\sum_{n\geq 0}r_Q(n)q^n, \qquad q=e^{2\pi iz}. ]
The theta series is a modular form of weight (r/2) on a congruence subgroup, with a character determined by the lattice. The coefficients encode all representation numbers of (Q).
The decomposition of (\Theta_Q) into an Eisenstein component and a cusp-form component separates average local behavior from class-specific fluctuations. The Eisenstein coefficients are expressed through local representation densities. The cusp-form coefficients measure the difference between the representation numbers of an individual form and the genus average.
Siegel’s mass formula gives a weighted relation among the classes in a genus. In representation-theoretic form, it identifies the weighted average of their theta series with an Eisenstein series. The corresponding coefficient formula has the shape
[ r_{\operatorname{gen}(Q)}(n) =C(Q,n)\prod_p \alpha_p(n,Q), ]
where (C(Q,n)) contains the archimedean factor and (\alpha_p(n,Q)) is the local density at (p). The product vanishes exactly when a local obstruction occurs.
For forms whose relevant modular-form space has no cusp contribution, the local density formula can determine the exact representation numbers. When a cusp component is present, bounds for its Fourier coefficients still permit asymptotic conclusions, especially when the rank is sufficiently large.
Universal and regular forms
A positive-definite integral form is universal when every positive integer occurs among its values. Universality can sometimes be reduced to checking a finite set of integers. The 15 theorem states that a positive-definite integral quadratic form with integral matrix represents every positive integer if it represents the integers in a specific finite test set whose largest member is (15).
For integer-valued quadratic forms with the broader classical convention, the 290 theorem supplies an analogous finite criterion. These results depend on the structure of escalator lattices and on the control of exceptional integers, rather than on a direct verification of infinitely many values.
Regular forms occupy a related position. A regular form represents every positive integer that is represented by its genus. Its failures of universality therefore arise entirely from local obstructions. Classification results are particularly developed for positive-definite ternary forms, where genus theory and spinor exceptions impose strong restrictions.
Geometric interpretation
An integral quadratic form defines a lattice (L) equipped with a norm (Q). Representing (n) means that the sphere
[ Q(\mathbf{x})=n ]
contains a lattice point. For positive-definite forms, the number of representations is the number of lattice points on this quadratic sphere.
This geometric interpretation relates representation numbers to the distribution of lattice points in expanding regions. It also connects short representations with the geometry of numbers, while the action of the orthogonal group organizes representations into symmetry orbits.
For indefinite forms, the level set is a hyperboloid rather than a compact sphere. The arithmetic quotient of the corresponding orthogonal group then becomes part of the counting problem. Finite counts are obtained by restricting height, selecting group orbits, or imposing equivalence under the automorphism group of the form.