For odd , let be a nonsingular cubic Weierstrass equation of an elliptic curve over . Its Trace of Frobenius is , where is the Legendre symbol extended by . By the Euler criterion, reduce this sum to . The sum of a positive power over is zero unless divides , when it is . Since the polynomial has degree , only its coefficient contributes.
Computing Legendre symbols by quadratic reciprocity Created 2026-10-14 Updated 2026-10-31
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]
Quadratic Reciprocity by Ben Lynn. Ben Lynn, Quadratic Reciprocity, “The Jacobi Symbol”: product definition and reciprocity for computing symbols without factoring
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
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]
Quadratic Residues by Ben Lynn. Ben Lynn, Quadratic Residues, Euler's Criterion and The Legendre Symbol: exponent test and the zero value
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.
For odd and p-adic units , the quadratic Hilbert symbol isThe Legendre symbols record the two unit square classes. For , put and . ThenThe basis of the square-class group of the 2-adic numbers gives this formula: its only negative basis pairings are and . The first is obstructed by sums of squares modulo four, the second by modulo eight; the remaining pairings have explicit field norm representatives.
For a fixed positive odd integer , the Legendre symbol for odd prime denominators depends only on modulo . For prime numerator , quadratic reciprocity expresses it as times a sign determined by modulo four. Factorization of and multiplicativity prove the general statement. If a denominator divides , the congruence forces the other prime denominator to be identical, so the zero cases agree too.
For an odd positive nonsquare integer , there are infinitely many primes with Legendre symbol . Choose a residue modulo with Jacobi symbol by making it a quadratic nonresidue at one prime occurring to odd multiplicity and a square at every other prime. The Chinese remainder theorem also imposes and at any finite list of previously found primes. Then Jacobi reciprocity gives , so a prime factor of has and is outside that list.
A short proof outline connects Gauss's lemma to counting points with integer coordinates. For distinct odd primes , define the two floor function sumsThe 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]
Quadratic Reciprocity by Ben Lynn. Ben Lynn, Quadratic Reciprocity, first theorem and proof of the Law of Quadratic Reciprocity: floor-sum parity and the separating-line count
Legendre symbol Created 2026-09-24 Updated 2026-10-18
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]
Quadratic Residues by Ben Lynn. Ben Lynn, Quadratic Residues, The Legendre Symbol: three values and dependence on an odd prime
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 obeysIn particular, if , then , where is a modular multiplicative inverse. Multiplication by a nonzero square also leaves the Legendre symbol unchanged: for .[ref]
Quadratic Residues by Ben Lynn. Ben Lynn, Quadratic Residues, The Legendre Symbol: multiplicativity and invariance under a nonzero square factor
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 .
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.
If , choose with . The cubic has the three distinct roots , so all four two-torsion points are rational over . They form a subgroup of order four, hence by Lagrange's theorem.
Past exam of the mathematics course of the University of Cambridge 2001 ib Paper 2 17B Solution Created 2026-09-24 Updated 2026-10-14
The Legendre symbol is when is a nonzero square modulo the odd prime , when it is not a square, and when . For the coprime case, Euler's criterion statesWrite . For , the balanced residues are nonzero and their absolute values lie in . If , then . Cancel . The plus sign forces ; the minus sign would require , impossible because . Thus the absolute residues form a permutation of . If exactly are negative, multiplying givesSince does not divide , cancellation and Euler's criterion prove Gauss's lemma:The two signs are distinct modulo the odd prime, so this congruence identifies the integer symbol itself.
For , the balanced representative of is negative precisely when , giving . Checking the four odd residue classes modulo eight gives even for and odd for . HenceThis is the quadratic character of two obtained from the lemma.
Let and . If a prime divides , then is odd and cannot divide . Moreoverso has an explicit nonzero square root modulo . The criterion just proved forces every prime divisor of into the classes or modulo eight. But : if all its prime factors were modulo eight, their product, with multiplicities, would also be . Thus at least one prime divisor is modulo eight. No listed divides , because . This always produces another such prime, proving infinitely many primes are congruent to seven modulo eight, the Euclid proof for infinitely many primes congruent to seven modulo eight.
Past exam of the mathematics course of the University of Cambridge 2002 ib Paper 3 19F Solution Created 2026-09-24 Updated 2026-10-14
Use the standard reduced-form convention , with when or . To reduce a positive definite integral binary quadratic form, choose a primitive integer vector at which the positive integer value is least. Complete that vector to a unimodular basis; it makes the leading coefficient that least value. A shear of the second basis vector by an integer multiple of the first replaces by , allowing . The new is the value at another primitive vector, hence . If , a shear makes without changing ; if and , the determinant-one swap reverses its sign. Thus every form is properly equivalent to a reduced positive definite binary quadratic form. This argument also gives the reduction algorithm for a positive definite binary quadratic form by successively decreasing its positive leading coefficient.
For a negative integral discriminant or , a prime is represented by some integral form of discriminant exactly whenIndeed a representing vector is primitive, since a common divisor of its coordinates would have its square divide . A unimodular change takes it to the first basis vector, giving a form and . Conversely a solution gives the positive definite form , which represents at . For odd this is the discriminant criterion for prime representation by a binary quadratic form: must be a square modulo , with parity chosen to satisfy the modulo-four condition.
For and odd , the Legendre symbol is . The supplementary laws make it positive exactly for . The prime also works directly, since has discriminant and represents . ThereforeThe class here consists only of the prime .
For a reduced form, , so . The integer checks yield the reduced forms of discriminant minus thirty-two:If one omits the boundary sign convention, also appears, but is properly equivalent to . The middle form is imprimitive and represents no odd integer. An odd integer represented by has odd and is . For to be odd, one of must be odd and the other even; substitution modulo eight gives in either case. If both are odd or both even, the value is even. Thus a prime represented by the last form is necessarily .
Conversely, a prime is represented by some discriminant- form, which reduces to one of the three displayed forms without changing its represented integers. The first and second cannot represent it, so the third must. ConsequentlyThe prime is not an exception for this particular form: its minimum positive value is , as also follows from .
Past exam of the mathematics course of the University of Cambridge 2002 ib Paper 3 9F Solution Created 2026-09-24 Updated 2026-10-14
A nonzero residue class is a quadratic residue if for some nonzero . If it is a square, Fermat's little theorem gives . Conversely, the map on the nonzero classes identifies exactly the pairs , giving distinct squares. They are all roots of over the field ; a polynomial of this degree has at most that many roots. Its roots are therefore precisely the squares. This proves Euler's criterionApplying it to gives . The exclusion of is the usual nonzero-residue convention needed for this equivalence.
For distinct odd primes , quadratic reciprocity statesUsing the multiplicativity of the Legendre symbol, and the supplementary law ,The first factor is because ; the second is because the reciprocity sign is positive. Thus .
Past exam of the mathematics course of the University of Cambridge 2003 ib Paper 1 17G a Solution Created 2026-09-24 Updated 2026-10-14
For a nonzero residue modulo an odd prime , the Legendre symbol equals if is a nonzero square modulo and otherwise. The extension to multiples of has value zero. Euler's criterion states
Past exam of the mathematics course of the University of Cambridge 2003 ib Paper 1 17G c Solution Created 2026-09-24 Updated 2026-10-14
Since is nonzero modulo , it has a unique multiplicative inverse in the nonzero residues. The inverse cannot be because that would imply , excluded by the range. Thus as claimed. The congruence givesThe Legendre symbol of the nonzero square is one. Using multiplicativity of the Legendre symbol therefore gives
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 21 2 a Solution Created 2026-10-03 Updated 2026-10-14
For each , count the roots of , and add the identity at infinity. A nonzero quadratic residue gives two roots, zero gives one, and a nonsquare gives none. Equivalently, with the Legendre symbol extended by ,The numbers of affine values, in increasing order starting at zero, areso the answer isAll four reductions are smooth algebraic curves: the original PDF gives the elliptic-curve discriminant , so these odd primes are primes of good reduction.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 23 2 ii Solution Created 2026-10-03 Updated 2026-10-14
For a local field containing the Nth roots of unity, fix the Local Artin map with arithmetic Frobenius convention. The Hilbert norm residue symbol can be defined byIt is independent of the chosen root, continuous and bimultiplicative, factors through in each variable, and gives a nondegenerate pairing on that finite group. It satisfies and for . Its norm interpretation isFor the quadratic Hilbert symbol is symmetric and sign-valued. It is also characterized by the existence of a nonzero solution of . Moreover , and therefore . We now compute both the square-class groups and the pairing explicitly.
For odd , write with . An element is a square exactly when is even and the residue of is a square in . Necessity follows by reduction; sufficiency follows from the simple-root form of Hensel lemma applied to , since is then a unit. If is any unit with nonsquare residue, this givesThe nonsquare unit defines an unramified quadratic extension. Its field norms include every unit and have even valuation, as follows from the local norm calculation below. Thus for every unit, but . Finally , by symmetry and the preceding unit calculation. Bimultiplicativity now proves explicit quadratic Hilbert symbols over the p-adic numbers:Here the factors are Legendre symbols of the nonzero residues. The formula works for arbitrary integer valuations , since only their parity matters.
At , the square of every odd integer is one modulo eight. Conversely, for an odd , apply the strong form of Hensel lemma to at : the error has valuation at least three, while the derivative has valuation one. Thus the unit square classes of the p-adic integers are precisely their four residues modulo eight. Combining this with parity of the valuation givesFor an odd unit putInspection of the residues gives . It remains to compute six basis pairings. Explicit field norms giveindeed , , , and .
In contrast . To justify the obstruction even for rational 2-adic coordinates, write , with integral and at least one odd. Then is zero if exactly one is odd, and one if both are odd. A sum of squares equal to the unit consequently forces and exactly one coordinate odd. Its residue modulo four would then be one, whereas is three.
Similarly . If is a unit, the valuations of the two terms have opposite parity, so cannot cancel. It follows that is an odd integral element and is integral. Modulo eight its norm is then or , never . These signs, symmetry, and bimultiplicativity giveThe two boxed formulas determine the quadratic Hilbert symbol on all nonzero elements, including every rational prime .
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 7 4 Solution Created 2026-10-03 Updated 2026-10-14
For odd , write and use the discrete paraboloidHere surface integration means , whereas ambient norms below use unnormalized counting measure on . With the negative-phase transform convention,When , additive-orthogonality of characters makes this one at and zero at all other points of that plane. When , completing the two squares givesThe Quadratic Gauss sum identity is , where is the Legendre symbol. For completeness, counting the preimages of a square gives for nonzero . Also , by the invertible change and orthogonality of characters. Since , the asserted square identity follows. Thus for ,Using positive phase instead changes the sign inside the character, not the magnitude or any norm estimate.
Define , and define as the smallest constant forThe adjoint relative to these measures is . Consequently , where convolution is the unnormalized ambient sum. Put . Its supremum is at most , so convolution by has norm at most .
Under the unnormalized ambient Fourier transform on a finite group, the convolution multiplier of is , up to the harmless reflection convention. Thus the multiplier of is , with maximum absolute value at most . The Plancherel theorem gives norm at most . The Riesz-Thorin interpolation theorem between these two bounds gives norm at most one for convolution by . Convolution by is the identity, whose norm is at most one for counting measure. Hence .
By Lp duality and Hölder's inequality, . Taking adjoints proves the finite-field paraboloid fourth-moment extension estimateIn fact this argument works for both residue classes of odd primes.
If , choose with . The complete line lies in . For the normalized surface norm is , and orthogonality of characters gives . That annihilator plane has points, so the isotropic-line obstruction to finite-field restriction givesThis tends to infinity along these primes for every , as required.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 28 5 Solution Created 2026-10-03 Updated 2026-10-14
A suitable large sieve statement is the following. If are separated modulo one by at least and is supported on consecutive integers, thenThe sharper classical constant also suffices, but is unnecessary for the requested bound. This is the exponential-sum large sieve.
Put , , and . By the orthogonality of roots of unity,At most of these residue counts are nonzero. The Cauchy-Schwarz inequality gives , and the frequency contributes exactly . Thus, if ,If for some prime, is empty and the result is immediate.
All fractions , , , are distinct reduced fractions. Their circular spacing is at least , because two distinct fractions of these denominators differ modulo one by at least . Apply the large sieve with and , and sum the preceding lower bounds:For and a positive sieve denominator, division provesWhen the denominator is zero this asserts no restriction; that degenerate case is interpreted as a vacuous bound.
For the least-nonresidue application, first establish the positive density of power-smooth integers. Fix , with an integer , and let tend to infinity. Choose ordered primes, with repetitions allowed, in the intervalTheir product satisfies . Every number has , so is -smooth. By partial summation of the Prime number theorem, or the Mertens theorem for reciprocal primes,The number of ordered representations is at leastbecause for .
This representation count must not be confused with a count of distinct integers. A number at most has at most prime factors in that interval, counted with multiplicity. There are therefore only a bounded number, depending on , of ordered -tuples which can occur as divisors of it; the cofactor is then fixed. Dividing by this bounded multiplicity provesfor a fixed and all sufficiently large .
Now work on a dyadic prime interval and let be the primes there with . Take and , so . Let be the -smooth integers at most . The density lemma gives for an absolute .
For each , every prime factor of a member of is at most and is smaller than . Hence it is a nonzero quadratic residue modulo . Multiplicativity of the Legendre symbol makes every member of a nonzero quadratic residue modulo . It therefore avoids all quadratic-nonresidue classes. In the sieve inequality set at exceptional primes and zero at every other prime up to . For odd , , soThus each dyadic interval has at most exceptional primes. The finitely many small intervals can be absorbed into this absolute bound. Summing the intervals up to proves the large-sieve logarithmic exceptional-prime bound for least quadratic nonresidues:The least nonresidue is normally defined for odd primes; any convention at the prime two changes the count by at most one.
Past exam of the mathematics course of the University of Cambridge 2005 ii Paper 1 1H Solution Created 2026-09-24 Updated 2026-10-14
For an odd prime , the Legendre symbol is zero if , one if is a nonzero square modulo , and minus one otherwise. By Gauss lemma, , where counts those least positive residues of which exceed . They correspond to integers among , henceFor , its parity is respectively , the same as that of . ThereforeUse multiplicativity and quadratic reciprocity for the requested composite numerator. Since ,The first reciprocity sign is negative because both primes are ; the subsequent signs are positive because one prime is . Thus .

