Skip to main content

Section 9.1 Legendre's Symbol

Definition 9.1.1.

Let \(p\) be an odd prime and let \(\gcd(a, p) = 1.\) The Legendre symbol \((a/p)\) is defined by

\begin{equation*} (a/p) = \begin{cases} 1 \amp \hspace{5mm} if \hspace{2mm} a \hspace{2mm} is \hspace{2mm} a \hspace{2mm} quadratic \hspace{2mm} residue \hspace{2mm} of \hspace{2mm} p\\ -1 \amp \hspace{5mm} if \hspace{2mm} a \hspace{2mm} is \hspace{2mm} a \hspace{2mm} quadratic \hspace{2mm} nonresidue \hspace{2mm} of \hspace{2mm} p. \end{cases} \end{equation*}

Again for \(n = 7,\) we have

\begin{equation*} (1/7) = (2/7) = (4/7) = 1 \end{equation*}

and

\begin{equation*} (3/7) = (5/7) = (6/7) =-1. \end{equation*}

For \((a):\) If \(a \equiv b\pmod{p},\) then \(x^2\equiv a\pmod{p}\) and \(x^2\equiv b\pmod{p}\) have the same solution or both have no solution. In either case \((a/p) =(b/p).\)

For \((b):\) There is clearly a solution to \(x^2\equiv a^2\pmod{p};\) in fact, the integer \(a\) satisfies it. Thus \(a^2\) is a quadratic residue of \(p,\) and so \((a^2/p) = 1.\)

For \((c):\) This is just a restatement of the previous corollary.

For \((d):\) Using \((c),\) we have

\begin{equation*} (ab/p)\equiv (ab)^{(p-1)/2} = a^{(p-1)/2}b^{(p-1)/2}\equiv (a/p)(b/p)\pmod{p}. \end{equation*}

If \((ab/p) \neq (a/p)(b/p),\) then since the Legendre symbol takes the values only \(\pm 1,\) we would have \(1\equiv -1\pmod{p},\) which implies that \(p = 2,\) a contradiction. Thus \((ab/p) = (a/p)(b/p).\)

For \((e):\) Note that \((1/p) = 1\) since \(1^2\equiv 1\pmod{p}\) and \(1\) is a quadratic residue of \(p.\) If we let \(a = -1\) in part \((c),\) then we have \((-1/p) =(-1)^{(p-1)/2)}\) which is the desired result.

Is there a solution of the congruence \(x^2\equiv -46\pmod{17}?\)

Solution.

We need only evaluate \((-46/17).\) Well

\begin{equation*} (-46/17) = (-1/17)(46/17) = (46/17). \end{equation*}

Since \(46\equiv 12\pmod{17}\) we have

\begin{equation*} (46/17) = (12/17) = (3\cdot 2^2/17) = (3/17). \end{equation*}

Now

\begin{equation*} (3/17) \equiv 3^{(17-1)/2} = 3^8 ≡ (81)^2 \equiv (-4)^2 \equiv -1\pmod{17} \end{equation*}

and so

\begin{equation*} (46/17) = -1 \end{equation*}

so \(-46\) is not a quadratic residue of \(17,\) and so the congruence \(x^2\equiv -46\pmod{17}\) has no solution.

As is always the case, we suppose that there are only finitely many primes of the form \(4k + 1,\) say \(p_1, p_2,..., p_n\) and consider

\begin{equation*} N = (2p_1p_2\cdots p_n)^2+1. \end{equation*}

Since \(N\) is odd, there is an odd prime \(p\) that divides \(N.\) So

\begin{equation*} (2p_1p_2\cdots p_n)^2\equiv -1\pmod{p}, \end{equation*}

which says that \((-1/p) = 1.\) Since

\begin{equation*} (-1/p) = (-1)^{(p-1)/2} = 1 \end{equation*}

it must be the case, that \(p \equiv 1\pmod{4},\) or rather, \(p\) is of the form \(4k + 1\) and so \(p = p_i\) for some \(i.\) But

\begin{equation*} p = p_i\vert N -(2p_1p_2\cdots p_n)^2 = 1 \Rightarrow p_i\vert 1, \end{equation*}

a contradiction. Thus there are infinitely many primes of the form \(4k +1.\)

Let \(r\) be a primitive root of \(p.\) Note that the powers \(r, r^2, r^3,...,r^{p-1}\) are just a permutation of \(1, 2, 3,..., p-1,\) since they are incongruent modulo \(p.\) So for any a between \(1\) and \(p-1,\) inclusive, we have that there is a unique \(k\) with \(1\leq k\leq p- 1,\) such that

\begin{equation*} a \equiv r^k\pmod{p}. \end{equation*}

Now by Euler's Criterion, we have

\begin{equation*} (a/p) = (r^k/p) \equiv (r^k)^{(p-1)/2} = (r^{(p-1)/2})^k \equiv (-1)^k\pmod{p} \end{equation*}

where \(r^{(p-1)/2} \equiv -1\pmod{p}\) by Euler's Criterion since \(r\) is a primitive root modulo \(p.\) Hence \((a/p) = (-1)^k\) since \((a/p)\) is either \(1\) or \(-1.\) Thus

\begin{equation*} \sum_{a=1}^{p-1}(a/p)=\sum_{k=1}^{p-1}(-1)^k=0 \end{equation*}

since \(p-1\) is even.

Since \((a/p) \equiv (-1)^k\) in the above proof of the Theorem.

Recall that \(2\) is a primitive root of \(13.\) Thus the quadratic residues of \(13\) are

\begin{equation*} 2^2 ≡ 4, \hspace{2mm} 2^4 ≡ 3,\hspace{2mm} 2^6 ≡ 12,\hspace{2mm} 2^8 ≡ 9,\hspace{2mm} 2^10 ≡ 10,\hspace{2mm} 2^{12} \equiv 1\pmod{13} \end{equation*}

and the quadratic nonresidues are

\begin{equation*} 2^1 ≡ 2,\hspace{2mm} 2^3 ≡ 8,\hspace{2mm} 2^5 ≡ 6,\hspace{2mm} 2^7 ≡ 11,\hspace{2mm} 2^9 ≡ 5,\hspace{2mm} 2^{11}\equiv 7 \pmod{13}. \end{equation*}