Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 14 of 30

Turn square existence into a signed count

Prove Euler’s criterion and Gauss’s lemma, including supplementary residue laws.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

For p=7 and a=3, the first half-multiples are 3, 6, 9, reducing to 3, 6, 2. Replace the residue six by −1, so the signed small representatives are 3,−1, 2. Their magnitudes are exactly 1, 2, 3. One sign was negative, predicting that three is a nonsquare modulo seven. This is Gauss’s lemma in a concrete form.

Predict

Predict why the magnitudes cannot collide. If ai≡±aj modulo p, cancellation gives i≡±j. With 1≤i, j≤(p−1)/2, equality is the only possibility: i+j cannot reach p. This injectivity turns the small representatives into a permutation, allowing their product to be cancelled. Without the half-range restriction, the argument would count duplicates.

Experiment

Inspect the signed reduction.

jaj modulo 7Representative between −3 and 3
133
26−1
322

The product identity gives 3³·3!≡−3! modulo seven. Cancel 3! and obtain 3³≡−1. Verify the power directly, then compare with the square classes 1, 2, 4.

Understand

Euler’s criterion states a^((p−1)/2)≡(a/p) modulo an odd prime p. For a nonzero square a=b², Fermat gives the power one. There are exactly m=(p−1)/2 such classes, and X^m−1 has at most m roots over the field, so nonsquares cannot also give one. Fermat says their mth power squares to one, leaving minus one. For p|a both sides are zero. This supplies the necessary converse: merely showing squares give one would not suffice to identify every nonsquare.

Apply

For p∤a, take the least positive residues of a, 2a,…, ma and let N count those exceeding p/2. Negating those residues gives a permutation of 1,…, m up to sign, as the collision argument proves. Comparing products yields a^m m!≡(−1)^N m!, so Gauss’s lemma follows after cancellation and Euler’s criterion. For a=−1 every term changes sign, giving (−1/p)=(−1)^m. For a=2, the count is m−⌊p/4⌋. Checking p≡1, 3, 5, 7 modulo eight gives signs +,−,−,+, equivalently (2/p)=(−1)^((p²−1)/8).

The absolute-residue permutation used in Gauss’s lemma has a short collision proof. If ai and aj reduce to the same absolute representative, then ai is congruent to either aj or −aj. Since a is invertible modulo p, this gives i=j or i+j=p. For indices between one and (p−1)/2 the second possibility is impossible, because their sum is at most p−1. Thus all representatives are distinct and fill the half-range. This is the precise reason the product can be replaced by the half-factorial; omitting injectivity would leave a gap in the sign computation.

Continue

These supplementary laws handle the factors minus one and two in larger residue calculations. They also expose why residue conditions depend on small modulus classes. The next lesson uses Gauss’s count to compare (p/q) with (q/p). Keep the denominator prime and odd throughout these statements. A symbol for a composite denominator needs a separate definition and does not preserve every square-existence interpretation.

Return to the number theory unit to choose a targeted retry. Continue with prove the sign that appears when primes are exchanged.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Find 3⁵ modulo 11 as its least nonnegative residue.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

For p=7 and a=2, how many of 2, 4, 6 exceed p/2?

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Prove a^((p−1)/2)≡(a/p) mod odd prime p.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Prove Gauss’s lemma for p∤a.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Derive (2/p)=(−1)^((p²−1)/8).

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Apply Gauss’s lemma to −1 and derive its symbol.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.