The practical reward of quadratic reciprocity is a smaller modulus: swap a pair of distinct odd primes, record the required sign, then reduce the numerator by modular arithmetic. Use multiplicativity of the Legendre symbol and the second supplementary law for quadratic reciprocity to handle a factor of two. For example,
Here are both modulo , so the first swap changes sign; gives ; the swap involving five has no sign change. An independent square check is . The method determines existence of a square root without itself finding that root.
A composite numerator is allowed in a Legendre symbol; a composite denominator instead calls for a Jacobi symbol. Its Jacobi reciprocity law supports repeated swaps and remainder reductions, in the spirit of the Euclidean algorithm.[ref]
A final Jacobi symbol of one is not a square-existence certificate for a composite number modulus. For example,
yet is impossible: reducing it modulo three would require a square congruent to two, and squares modulo three are only zero or one. The product has hidden two local failures. By contrast, for a prime denominator, a Legendre symbol of one does certify a quadratic residue.
Euler's criterion Created 2026-09-24 Updated 2026-10-18
For an odd prime and , Euler's criterion identifies the Legendre symbol by modular exponentiation:
Thus a quadratic residue gives one and a quadratic nonresidue gives minus one, represented by if a nonnegative remainder is used. The formula also holds when , because and both sides are zero modulo .[ref]
For example, modulo seven the exponent is three: confirms that two is a quadratic residue, while confirms that three is a quadratic nonresidue. Modulo eleven the exponent is five, and confirms that two is a quadratic nonresidue. The test answers whether a square root exists; it does not itself return the roots of .
A short proof needs only Fermat's little theorem and the root bound for a polynomial. Put . If in the prime field, then . There are already such quadratic residues. The nonzero polynomial has polynomial degree , so it has no other polynomial roots. Finally, for every nonzero , Fermat's little theorem gives . Factoring in the field shows ; every quadratic nonresidue must take the remaining value . This proves the criterion without first finding a primitive root.
For a larger original example, decide whether seven is a quadratic residue modulo the prime number . Exponentiation by squaring computes the required power without listing fifty squares:
Therefore and has no solution. Each intermediate product is reduced modulo , as in modular exponentiation. The advantage is that exponentiation by squaring uses a number of multiplications proportional to the binary digit length of the exponent rather than testing every potential square root.
The odd prime hypothesis is essential. For the composite modulus nine, , which is neither one nor minus one. Although four is a nonzero square modulo nine, , so even the square-to-one implication fails. The Jacobi symbol and Euler pseudoprime discuss different questions for odd composite moduli; they do not make this a universal square test.
A short proof outline connects Gauss's lemma to counting points with integer coordinates. For distinct odd primes , define the two floor function sums
The parity form of Gauss's lemma gives and . In the open rectangle , , the line separates points below it from points above it. None lies on the line, because and coprimality would force . The total is therefore . Combining that count with the parity identities gives quadratic reciprocity.[ref]
Figure 1.
A line partitions the integer coordinate points behind the quadratic reciprocity exponent
. For , the counts are ; for , they are . Dashed edges mark the excluded boundary of the rectangle. This illustrates the counting step; the separate parity step from Gauss's lemma is essential to relate the count to Legendre symbols. Details.
Legendre symbol Created 2026-09-24 Updated 2026-10-18
For an integer and an odd prime , the Legendre symbol is the integer valued function
Its value depends only on the congruence class of modulo ; the displayed notation is a symbol, not division. The value zero handles separately from quadratic residues and quadratic nonresidues.[ref]
For example, , , , and . The equality illustrates that choosing a different integer representative does not change the answer. An arbitrary odd composite denominator uses the Jacobi symbol, not the Legendre symbol. For instance,
but two is not a square modulo fifteen: any such square root would also give a square root modulo three, where the only nonzero square is one. A Jacobi symbol of one therefore cannot replace the Legendre symbol's square test.
The Legendre symbol also counts square roots compactly. For every congruence class in the prime field ,
The three cases give two, one and zero solutions for a quadratic residue, zero and a quadratic nonresidue, respectively. This is useful when counting solutions of modular congruences involving polynomials: a solvability question becomes a sum of Legendre symbols, as in the complete Legendre-symbol sum and quadratic Legendre-symbol correlation.
Multiplicativity of the Legendre symbol Created 2026-09-29 Updated 2026-10-18
For an odd prime and any integers , the Legendre symbol obeys
In particular, if , then , where is a modular multiplicative inverse. Multiplication by a nonzero square also leaves the Legendre symbol unchanged: for .[ref]
The subgroup and coset arguments under quadratic residue and quadratic nonresidue prove the sign rule without computing a large power: square times square is square, square times nonsquare is nonsquare, and nonsquare times nonsquare is square. If either factor is zero modulo , both sides of the identity vanish. On , the Legendre symbol is thus a group homomorphism to whose kernel of a group homomorphism is the quadratic residue subgroup. Viewed on all integers, it is a completely multiplicative function and a Dirichlet character modulo .
Figure 1.
Products modulo seven: the Legendre symbol reduces a six-by-six table to sign multiplication
. Rows and columns put quadratic residues before quadratic nonresidues . Every cell displays the product modulo seven and its Legendre symbol. The four blocks have signs , showing the subgroup and its other coset. Details.
For an original calculation, factor the numerator . Modulo seven, , agreeing with . Modulo eleven, the signs are instead , giving , agreeing with . The same factorization can therefore certify different square behavior at different prime numbers.
Alternatively, Euler's criterion gives modulo . For nonzero factors both sides correspond to signs in . Since is odd, these signs are distinct modulo , so the modular congruence proves the asserted equality of integers, not merely an equality of representatives.
For a prime number , the nonzero residue classes form the multiplicative group of the finite field . Every class has a unique multiplicative inverse. A class equals its own inverse precisely when , so in the field and or .
For an odd prime, pair each remaining class with its distinct inverse. Each pair contributes one to the product, leaving
For , the same congruence is . This proves Wilson's theorem.
If with an odd prime, then but . The multiplicative order consequently divides four and is neither one nor two, so it is four. The preceding divisibility result makes necessary.
For sufficiency, suppose and put , an even integer. Pair opposite factors in the factorial:
Wilson's theorem gives , explicitly producing a square root of minus one modulo a prime. Thus
Use the standard theorem on reduction of torsion points on an elliptic curve: at a prime of good reduction, reduction is injective on torsion whose order is prime to that prime. Reduction at implies that every odd-primary part of the rational torsion subgroup has order dividing . Thus its only possible odd prime is , and its -primary part has order at most . Reduction at injects the -primary part into a group of order , so that part is trivial. No other primary part can occur.
Consequently the torsion subgroup has order at most three. Since has exact order three,
This argument uses only prime-to-residue-characteristic injectivity, and therefore avoids an unjustified claim of full torsion injectivity at the prime .
Begin with two points at distance one. A ruler draws the line through two known points; a compass draws a circle with a known centre and a constructible radius. New points are intersections of such lines and circles. A real number is constructible when it occurs as a coordinate of a point obtained by finitely many such operations; a complex point is constructible when both coordinates are.
If current coordinates lie in a field , a line-line intersection solves linear equations over , while line-circle or circle-circle intersections reduce to a quadratic equation over . Thus each step requires at most adjoining a square root. Consequently every constructible number lies in a tower
Conversely field sums and differences are obtained by laying off segments, products and quotients by similar triangles, and a positive square root by the geometric-mean construction in a semicircle. Hence every real number in such a tower is constructible. This proves the quadratic-tower criterion, not merely its necessity.
In particular a constructible algebraic number has degree a power of two. Degree alone is not sufficient in general; the exact criterion is containment in a quadratic tower. Equivalently the Galois group of its normal closure is a finite two-group: a tower's normal closure remains a two-extension, and a two-group admits a chain of subgroups with successive index two, yielding the converse by Galois correspondence.
The standard impossibility results follow. Doubling a unit-volume cube requires , whose polynomial is irreducible by Eisenstein and has degree three. Trisecting an arbitrary angle would in particular trisect degrees, requiring , a root of . This cubic has no rational root and is irreducible, so this construction is impossible, although some particular angles can be trisected. Squaring the unit circle requires side length , impossible because is transcendental whereas constructible numbers are algebraic.
For a regular -gon, constructibility is equivalent to that of . The cyclotomic extension is Galois of degree , so it is constructible exactly when this degree is a power of two. Writing the prime factorization of shows the equivalent condition
Indeed odd prime exponents must be one, and each must be a power of two. If is prime, must itself be a power of two by factoring when has an odd divisor. Conversely this factorization makes the cyclotomic Galois group a two-group and provides a quadratic tower. This gives both positive constructions, such as the regular seventeen-gon, and obstructions, such as the regular seven-gon.
Use the usual positive-definite convention for binary quadratic forms with negative discriminant. Reduction by integral changes of variables of determinant one produces a form with , and with on the boundary. For completeness, replacing by makes ; if then , interchange the variables, reversing one sign to keep determinant one. The new positive leading coefficient is smaller. Repeating terminates and gives a reduced form.
For discriminant , and the reduction inequalities give . Thus , is odd and , and . The boundary convention chooses . Hence there is exactly one positive-definite equivalence class, represented by .
For an odd prime represented by this form, the identity shows that is a square modulo . Here , because otherwise and would divide the represented number. Conversely, if is a square modulo , choose odd with . Then is an integral positive-definite form of discriminant . By the preceding reduction it is equivalent to the given form, so its value at is represented by that form. Quadratic reciprocity gives , whose value is one precisely for . The exceptional primes are represented: and . Therefore
Without the positive-definite convention, the first printed assertion is false: also has discriminant but cannot be equivalent to a positive-definite form, because an invertible change of variables preserves its sign.
For the odd prime , the Fermat-Euler theorem gives . Therefore the residue class obeys . Since a prime number dividing a product divides one of its factors,
If is a quadratic residue, choose with . Then is nonzero modulo , and Fermat's little theorem gives
This proves the quadratic residue direction of Euler's criterion.
For coefficients supported on an interval of length , write and . The variance form of the large sieve states
The constant is absolute. One may take the explicit right side , by orthogonality of roots of unity and the exponential-sum large sieve proved in Question 2.
Take , , and the indicator function of the -smooth numbers up to . Applying the given smooth-number density with parameter gives
with a harmless adjustment of the constant for integer endpoints. If an odd prime has least quadratic nonresidue , then : a quadratic nonresidue always occurs among . Every prime factor of every selected smooth number is thus a nonzero quadratic residue modulo . By the multiplicativity of the Legendre symbol, every selected number is a nonzero quadratic residue modulo .
There are nonzero quadratic nonresidue classes, and on all of them. Their contribution to the variance is at least
If denotes the number of exceptional primes, the variance form of the large sieve, with , yields . Consequently
This is the bounded exceptional primes for least quadratic nonresidues argument. Using an interval of length is what matches the term; an interval of length would not give a bounded exceptional set.
Take sieve level and coefficient cutoff . Let be the finite set of odd primes at most . Give one unit of weight for each prime . For an odd squarefree integer on these primes, the sieve distribution is
The residue is coprime to every such , and for all permitted primes. Values of outside the permitted set can be chosen arbitrarily in at primes and extended multiplicatively on squarefree integers.
For the Selberg sieve normalizing sum, and
Here is a direct proof of this lower bound. Restrict the Euler product to . The Mertens first theorem gives , which is at most for large . The Mertens second theorem gives
The truncated Euler-product lower bound, with , now gives .
Use the minimizing Selberg sieve weights from Question 3. Their absolute values are at most one, so the Selberg least-common-multiple weights satisfy . Parts (a) and (b) control the remainder:
The first factor uses the Bombieri–Vinogradov theorem; is below for all sufficiently large . The second uses the permitted . The PDF has the exponent nine, which the TeX transcribes incorrectly. Choose to obtain .
Every twin prime pair with survives the finite sieve, while the pairs with number at most . The Selberg upper-bound sieve thus gives
Therefore the twin-prime count is . The finite cutoff on the forbidden primes is essential: sieving by all odd primes would also discard the large prime values that we are trying to count.
A pointed category has a zero object, both initial and terminal. Factoring through that object gives a zero morphism between any two objects. In this paper a semi-additive structure means commutative-monoid enrichment: every hom-set is a commutative monoid with additive zero, and composition distributes over addition in both variables. No existence of finite products in a category is included in this last definition. This convention matters for the final one-object example; under the stronger convention requiring finite biproducts, that example would not be a semi-additive category.
Let be the given canonical isomorphism. Transfer the coproduct injections across , so is also a coproduct in a category, with injections
Write for the morphism whose composites with are both . For , define the biproduct-induced addition of morphisms by
The zero is the existing zero morphism. We verify the laws from the universal properties, without assuming addition in advance.
All finite canonical maps from coproducts to products are isomorphisms, by induction from the binary ones and the zero object. Thus both and are ternary coproducts in a category. The two iterated fold maps to agree on each of the three injections, hence are equal. Applying this to gives associativity. The interchange swaps the two injections, so its composite with is , giving commutativity. Finally , so , and similarly .
Precomposition is additive because . For , the morphisms and agree on both injections, so they agree; consequently . Composition with a zero morphism is zero. This proves the commutative-monoid enrichment.
It is unique. In any such enrichment, the additive zero morphisms agree with the pointed ones, since each map to or from the zero object belongs to a singleton hom-set. The projections of from are respectively by bilinearity, so
For , composing on the left by and on the right by forces the displayed formula for . Thus the biproducts determine exactly one such enrichment.
For the last part, the underlying one-object category has endomorphism monoid , including , and identity . Its usual addition gives a commutative-monoid enrichment. Any permutation of the prime numbers extends, by unique prime factorization, to a multiplicative monoid automorphism , fixing . Transport addition by
This is a commutative monoid operation with zero , and multiplication distributes over it: applying reduces each distributive law to the ordinary one in . Thus each operation supplies a semi-additive structure on the same fixed composition law.
For each odd prime , take to interchange and , fixing every other prime. Then
Different choices of give different additions, and there are infinitely many prime numbers. Hence there are infinitely many distinct semi-additive structures, even though these transported structures are isomorphic as enriched categories. The underlying one-object category has no terminal object, because its endomorphism set is not a singleton, so it indeed has no finite products in a category.
Quadratic nonresidue Created 2026-09-24 Updated 2026-10-18
A nonzero congruence class modulo an odd prime is a quadratic nonresidue when it is not a square. In the convention of quadratic residue, zero belongs to neither class. Thus are the quadratic nonresidues modulo seven, while are the quadratic nonresidues modulo eleven. No integer satisfies , as the complete square map under quadratic residue shows.
A quadratic nonresidue is not an arithmetic dead end: multiplying by any fixed quadratic nonresidue exchanges the quadratic residues and the quadratic nonresidues. If were a square for a square , division by would make a square. Hence consists entirely of quadratic nonresidues; it has elements, because multiplication by nonzero is a bijection. It therefore equals the entire other coset of the quadratic residue subgroup. Modulo seven, .
The product of two quadratic nonresidues is consequently a quadratic residue: write them as in that same coset, and their product is , a square. For example, , whereas remains a quadratic nonresidue. The multiplicativity of the Legendre symbol packages these rules as ordinary sign multiplication.
Quadratic reciprocity Created 2026-09-24 Updated 2026-10-13
Quadratic reciprocity compares two questions: is the prime number a quadratic residue modulo , and is a quadratic residue modulo ? Let be distinct odd primes. In terms of the Legendre symbol,
The two Legendre symbols have opposite signs exactly when both primes are modulo ; otherwise they are equal. Their values are nonzero because the primes are distinct. Equal signs can mean two quadratic residues or two quadratic nonresidues: reciprocity compares the answers rather than declaring either answer positive.[ref]
For a direct computation, the nonzero quadratic residues modulo are respectively , , and . Squaring just suffices because and have the same square modulo an odd prime .
The pair has a sign flip, whereas has two negative signs. These small quadratic residue tables make the distinction tangible.
Figure 1.
Small prime square-residue tables distinguish opposite and equal Legendre symbol signs
. Each row uses half the nonzero inputs; the missing entries are unnecessary. The comparisons and are exact finite examples of quadratic reciprocity, not evidence by themselves for every prime pair. Details.
The first supplementary law for quadratic reciprocity handles numerator , and the second supplementary law for quadratic reciprocity handles numerator :
For an odd prime , is a quadratic residue exactly when , while is a quadratic residue exactly when . The remaining odd congruence classes modulo , namely , make a quadratic nonresidue. These laws fill the cases excluded from swapping distinct odd primes.[ref]
Quadratic residue Created 2026-09-24 Updated 2026-10-18
For an odd prime , a nonzero congruence class is a quadratic residue when for some integer . Here "quadratic residue" excludes zero: zero is a square of a number, but is neither a quadratic residue nor a quadratic nonresidue under this convention. Some treatments include zero among quadratic residues; the distinction matters when counting them or discussing their subgroup.[ref]
Modulo seven, squaring the six nonzero congruence classes gives
Thus the set of quadratic residues is , and the quadratic nonresidues are . In particular, has exactly the two solutions : and . Modulo eleven the quadratic residues are instead . Two is therefore a quadratic residue modulo seven and a quadratic nonresidue modulo eleven: being a quadratic residue depends on the modulus.
Figure 1.
The square map modulo seven and eleven: two inputs in every nonzero square fiber
. Each pair maps to one quadratic residue. The six nonzero inputs modulo seven give three outputs; the ten modulo eleven give five. The zero fiber is the single input zero, and each quadratic nonresidue has an empty fiber. Details.
Why do the square roots come in pairs? If , the prime number divides , so it divides one factor: or . For nonzero these are distinct, because is an odd prime. Every nonempty nonzero fiber of a function of therefore contains exactly two inputs. Pairing the nonzero congruence classes gives exactly quadratic residues and quadratic nonresidues. Including zero gives different squares, with one rather than two square roots for zero.
The quadratic residues form a subgroup of the multiplicative group of a finite field , with index of a subgroup two. Indeed, one is a square, , and ; the inverses exist because the inputs are nonzero in the prime field. Equivalently, the squaring group homomorphism has kernel of a group homomorphism and image of a function . The apparent loss of a sign in squaring becomes a precise division of the nonzero arithmetic into two equal parts.
This structure turns a search for square roots into a yes-or-no test: Euler's criterion detects quadratic residues through modular exponentiation, and the Legendre symbol records the result as a sign. For a general integer modulus, the modular congruence still makes sense, but the two-root count and the prime field argument need not survive. For example, has four solutions ; the Chinese remainder theorem separates the sign choices modulo three and five.
Tonelli-Shanks algorithm 2026-10-20
The Tonelli-Shanks algorithm finds a square root of a quadratic residue modulo an odd prime. It uses the decomposition of the prime minus one into an odd part and a power of two to successively correct a candidate root.
For a multiplicative monoid automorphism fixing , define . This transports a semiring structure to the fixed underlying multiplication, hence a commutative-monoid enrichment on its one-object category. Swapping prime with an odd prime gives . Infinitely many such primes therefore give infinitely many distinct additions, although the transported enriched categories are isomorphic.