Math 2.0

Number theory Proof

Proof of Euler's criterion by counting quadratic residues

Builds on Legendre symbolQuadratic residueFermat's little theoremEuclid's lemmaIntegers modulo a prime form a fieldA polynomial over a field has at most as many roots as its degreeCongruence is compatible with powersCongruence modulo n

Proof

  1. Let pp be an odd prime and aa an integer. Let (ap)\left(\frac{a}{p}\right) be the Legendre symbol. Note that (p−1)/2≥1(p-1)/2 \ge 1 is an integer.
  2. If p∣ap \mid a, then p∣a(p−1)/2p \mid a^{(p-1)/2}. So a(p−1)/2≡0=(ap)(modp)a^{(p-1)/2} \equiv 0 = \left(\frac{a}{p}\right) \pmod p. Assume from now on that p∤ap \nmid a.
  3. Let x=a(p−1)/2x = a^{(p-1)/2}. By Fermat's little theorem, x2=ap−1≡1(modp)x^2 = a^{p-1} \equiv 1 \pmod p. So p∣(x−1)(x+1)p \mid (x - 1)(x + 1).
  4. By Euclid's lemma, x≡1x \equiv 1 or x≡−1(modp)x \equiv -1 \pmod p. These two cases exclude each other, because p∤2p \nmid 2.
  5. Suppose aa is a quadratic residue, so a≡y2(modp)a \equiv y^2 \pmod p for an integer yy. Then p∤yp \nmid y, since p∤ap \nmid a.
  6. Then x≡(y2)(p−1)/2=yp−1≡1(modp)x \equiv (y^2)^{(p-1)/2} = y^{p-1} \equiv 1 \pmod p, using powers of congruences and Fermat's little theorem. So x≡1=(ap)x \equiv 1 = \left(\frac{a}{p}\right).
  7. Now we count residues. Let QQ be the set of nonzero classes in ℤ/pℤ\mathbb{Z}/p\mathbb{Z} that are squares. Each such class is y‾2\overline{y}^2 with 1≤y≤p−11 \le y \le p - 1.
  8. Since (p−y)2≡y2(modp)(p - y)^2 \equiv y^2 \pmod p, each class in QQ is y‾2\overline{y}^2 for some yy with 1≤y≤(p−1)/21 \le y \le (p-1)/2.
  9. Let 1≤y<z≤(p−1)/21 \le y < z \le (p-1)/2. If y2≡z2y^2 \equiv z^2, then p∣(z−y)(z+y)p \mid (z - y)(z + y). But 0<z−y<p0 < z - y < p and 0<z+y<p0 < z + y < p, so this contradicts Euclid's lemma.
  10. So the classes y‾2\overline{y}^2 with 1≤y≤(p−1)/21 \le y \le (p-1)/2 are distinct, and QQ has exactly (p−1)/2(p-1)/2 elements.
  11. By steps 5 and 6, every class in QQ is a root of the polynomial X(p−1)/2−1X^{(p-1)/2} - 1 over ℤ/pℤ\mathbb{Z}/p\mathbb{Z}.
  12. The ring ℤ/pℤ\mathbb{Z}/p\mathbb{Z} is a field. So this polynomial has at most (p−1)/2(p-1)/2 roots. By steps 10 and 11, its roots are exactly the elements of QQ.
  13. Suppose aa is a quadratic nonresidue. Then a‾∉Q\overline{a} \notin Q, so a‾\overline{a} is not a root, and x≢1(modp)x \not\equiv 1 \pmod p.
  14. By step 4, x≡−1=(ap)(modp)x \equiv -1 = \left(\frac{a}{p}\right) \pmod p.
  15. In all cases, a(p−1)/2≡(ap)(modp)a^{(p-1)/2} \equiv \left(\frac{a}{p}\right) \pmod p.

Idea

The number x=a(p−1)/2x = a^{(p-1)/2} squares to 11, so it is ±1\pm 1 modulo pp. Residues give +1+1 at once by Fermat. There are exactly (p−1)/2(p-1)/2 nonzero residues, and they already fill all the roots of X(p−1)/2−1X^{(p-1)/2} - 1, so a nonresidue must give −1-1.

Reading path

To understand this page from the ground up, read these 73 pages in order. The foundations come first. The path takes the proofs Proof of Bézout's identity, Proof of cancellation in an integral domain, Proof of the generalized Euclid's lemma, Proof of the commutativity of addition by induction, Proof of Fermat's little theorem by rearrangement, Proof of Euclid's lemma, Proof that R[x] is an integral domain iff R is, Proof of the degree of a product over an integral domain, Proof of strong induction from ordinary induction, Proof that the integers modulo a prime form a field, Proof that congruence is compatible with addition, Proof that a polynomial over a field has at most as many roots as its degree, Proof of the remainder theorem, Proof that congruence is compatible with multiplication, Proof of the well-ordering principle from strong induction, Proof of the division algorithm, Proof of the factor theorem, Proof that congruence is compatible with powers.

  1. Definition by recursion concept
  2. Divisibility definition
  3. Group concept
  4. Mathematical induction concept
  5. Natural numbers object
  6. Peano axioms concept
  7. Congruence modulo n definition
  8. Greatest common divisor definition
  9. Prime number definition
  10. Ring definition
  11. Successor function definition
  12. Quadratic residue definition
  13. Residue class definition
  14. Proof that congruence is compatible with addition proof
  15. Proof that congruence is compatible with multiplication proof
  16. Coprime integers definition
  17. Addition of natural numbers definition
  18. Commutative ring definition
  19. Polynomial ring definition
  20. Ring homomorphism definition
  21. Unit of a ring definition
  22. Zero divisor definition
  23. The successor function is injective statement
  24. Zero is not a successor statement
  25. Congruence is compatible with addition statement
  26. Legendre symbol definition
  27. Congruence is compatible with multiplication statement
  28. Proof of the commutativity of addition by induction proof
  29. Order on the natural numbers definition
  30. Divisibility in a commutative ring definition
  31. Degree of a polynomial definition
  32. Polynomial evaluation definition
  33. Field definition
  34. Integral domain definition
  35. Integers modulo n definition
  36. Proof that congruence is compatible with powers proof
  37. Commutativity of addition statement
  38. Leading coefficient definition
  39. Proof of cancellation in an integral domain proof
  40. Proof of strong induction from ordinary induction proof
  41. Root of a polynomial definition
  42. Evaluation homomorphism definition
  43. Congruence is compatible with powers statement
  44. Monic polynomial definition
  45. Strong induction statement
  46. Multiplicity of a root definition
  47. Proof of the degree of a product over an integral domain proof
  48. Cancellation in an integral domain statement
  49. Proof of the remainder theorem proof
  50. Proof of the well-ordering principle from strong induction proof
  51. Division algorithm for polynomials statement
  52. Degree of a product statement
  53. Well-ordering principle statement
  54. Remainder theorem statement
  55. Proof that R[x] is an integral domain iff R is proof
  56. Proof of the division algorithm proof
  57. Proof of the factor theorem proof
  58. R[x] is an integral domain iff R is statement
  59. Division algorithm statement
  60. Factor theorem statement
  61. Proof of Bézout's identity proof
  62. Proof that a polynomial over a field has at most as many roots as its degree proof
  63. Bézout's identity statement
  64. A polynomial over a field has at most as many roots as its degree statement
  65. Proof that the integers modulo a prime form a field proof
  66. Proof of the generalized Euclid's lemma proof
  67. Integers modulo a prime form a field statement
  68. Generalized Euclid's lemma statement
  69. Proof of Euclid's lemma proof
  70. Euclid's lemma statement
  71. Proof of Fermat's little theorem by rearrangement proof
  72. Fermat's little theorem statement
  73. Proof of Euler's criterion by counting quadratic residues proof

Where this leads

31 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Euler%27s_criterion, Proof
About this page
TagH2SRDFKTWD
URIm2://H2SRDFKTWD
Kindproof
WritingW0 stub
MSC11A15
ProvesEuler's criterion
UsesLegendre symbol, Quadratic residue, Fermat's little theorem, Euclid's lemma, Integers modulo a prime form a field, A polynomial over a field has at most as many roots as its degree, Congruence is compatible with powers, Congruence modulo n
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.