Skip to content
Back to exploration
Mathematical modeling / English

Number Theory | Quadratic Residues: Definition and Examples

Michael Penn · YouTube · 4:44

Open original
READ & KEEP

The explanation, unpacked.

Saves 0

Reviewed learning material · Video analysis · English
Read the full overview

This 150-second introductory number-theory clip defines quadratic residues and quadratic non-residues modulo a positive integer n under the assumption gcd(a,n)=1, then works a concrete example with n=7n=7. The lecturer corrects a brief verbal slip so the defining congruence is x2≡a(modn)x^2 \equiv a \pmod n, notes that later theory will focus mainly on odd prime moduli, computes the squares of 1 through 6 modulo 7, observes a symmetric matching pattern among those results, and concludes that the quadratic residues modulo 7 are 1, 2, and 4. This clip teaches the definition of quadratic residue and quadratic non-residue modulo n under the condition gcd(a,n)=1, then works two explicit examples. First, for n=7n=7, the presenter squares the coprime residues and concludes that 1, 2, 4 are quadratic residues while 3, 5, 6 are non-residues. After erasing the example, he repeats the same strategy for the composite modulus n=8n=8, keeping only 1, 3, 5, 7 because they are relatively prime to 8. All four square to 1 modulo 8, so 1 is the only quadratic residue and 3, 5, 7 are non-residues. The segment ends by previewing proofs of further propositions in the next video.

Use the learning inspector for key ideas and moments, or open the reading tabs for the complete notes.

Chapters

0:00Definition of quadratic residue modulo n0:37Emphasis on odd prime moduli0:50Example setup: n=7n = 71:10Squaring 1 through 6 modulo 71:59Folded symmetry in the list2:19Listing the quadratic residues modulo 72:30Finish the modulo 7 example3:01Transition to a composite modulus3:18Set up the modulo 8 example3:46Square the coprime residues modulo 84:14Conclude residues and non-residues modulo 84:38Preview of next video

Learning script

Generated from the video's visuals and explanation; not verbatim speech.

The clip opens with the formal definition written on the left side of the board: for an integer a and a positive modulus n with gcd⁡(a,n)=1\gcd(a,n)=1, a is called a quadratic residue modulo n exactly when the congruence x2≡a(modn)x^2 \equiv a \pmod n is solvable; otherwise it is a quadratic non-residue.

A brief spoken slip says “a squared,” but the lecturer immediately corrects it to the intended unknown variable x, matching the board formula x2≡a(modn)x^2 \equiv a \pmod n.

After stating the general definition, the lecturer adds that the upcoming theory will mostly concentrate on the important special case where n is an odd prime.

The right side of the board then introduces a concrete example with n=7n=7, chosen because 7 is an odd prime.

To determine the quadratic residues modulo 7, the lecturer directly computes the squares of the nonzero residue classes: 12≡11^2 \equiv 1, 22≡42^2 \equiv 4, 32=9≡23^2 = 9 \equiv 2, 42=16≡24^2 = 16 \equiv 2, 52=25≡45^2 = 25 \equiv 4, and 62=36≡16^2 = 36 \equiv 1, all modulo 7.

Looking at the vertical list, the lecturer points out a mirrored structure: the first and last entries both give 1, the second and fifth both give 4, and the third and fourth both give 2.

From these computations, the distinct residues that occur as squares modulo 7 are collected, yielding the quadratic residues 1,2,41,2,4 modulo 7.

The clip opens with the completed definition already written on the left side of the board: for an integer a and a positive modulus n with gcd(a,n)=1, a is called a quadratic residue modulo n if the congruence x² ≡ a (mod n) is solvable; otherwise it is a quadratic non-residue. The middle column is devoted to the example n=7n=7, and the right column records the conclusion.

From the displayed square computations modulo 7, the distinct square values are 1, 2, and 4. Therefore the presenter states that these are the quadratic residues modulo 7. The remaining coprime classes, 3, 5, and 6, are then labeled quadratic non-residues modulo 7.

Having finished an example with an odd prime modulus, the presenter announces a second example using a composite number. He erases the middle and right portions of the board while leaving the definition untouched, signaling that the same conceptual framework will now be applied to a new modulus.

The new example is modulo 8. The presenter says he will use the same strategy: take all numbers relatively prime to 8, square them, and inspect the resulting residue classes. This makes the method explicit: first filter by coprimality, then compute squares, then classify the outcomes using the definition.

For n=8n=8, the positive residues less than 8 that are relatively prime to 8 are 1, 3, 5, and 7. The numbers 2, 4, and 6 are excluded because they share a factor with 8. This step directly uses the hypothesis gcd(a,n)=1 from the definition.

The presenter then computes the squares modulo 8: 1² ≡ 1, 3² = 9 ≡ 1, 5² = 25 ≡ 1, and 7² = 49 ≡ 1 (mod 8). All four coprime bases collapse to the same residue class, namely 1.

Because the only distinct square value obtained is 1, the conclusion written on the board is that 1 is the only quadratic residue modulo 8. By the complementary part of the definition, the remaining coprime classes 3, 5, and 7 are quadratic non-residues modulo 8.

The segment closes with a brief transition note: this video ends here, and the next one will prove several propositions about quadratic residues. No additional theorem statements are given within this clip.

Knowledge cards

01

Quadratic residue modulo n

For integers a and n with n>0n>0 and gcd(a,n)=1, a is a quadratic residue modulo n if the congruence x2x^2 ≡ a (mod n) has a solution. If no such x exists, a is a quadratic non-residue modulo n.

x2≡a(modn)x^2 \equiv a \pmod n
02

Coprime hypothesis in the definition

The definition explicitly assumes gcd(a,n)=1, so a and n are coprime. This condition is part of the stated setup before deciding whether a is a quadratic residue.

gcd⁡(a,n)=1\gcd(a,n)=1
03

Later focus on odd prime moduli

Although the definition is given for general positive n, the lecturer says the subsequent results will mostly concern the case where n is an odd prime.

04

Example: squares modulo 7

Taking n=7n=7, the lecturer computes the squares of 1 through 6 modulo 7 and obtains the residues 1, 4, 2, 2, 4, 1.

12≡1, 22≡4, 32≡2, 42≡2, 52≡4, 62≡1(mod7)1^2 \equiv 1,\ 2^2 \equiv 4,\ 3^2 \equiv 2,\ 4^2 \equiv 2,\ 5^2 \equiv 4,\ 6^2 \equiv 1 \pmod 7
05

Symmetric pattern in the list of squares mod 7

The six computed congruences display a folded symmetry: 1 pairs with 1, 4 pairs with 4, and 2 pairs with 2 when the list is read from the outside inward.

06

Quadratic residues modulo 7

Collecting the distinct outputs from the example shows that the quadratic residues modulo 7 are exactly 1, 2, and 4.

{1,2,4}\{1,2,4\}
07

Quadratic residue modulo n

The video defines a quadratic residue in a restricted setting: let a be an integer and n a positive integer with gcd(a,n)=1. Then a is a quadratic residue modulo n exactly when the congruence x² ≡ a (mod n) has a solution. The definition is shown on the left side of the board throughout the clip and is used as the basis for both worked examples.

x2≡a(modn)x^2 \equiv a \pmod n
08

Quadratic non-residue modulo n

Under the same hypotheses, the video defines the complementary case. If gcd(a,n)=1 but x² ≡ a (mod n) is not solvable, then a is called a quadratic non-residue modulo n. In the examples, this is applied by identifying the coprime residue classes that do not appear among the computed square values.

09

Method for finding quadratic residues in examples

The worked examples use a direct computational procedure. First list the positive residues less than n that are relatively prime to n. Then square each representative and reduce modulo n. The distinct results are the quadratic residues; the remaining coprime classes are the quadratic non-residues. The presenter explicitly calls this the same strategy when moving from n=7n=7 to n=8n=8.

10

Example: quadratic residues modulo 7

For n=7n=7, the board shows the six coprime classes 1 through 6 and computes their squares modulo 7: 1²≡1, 2²≡4, 3²≡2, 4²≡2, 5²≡4, 6²≡1. The distinct square values are 1, 2, and 4, so those are the quadratic residues modulo 7. The leftover coprime classes 3, 5, and 6 are the quadratic non-residues modulo 7.

11

Example: quadratic residues modulo 8

For n=8n=8, the presenter first keeps only the residues relatively prime to 8, namely 1, 3, 5, and 7, excluding 2, 4, and 6. He then computes 1²≡1, 3²=9≡1, 5²=25≡1, and 7²=49≡1 (mod 8). Since all square computations give 1, the only quadratic residue modulo 8 is 1, and the quadratic non-residues are 3, 5, and 7.

12

Why coprimality matters in these examples

The definition on the board includes the hypothesis gcd(a,n)=1, and the n=8n=8 example makes this operational. The presenter explicitly rejects 2, 4, and 6 because they are not relatively prime to 8. Thus the classification in this clip is not about every residue class modulo n, but only about those coprime to n.

13

Distinct square values versus multiple bases

The modulo 8 example illustrates that several different bases can produce the same residue class after squaring. The bases 1, 3, 5, and 7 are distinct, but all satisfy x² ≡ 1 (mod 8). The quadratic residues are determined by the set of distinct square values, not by counting how many bases lead to each value.

Detailed learning notes

Explore conditions, steps and evidence. Supplementary explanations are labeled separately from content shown in the video.

Symbols · 15

a

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board writes `a∈Za \in \mathbb{Z}` in the definition.

  2. Audio
    Observation

    The speaker says, "if a and n are integers".

Symbol

a

Meaning

An integer whose quadratic-residue status modulo n is being discussed.

Domain

Z\mathbb{Z}

n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board writes `n>0n > 0` and later uses `(modn)\pmod n` and `(mod7)\pmod 7`.

  2. Audio
    Observation

    The speaker says, "n is in addition bigger than zero, so it's a natural number".

Symbol

n

Meaning

Positive modulus; in the example it is specialized to 7.

Domain

Z\mathbb{Z},\ n>0n>0

gcd⁡(a,n)\gcd(a,n)

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board writes `gcd⁡(a,n)=1\gcd(a,n)=1`.

  2. Audio
    Observation

    The speaker says, "the gcd of a and n is one, so they're coprime".

Symbol

gcd⁡(a,n)\gcd(a,n)

Meaning

Greatest common divisor of a and n; the definition requires it to equal 1.

Domain

Integer-valued function on pairs of integers

x

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board writes `x2≡a(modn)x^2 \equiv a \pmod n`.

  2. Audio
    Observation

    The speaker says, "if x squared congruent to a mod n is solvable".

Symbol

x

Meaning

Unknown integer whose square is tested for congruence to a modulo n.

Domain

Integers (implicit from the congruence equation)

≡(modn)\equiv \pmod n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The board repeatedly uses `≡\equiv ... (modn)\pmod n` and `(mod7)\pmod 7`.

  2. Audio
    Observation

    The speaker reads examples such as "congruent to 1 mod 7".

Symbol

≡(modn)\equiv \pmod n

Meaning

Congruence relation modulo n.

Domain

Defined on integers

a

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Left board definition reads: "Let a ∈ ℤ with n>0n > 0 and gcd(a,n)=1. Then a is said to be a quadratic residue modulo n if x² ≡ a (mod n) is solvable."

Symbol

a

Meaning

An integer in the definition of quadratic residue/non-residue; in the worked examples the specific values are the bases being squared or the residues being classified.

Domain

Integers, with the examples using positive residues less than the modulus.

n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Definition line includes "n>0n > 0" and the congruence is written modulo n.

Symbol

n

Meaning

The modulus in the general definition of quadratic residue modulo n.

Domain

Positive integers.

gcd(a,n)

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Definition line includes "gcd(a,n)=1".

Symbol

gcd(a,n)

Meaning

Greatest common divisor of a and n; the definition requires it to equal 1.

Domain

Integer-valued function on pairs of integers.

x2≡a(modn)x^2 \equiv a \pmod n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Definition line includes "x² ≡ a (mod n) is solvable".

Symbol

x2≡a(modn)x^2 \equiv a \pmod n

Meaning

Congruence condition whose solvability determines whether a is a quadratic residue modulo n.

Domain

Congruence relation over integers modulo n.

n=7n=7

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Middle column heading reads "ex: n=7n = 7".

Symbol

n=7n=7

Meaning

Modulus used in the first worked example.

Domain

Specific positive integer modulus.

n=8n=8

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    After erasing the first example, the middle column heading is rewritten as "ex: n=8n = 8".

Symbol

n=8n=8

Meaning

Modulus used in the second worked example.

Domain

Specific positive integer modulus.

1,2,4

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Right column conclusion reads "So 1,2,4 are quadratic residues mod 7."

Symbol

1,2,4

Meaning

Quadratic residues modulo 7 identified from the listed squares.

Domain

Residue classes modulo 7.

Knowledge points · 5

Quadratic residue and quadratic non-residue modulo n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Board text: "Definition: Let a∈Za \in \mathbb{Z} with n>0n>0 and gcd⁡(a,n)=1\gcd(a,n)=1. Then a is said to be a quadratic residue modulo n if x2≡a(modn)x^2 \equiv a \pmod n is solvable. Otherwise it is a quadratic non-residue."

  2. Audio
    Observation

    Speaker states the same definition aloud, including the correction from "a squared" to "x squared".

Definition
Explanation

For an integer a and a positive modulus n with gcd(a,n)=1, a is called a quadratic residue modulo n exactly when the congruence x2≡a(modn)x^2 \equiv a \pmod n has a solution. If that congruence has no solution, a is called a quadratic non-residue modulo n.

Formula
a∈Z, n>0, gcd⁡(a,n)=1;a is a quadratic residue mod n  ⟺  ∃x (x2≡a(modn))a \in \mathbb{Z},\ n>0,\ \gcd(a,n)=1;\quad a \text{ is a quadratic residue mod } n \iff \exists x\ (x^2 \equiv a \pmod n)
Conditions
  1. a is an integer

  2. n>0n>0

  3. gcd⁡(a,n)=1\gcd(a,n)=1

  4. solvability means there exists an integer x satisfying the congruence

Usual focus on odd prime moduli

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says, "we'll mostly be interested when n is an odd prime."

Method
Explanation

Although the definition is stated for any positive modulus n coprime to a, the lecturer announces that the later theory will mainly concentrate on the case where n is an odd prime.

Formula
Conditions
  1. General definition allows any n>0n>0 with gcd⁡(a,n)=1\gcd(a,n)=1

  2. Subsequent emphasis is on odd prime n

Prerequisites
  1. Quadratic residue and quadratic non-residue modulo n

Definition of quadratic residue modulo n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Left board states: "Definition: Let a ∈ ℤ with n>0n > 0 and gcd(a,n)=1. Then a is said to be a quadratic residue modulo n if x² ≡ a (mod n) is solvable."

  2. Audio
    Observation

    The speaker continues the definition by saying that otherwise it is a quadratic non-residue.

Definition
Explanation

The video gives a definition for an integer a relative to a positive modulus n, under the explicit coprimality condition gcd(a,n)=1. It says a is a quadratic residue modulo n exactly when the congruence x² ≡ a (mod n) has a solution. The same setup also defines the complementary case: if that congruence is not solvable, then a is called a quadratic non-residue modulo n.

Formula
x2≡a(modn)x^2 \equiv a \pmod n
Conditions
  1. a ∈ ℤ

  2. n>0n > 0

  3. gcd(a,n)=1

  4. Classification depends on whether x² ≡ a (mod n) is solvable

Definition of quadratic non-residue modulo n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Left board includes: "Otherwise, it is a quadratic non-residue."

  2. Audio
    Observation

    In both examples the speaker labels the leftover coprime residues as quadratic non-residues.

Definition
Explanation

Within the same definition block, the video states the negative case: if a satisfies gcd(a,n)=1 but the congruence x² ≡ a (mod n) is not solvable, then a is a quadratic non-residue modulo n. The examples apply this by taking the coprime residues not appearing among the computed square values.

Formula
Conditions
  1. a ∈ ℤ

  2. n>0n > 0

  3. gcd(a,n)=1

  4. x² ≡ a (mod n) is not solvable

Prerequisites
  1. Definition of quadratic residue modulo n

Example method: classify residues by squaring the coprime classes

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says: "We're going to use the same strategy. So we're going to take all of the numbers that are relatively prime to 8 and square them and see what we get."

  2. Formula
    Observation

    For n=8n=8 he lists 1,3,5,7 and computes their squares modulo 8.

Method
Explanation

The worked examples use a direct computational method. First list the positive residues less than n that are relatively prime to n. Then square each one and reduce modulo n. The distinct results are the quadratic residues; the remaining coprime residues are the quadratic non-residues. This method is shown explicitly for n=7n=7 and again for n=8n=8.

Formula
Conditions
  1. Use the definition with gcd(a,n)=1

  2. Compute x² mod n for representatives x coprime to n

  3. Collect distinct square values as residues

Prerequisites
  1. Definition of quadratic residue modulo n
  2. Definition of quadratic non-residue modulo n
Claims and conditions · 4

Quadratic residues modulo 7

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Middle column lists 1²≡1, 2²≡4, 3²≡2, 4²≡2, 5²≡4, 6²≡1 (mod 7).

  2. Formula
    Observation

    Right column writes: "So 1,2,4 are quadratic residues mod 7."

Proposition
Statement

For modulus 7, the quadratic residues among the coprime residues are 1, 2, and 4.

Hypotheses
  1. n=7n=7

  2. Consider residues relatively prime to 7

  3. Use the definition of quadratic residue via solvability of x² ≡ a (mod 7)

Quantifiers

For the listed residue classes modulo 7.

Quadratic non-residues modulo 7

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says: "whatever's left, so which is 3, 5, and 6, are quadratic non-residues mod 7."

  2. Formula
    Observation

    Right column writes: "3,5,6 are quad non-residues mod 7."

Proposition
Statement

For modulus 7, the quadratic non-residues among the coprime residues are 3, 5, and 6.

Hypotheses
  1. n=7n=7

  2. Residues 3,5,6 are coprime to 7

  3. They do not appear among the square values 1,2,4 modulo 7

Quantifiers

For the listed residue classes modulo 7.

Unique quadratic residue modulo 8

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Middle column lists 1²≡1, 3²≡1, 5²≡1, 7²≡1 (mod 8).

  2. Formula
    Observation

    Right column writes: "1 is the only quadratic residue modulo 8."

Proposition
Statement

For modulus 8, 1 is the only quadratic residue among the coprime residues.

Hypotheses
  1. n=8n=8

  2. Consider residues relatively prime to 8

  3. Use the definition of quadratic residue via solvability of x² ≡ a (mod 8)

Quantifiers

Among the coprime residue classes modulo 8.

Quadratic non-residues modulo 8

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says: "So we have 1 as a quadratic residue, that means 3, 5, and 7 are quadratic non-residues."

Proposition
Statement

For modulus 8, the quadratic non-residues among the coprime residues are 3, 5, and 7.

Hypotheses
  1. n=8n=8

  2. Residues 3,5,7 are coprime to 8

  3. They are not equal to the sole square value 1 modulo 8

Quantifiers

For the listed residue classes modulo 8.

Derivations and proofs · 4

Computing the squares modulo 7

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says, "what we're going to do is just square all of the numbers mod 7 and see what the outputs are."

  2. Formula
    Observation

    Board lists `12≡11^2 \equiv 1`, `22≡42^2 \equiv 4`, `32=9≡23^2 = 9 \equiv 2`, `42=16≡24^2 = 16 \equiv 2`, `52=25≡45^2 = 25 \equiv 4`, `62=36≡16^2 = 36 \equiv 1` all `( mod 7\bmod 7)`.

Numerical verification
Steps
  1. Expression
    12≡1(mod7)1^2 \equiv 1 \pmod 7
    Explanation

    Square 1 and reduce modulo 7.

    Justification

    Direct computation.

    Shown in the video
  2. Expression
    22≡4(mod7)2^2 \equiv 4 \pmod 7
    Explanation

    Square 2 and reduce modulo 7.

    Justification

    Direct computation.

    Shown in the video
  3. Expression
    32=9≡2(mod7)3^2 = 9 \equiv 2 \pmod 7
    Explanation

    Square 3 to get 9, then reduce 9 modulo 7.

    Justification

    Direct computation and reduction modulo 7.

    Shown in the video
  4. Expression
    42=16≡2(mod7)4^2 = 16 \equiv 2 \pmod 7
    Explanation

    Square 4 to get 16, then reduce 16 modulo 7.

    Justification

    Direct computation and reduction modulo 7.

    Shown in the video
  5. Expression
    52=25≡4(mod7)5^2 = 25 \equiv 4 \pmod 7
    Explanation

    Square 5 to get 25, then reduce 25 modulo 7.

    Justification

    Direct computation and reduction modulo 7.

    Shown in the video
  6. Expression
    62=36≡1(mod7)6^2 = 36 \equiv 1 \pmod 7
    Explanation

    Square 6 to get 36, then reduce 36 modulo 7.

    Justification

    Direct computation and reduction modulo 7.

    Shown in the video
Conclusion

The residues obtained by squaring 1 through 6 modulo 7 are 1, 4, 2, 2, 4, 1.

Symmetry observed in the list of squares modulo 7

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says, "if we fold this list over this line right here they match. So two matches with two, four with four, and one with one."

  2. Diagram
    Observation

    The six displayed congruences are arranged vertically, and the speaker gestures toward the middle of the list.

Intuitive argument
Steps
  1. Expression
    12↔621^2 \leftrightarrow 6^2
    Explanation

    Compare the first and last entries of the list.

    Justification

    Both reduce to 1 modulo 7.

    Shown in the video
  2. Expression
    22↔522^2 \leftrightarrow 5^2
    Explanation

    Compare the second and fifth entries.

    Justification

    Both reduce to 4 modulo 7.

    Shown in the video
  3. Expression
    32↔423^2 \leftrightarrow 4^2
    Explanation

    Compare the third and fourth entries.

    Justification

    Both reduce to 2 modulo 7.

    Shown in the video
Conclusion

The list of squares modulo 7 has a mirrored structure: matching pairs give the same residue.

Derivation of residues and non-residues modulo 7

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Middle column shows the six square computations modulo 7.

  2. Formula
    Observation

    Right column states the resulting residue and non-residue sets.

Numerical verification
Steps
  1. Expression
    12≡1(mod7)1^2 \equiv 1 \pmod 7
    Explanation

    Square the first coprime representative and reduce modulo 7.

    Justification

    Direct modular arithmetic.

    Shown in the video
  2. Expression
    22≡4(mod7)2^2 \equiv 4 \pmod 7
    Explanation

    Square the next representative and reduce modulo 7.

    Justification

    Direct modular arithmetic.

    Shown in the video
  3. Expression
    32=9≡2(mod7)3^2 = 9 \equiv 2 \pmod 7
    Explanation

    Compute 9 and reduce it modulo 7.

    Justification

    Reduction of an integer modulo 7.

    Shown in the video
  4. Expression
    42=16≡2(mod7)4^2 = 16 \equiv 2 \pmod 7
    Explanation

    Compute 16 and reduce it modulo 7.

    Justification

    Reduction of an integer modulo 7.

    Shown in the video
  5. Expression
    52=25≡4(mod7)5^2 = 25 \equiv 4 \pmod 7
    Explanation

    Compute 25 and reduce it modulo 7.

    Justification

    Reduction of an integer modulo 7.

    Shown in the video
  6. Expression
    62=36≡1(mod7)6^2 = 36 \equiv 1 \pmod 7
    Explanation

    Compute 36 and reduce it modulo 7.

    Justification

    Reduction of an integer modulo 7.

    Shown in the video
  7. Expression
    {1,2,4}\{1,2,4\}
    Explanation

    Collect the distinct square values obtained modulo 7.

    Justification

    By the definition, these are the quadratic residues modulo 7.

    Shown in the video
  8. Expression
    {3,5,6}\{3,5,6\}
    Explanation

    Take the remaining coprime residues not appearing in the square-value set.

    Justification

    By the definition, these are the quadratic non-residues modulo 7.

    Shown in the video
Conclusion

Modulo 7, the quadratic residues are 1, 2, 4 and the quadratic non-residues are 3, 5, 6.

Derivation of residues and non-residues modulo 8

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Middle column lists 1,3,5,7 and then their squares modulo 8.

  2. Audio
    Observation

    Speaker explains which numbers are relatively prime to 8 and then computes the squares.

  3. Formula
    Observation

    Right column concludes that 1 is the only quadratic residue modulo 8.

Numerical verification
Steps
  1. Expression
    gcd⁡(1,8)=1, gcd⁡(3,8)=1, gcd⁡(5,8)=1, gcd⁡(7,8)=1\gcd(1,8)=1,\ \gcd(3,8)=1,\ \gcd(5,8)=1,\ \gcd(7,8)=1
    Explanation

    Identify the positive residues less than 8 that are relatively prime to 8.

    Justification

    Direct check of coprimality with 8.

    Shown in the video
  2. Expression
    12≡1(mod8)1^2 \equiv 1 \pmod 8
    Explanation

    Square the first coprime representative.

    Justification

    Direct modular arithmetic.

    Shown in the video
  3. Expression
    32=9≡1(mod8)3^2 = 9 \equiv 1 \pmod 8
    Explanation

    Compute 9 and reduce modulo 8.

    Justification

    Reduction of an integer modulo 8.

    Shown in the video
  4. Expression
    52=25≡1(mod8)5^2 = 25 \equiv 1 \pmod 8
    Explanation

    Compute 25 and reduce modulo 8.

    Justification

    Reduction of an integer modulo 8.

    Shown in the video
  5. Expression
    72=49≡1(mod8)7^2 = 49 \equiv 1 \pmod 8
    Explanation

    Compute 49 and reduce modulo 8.

    Justification

    Reduction of an integer modulo 8.

    Shown in the video
  6. Expression
    {1}\{1\}
    Explanation

    Collect the distinct square values obtained modulo 8.

    Justification

    By the definition, these are the quadratic residues modulo 8.

    Shown in the video
  7. Expression
    {3,5,7}\{3,5,7\}
    Explanation

    Take the remaining coprime residues not appearing among the square values.

    Justification

    By the definition, these are the quadratic non-residues modulo 8.

    Shown in the video
Conclusion

Modulo 8, the only quadratic residue among the coprime residues is 1, and the non-residues are 3, 5, 7.

Worked examples · 3

Example with modulus 7

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Board writes "ex: n=7n=7" and then the six square congruences.

  2. Audio
    Observation

    Speaker says, "So let's take n equals 7" and proceeds to square all numbers mod 7.

Problem

Determine which residues arise as squares modulo 7 and identify the quadratic residues among them.

Given
  1. n=7n=7

  2. Consider the integers 1,2,3,4,5,6 modulo 7

Goal

Compute x2(mod7)x^2 \pmod 7 for these x-values and read off the quadratic residues.

Steps
  1. Expression
    12≡1(mod7)1^2 \equiv 1 \pmod 7
    Explanation

    Compute the square of 1 modulo 7.

    Justification

    Direct calculation.

    Shown in the video
  2. Expression
    22≡4(mod7)2^2 \equiv 4 \pmod 7
    Explanation

    Compute the square of 2 modulo 7.

    Justification

    Direct calculation.

    Shown in the video
  3. Expression
    32=9≡2(mod7)3^2 = 9 \equiv 2 \pmod 7
    Explanation

    Compute the square of 3 and reduce.

    Justification

    Direct calculation.

    Shown in the video
  4. Expression
    42=16≡2(mod7)4^2 = 16 \equiv 2 \pmod 7
    Explanation

    Compute the square of 4 and reduce.

    Justification

    Direct calculation.

    Shown in the video
  5. Expression
    52=25≡4(mod7)5^2 = 25 \equiv 4 \pmod 7
    Explanation

    Compute the square of 5 and reduce.

    Justification

    Direct calculation.

    Shown in the video
  6. Expression
    62=36≡1(mod7)6^2 = 36 \equiv 1 \pmod 7
    Explanation

    Compute the square of 6 and reduce.

    Justification

    Direct calculation.

    Shown in the video
  7. Expression
    {1,2,4}\{1,2,4\}
    Explanation

    Collect the distinct outputs from the six computations.

    Justification

    These are exactly the residues represented by some square modulo 7.

    Derived from the video
Answer

The quadratic residues modulo 7 are 1, 2, and 4.

Verification

Each listed residue appears among the computed squares modulo 7, and no other nonzero residue appears in the list.

Worked example: quadratic residues modulo 7

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Middle column heading reads "ex: n=7n = 7" with six square congruences.

  2. Formula
    Observation

    Right column states the residue and non-residue conclusions.

Problem

Classify the quadratic residues and non-residues modulo 7 using the definition.

Given
  1. n=7n=7

  2. Coprime residues to consider: 1,2,3,4,5,6

  3. Computed squares modulo 7 are shown on the board

Goal

Determine which residue classes modulo 7 are quadratic residues and which are quadratic non-residues.

Steps
  1. Expression
    12≡1(mod7)1^2 \equiv 1 \pmod 7
    Explanation

    Start with the first representative and reduce its square.

    Justification

    Direct computation.

    Shown in the video
  2. Expression
    22≡4(mod7)2^2 \equiv 4 \pmod 7
    Explanation

    Continue through the representatives.

    Justification

    Direct computation.

    Shown in the video
  3. Expression
    32=9≡2(mod7)3^2 = 9 \equiv 2 \pmod 7
    Explanation

    Reduce 9 modulo 7.

    Justification

    Direct computation.

    Shown in the video
  4. Expression
    42=16≡2(mod7)4^2 = 16 \equiv 2 \pmod 7
    Explanation

    Reduce 16 modulo 7.

    Justification

    Direct computation.

    Shown in the video
  5. Expression
    52=25≡4(mod7)5^2 = 25 \equiv 4 \pmod 7
    Explanation

    Reduce 25 modulo 7.

    Justification

    Direct computation.

    Shown in the video
  6. Expression
    62=36≡1(mod7)6^2 = 36 \equiv 1 \pmod 7
    Explanation

    Reduce 36 modulo 7.

    Justification

    Direct computation.

    Shown in the video
  7. Expression
    1,2,41,2,4
    Explanation

    Read off the distinct square values as the residues.

    Justification

    Definition of quadratic residue via solvability of x² ≡ a (mod n).

    Shown in the video
  8. Expression
    3,5,63,5,6
    Explanation

    The remaining coprime classes are the non-residues.

    Justification

    Definition of quadratic non-residue as the unsolvable case.

    Shown in the video
Answer

Quadratic residues mod 7: 1, 2, 4. Quadratic non-residues mod 7: 3, 5, 6.

Verification

The listed square values modulo 7 are exactly 1, 2, and 4, and the remaining coprime classes are 3, 5, and 6.

Worked example: quadratic residues modulo 8

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Middle column heading reads "ex: n=8n = 8" and lists 1,3,5,7 with their squares modulo 8.

  2. Audio
    Observation

    Speaker says this is a composite-number example and uses the same strategy.

  3. Formula
    Observation

    Right column states: "1 is the only quadratic residue modulo 8."

Problem

Classify the quadratic residues and non-residues modulo 8 using the same strategy as before.

Given
  1. n=8n=8

  2. Only residues relatively prime to 8 are considered: 1,3,5,7

  3. Squares modulo 8 are computed on the board

Goal

Determine which coprime residue classes modulo 8 are quadratic residues and which are quadratic non-residues.

Steps
  1. Expression
    1,3,5,71,3,5,7
    Explanation

    Select the positive residues less than 8 that are relatively prime to 8.

    Justification

    The definition requires gcd(a,n)=1, and the speaker explicitly excludes 2,4,6.

    Shown in the video
  2. Expression
    12≡1(mod8)1^2 \equiv 1 \pmod 8
    Explanation

    Square the first selected representative.

    Justification

    Direct computation.

    Shown in the video
  3. Expression
    32=9≡1(mod8)3^2 = 9 \equiv 1 \pmod 8
    Explanation

    Reduce 9 modulo 8.

    Justification

    Direct computation.

    Shown in the video
  4. Expression
    52=25≡1(mod8)5^2 = 25 \equiv 1 \pmod 8
    Explanation

    Reduce 25 modulo 8.

    Justification

    Direct computation.

    Shown in the video
  5. Expression
    72=49≡1(mod8)7^2 = 49 \equiv 1 \pmod 8
    Explanation

    Reduce 49 modulo 8.

    Justification

    Direct computation.

    Shown in the video
  6. Expression
    11
    Explanation

    All square computations give the same residue class.

    Justification

    Distinct square values determine the quadratic residues.

    Shown in the video
  7. Expression
    3,5,73,5,7
    Explanation

    The other coprime classes are therefore non-residues.

    Justification

    Definition of quadratic non-residue as the unsolvable case.

    Shown in the video
Answer

The only quadratic residue modulo 8 is 1; the quadratic non-residues are 3, 5, 7.

Verification

Each coprime base 1,3,5,7 squares to 1 modulo 8, so no other coprime class appears as a square value.

Visual events · 3

Blackboard organization of definition and worked example

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    A blackboard is split into a left definition panel and a right example panel.

  2. Animation
    Observation

    The lecturer points to the definition, then writes the example heading and the six congruences on the right side.

Objects
  1. Left panel with the formal definition

  2. Right panel headed "ex: n=7n=7"

  3. Vertical list of six congruences modulo 7

Changes
  1. Right panel begins blank

  2. Then `ex: n=7n=7` is written

  3. Then the six square congruences are added one by one

  4. Finally the speaker gestures at the symmetry among the rows

Invariants
  1. Left-panel definition remains visible throughout

  2. Modulus 7 remains fixed during the example

Interpretation

The visual layout separates the general definition from a concrete computational example, making the transition from abstract criterion to explicit residue testing easy to follow.

Three-column blackboard organization

Clear evidence
Shown in the video
Evidence
  1. Diagram
    Observation

    The blackboard is divided into three vertical sections: definition on the left, worked computations in the middle, and conclusions on the right.

Objects
  1. Left definition panel

  2. Middle example-computation panel

  3. Right conclusion panel

  4. Presenter writing with chalk

Changes
  1. The middle and right panels are first filled with the n=7n=7 example.

  2. Around 42 seconds the presenter erases the middle and right panels while leaving the left definition intact.

  3. The middle and right panels are then refilled with the n=8n=8 example.

Invariants
  1. The left definition remains visible throughout the clip.

  2. The mathematical task stays the same: classify quadratic residues and non-residues for a chosen modulus.

Interpretation

The visual layout separates theory from computation and conclusion, making the examples read as applications of the fixed definition on the left.

Transition from odd-prime example to composite example

Clear evidence
Shown in the video
Evidence
  1. Animation
    Observation

    The presenter wipes away the previous example content from the middle and right columns before rewriting a new heading.

Objects
  1. Chalkboard eraser/hand motion

  2. Old n=7n=7 computations

  3. New blank middle/right space

Changes
  1. The n=7n=7 computations and conclusions disappear.

  2. A new heading for n=8n=8 is written in the middle column.

Invariants
  1. The definition on the left does not change.

  2. The method of squaring coprime representatives is carried over to the new modulus.

Interpretation

This visual reset marks a shift from an odd prime modulus to a composite modulus while keeping the same definitional framework.

Misconceptions · 3

Confusing the unknown variable with the residue being tested

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says, "if a squared is congruent sorry if x squared congruent to a mod n is solvable."

Misconception

One might think the defining equation is a2≡a(modn)a^2 \equiv a \pmod n because the speaker initially misspeaks.

Clarification

The corrected and board-written condition is x2≡a(modn)x^2 \equiv a \pmod n: x is the unknown being solved for, while a is the integer whose residue status is under discussion.

Do not include non-coprime residues in this definition-based classification

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    For n=8n=8 the speaker explicitly says: "2 is not relatively prime, so we can't use that. 4 is not, so we can't use that. 6 is not," and only keeps 1,3,5,7.

Misconception

One might try to classify every residue modulo n as a quadratic residue or non-residue without checking gcd(a,n)=1.

Clarification

The video's definition applies only when gcd(a,n)=1. In the n=8n=8 example, 2, 4, and 6 are excluded before squaring because they are not relatively prime to 8.

Multiple bases can yield the same residue

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    For n=8n=8, four different bases 1,3,5,7 all produce the same square value 1 modulo 8.

  2. Audio
    Observation

    The speaker concludes from the repeated outputs that 1 is the only quadratic residue modulo 8.

Misconception

One might expect each coprime base to produce a different quadratic residue.

Clarification

The examples show that several different bases can square to the same residue class. What matters is the set of distinct square values modulo n, not the number of bases used to obtain them.

Concept relations · 8

Quadratic residue and quadratic non-residue modulo n → Example with modulus 7

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Left panel gives the general definition; right panel applies it with n=7n=7.

  2. Audio
    Observation

    Speaker moves from the definition directly into "let's look at an example".

Application
Explanation

The example with n=7n=7 applies the general definition by explicitly computing which residues occur as squares modulo 7.

Quadratic residue and quadratic non-residue modulo n → Usual focus on odd prime moduli

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    After stating the general definition, the speaker says future results will mostly concern odd prime n.

Special case
Explanation

Odd prime moduli are a special case of the general definition that the lecturer highlights for later theory.

Symmetry observed in the list of squares modulo 7 → Example with modulus 7

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker notes the folded matching pattern before listing the residues.

  2. Formula
    Observation

    The repeated residues 1,4,2 appear in symmetric positions in the six-row list.

Proof dependency
Explanation

The observed mirrored structure helps justify why only three distinct residues, 1, 2, and 4, are collected as the quadratic residues modulo 7.

Definition of quadratic residue modulo n → Example method: classify residues by squaring the coprime classes

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The left definition introduces solvability of x² ≡ a (mod n).

  2. Audio
    Observation

    The speaker says for n=8n=8: "We're going to use the same strategy" and then squares the coprime representatives.

Application
Explanation

The computational method is an application of the definition: by squaring candidate bases and reducing modulo n, one directly tests which coprime residues occur as square values.

Definition of quadratic residue modulo n → Definition of quadratic non-residue modulo n

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The definition states the residue case and then says "Otherwise, it is a quadratic non-residue."

  2. Formula
    Observation

    Both examples split the coprime classes into square values and leftover classes.

Contrast
Explanation

Quadratic non-residue is defined as the complementary case to quadratic residue under the same coprimality hypothesis.

Worked example: quadratic residues modulo 7 → Worked example: quadratic residues modulo 8

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says: "we've looked at an example where we have an odd prime, and so now I'm going to do one more example where we have a composite number just for good measure."

  2. Formula
    Observation

    Both examples use the same three-step pattern: list coprime classes, square them, classify the outcomes.

Contrast
Explanation

The two examples contrast an odd prime modulus with a composite modulus while using the same definition-driven procedure.

Example method: classify residues by squaring the coprime classes → Quadratic residues modulo 7

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The n=7n=7 square computations lead directly to the stated residue and non-residue sets.

Proof dependency
Explanation

The claim about residues modulo 7 depends on the method of computing distinct square values from coprime representatives.

Example method: classify residues by squaring the coprime classes → Unique quadratic residue modulo 8

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    The n=8n=8 square computations lead directly to the statement that 1 is the only quadratic residue modulo 8.

Proof dependency
Explanation

The uniqueness claim for modulo 8 follows from the explicit computation that all coprime bases square to 1.

Find an answer · 14

What does it mean for an integer a to be a quadratic residue modulo n?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Definition written on the left side of the board.

  2. Audio
    Observation

    Speaker explains the definition verbally.

Knowledge points
  1. Quadratic residue and quadratic non-residue modulo n

Why does the definition require gcd(a,n)=1?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Board includes `gcd⁡(a,n)=1\gcd(a,n)=1` in the hypothesis.

  2. Audio
    Observation

    Speaker says, "so they're coprime".

Knowledge points
  1. Quadratic residue and quadratic non-residue modulo n

How do you find the quadratic residues modulo 7 by direct computation?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Six explicit congruences modulo 7 are written on the board.

  2. Audio
    Observation

    Speaker says he will square all numbers mod 7 and see the outputs.

Knowledge points
  1. Example with modulus 7
  2. Computing the squares modulo 7

What is the significance of the matching pattern in the list of squares modulo 7?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says the list can be folded and the entries match.

  2. Diagram
    Observation

    Vertical arrangement of the six congruences makes the pairing visible.

Knowledge points
  1. Symmetry observed in the list of squares modulo 7
  2. Example with modulus 7

Why does the lecturer emphasize odd primes after giving the general definition?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says later results will mostly be about odd prime n.

Knowledge points
  1. Usual focus on odd prime moduli

What is the definition of a quadratic residue modulo n given in the video?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Left board definition is visible throughout.

Knowledge points
  1. Definition of quadratic residue modulo n

When is an integer called a quadratic non-residue modulo n?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Left board includes the "Otherwise" clause.

Knowledge points
  1. Definition of quadratic non-residue modulo n

Why does the video only test numbers relatively prime to the modulus in the examples?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker excludes 2,4,6 for n=8n=8 because they are not relatively prime to 8.

Knowledge points
  1. Definition of quadratic residue modulo n
  2. Do not include non-coprime residues in this definition-based classification

Which numbers are quadratic residues modulo 7 in the worked example?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Right column states the n=7n=7 conclusion.

Knowledge points
  1. Worked example: quadratic residues modulo 7
  2. Quadratic residues modulo 7

Which numbers are quadratic non-residues modulo 7?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Right column states the n=7n=7 non-residue conclusion.

Knowledge points
  1. Worked example: quadratic residues modulo 7
  2. Quadratic non-residues modulo 7

What are the quadratic residues modulo 8 according to the example?

Clear evidence
Shown in the video
Evidence
  1. Formula
    Observation

    Right column states that 1 is the only quadratic residue modulo 8.

Knowledge points
  1. Worked example: quadratic residues modulo 8
  2. Unique quadratic residue modulo 8

Why are 3, 5, and 7 called quadratic non-residues modulo 8?

Clear evidence
Shown in the video
Evidence
  1. Audio
    Observation

    Speaker says 3, 5, and 7 are quadratic non-residues.

Knowledge points
  1. Worked example: quadratic residues modulo 8
  2. Quadratic non-residues modulo 8
Coverage and review notes

Covered · General definition of quadratic residue and quadratic non-residue modulo n, including the coprimality hypothesis and the spoken self-correction from a2a^2 to x2x^2.

Covered · Lecturer states that later results will mostly focus on the case where n is an odd prime.

Covered · Worked example with n=7n=7: compute the squares of 1 through 6 modulo 7 and record the resulting residues.

Covered · Observation of the mirrored or folded structure among the six displayed congruences.

Covered · Conclusion of the example: list the quadratic residues modulo 7 as 1, 2, and 4.

Covered · Opening segment completes the n=7n=7 example and states the residue/non-residue classification.

Covered · Speaker transitions verbally from an odd prime example to a composite example and erases the middle/right board content.

Covered · Full n=8n=8 worked example: identify coprime residues, square them, conclude unique residue 1 and non-residues 3,5,7.

Covered · Closing remarks announce that the next video will prove propositions about quadratic residues; no new mathematical content is introduced.

Explore the knowledge in this video

Reviewed subject paths