Professional Documents
Culture Documents
Algebra
Aditya Khurmi
Just like when a > 0, x2 = a has two solutions if a > 0, one solution if
a = 0, otherwise 0. Similarly show that
Lemma
If a ̸≡ 0 (mod p) is a quadratic residue, then x2 ≡ a (mod p) has two
solutions.
{12 , 22 , . . . , (p − 1)2 }.
The famous Fermat’s christmas theorem states for a prime p > 2, the
number −1 is a quadratic residue mod p if p ≡ 1 (mod p) and a
quadratic non-residue if p ≡ 3 (mod 4).
There’s a nice algebraic way to write this:
−1
= (−1)(p−1)/2 .
p
Lemma
We have the following (remember that we are dealing with non-zero
residues)
1 QR × QR = QR;
2 QR × N QR = N QR;
3 N QR × N QR = QR.
The first one makes sense. The second one is slightly intuitive (because
it is similar to what holds for normal integers). The proof is easy too
(use the method of contradiction and multiply by an inverse).
What about the last case?
So what does this scary sounding topic really mean? At its heart, it
basically means: convert everything to algebra! The Legendre symbol
was our first step in doing that.
They key result we will use to change the new notation to algebra is
Euler’s theorem:
a
≡ a(p−1)/2 (mod p)
p
The degree part was slightly sloppy. In reality, we can’t easily bound
the number of roots of polynomials in fields. However, Lagrange’s
theorem tells us this is possible here. To read more about it, you can
refer to the section “Lagrange’s Theorem” on page 153 of the book.
We can also prove the result using primitive roots, where we have the
following incredible result:
Lemma (Primitive Roots and Quadratic Residues)
Let g be a primitive root modulo p. Then for any a ̸≡ 0 (mod p), write
a = g k . Then a is a quadratic residue if and only if k is even.
Problem
Show that the Legendre’s symbol is multiplicative using Euler’s theorem.
p p
X n+c X
≡ (n + c)w
p
n=1 n=1
p
X
w w w−1 w
≡ n + n c + ··· + c (mod p)
1
n=1
p p p
! ! !
X
w w X
w−1 w
X
0
≡ n + c n + ··· + c n
1
n=1 n=1 n=1
≡0 (mod p).
For general quadratics, a useful result we can obtain from this is:
Lemma
If a, b are not congruent, then
p
X (n + a)(n + b)
= −1.
p
n=1
Problem
Let p be an odd prime and let Fp denote (the field of ) integers modulo
p. How many elements are in the set
{x2 : x ∈ Fp } ∩ {y 2 + 1 : y ∈ Fp }?
Hence
1
N = p + 2 + (−1)(p−1)/2 .
4
Problem
Find the number of solutions to x2 + y 2 ≡ 1 (mod p).
02 12 22 32 42 52 62
02 0 1 4 2 2 4 1
12 1 2 5 3 3 5 2
22 4 5 1 6 6 1 5
32 2 3 5 4 4 5 3
42 2 3 5 4 4 5 3
52 4 5 1 6 6 1 5
62 1 2 5 3 3 5 2
Note that this has 8 solutions. How do we find the number of solutions?
Voila!
The links to hints and the solution for this are on Page 227.