We start by proving a elementary result in quadratic-residue theory. First, an explanation about notation (for those who are not familiar with number theory). If $\displaystyle p$ is an odd prime and $\displaystyle a$ is an integer coprime with $\displaystyle p,$ then we write

$\displaystyle \left\(\frac ap\right)=\left\{\begin{array}{rc}1 & a\in R_p\\ -1 & a\notin R_p\end{array}\right.$

The notation $\displaystyle \left(\frac**\right)$ is called the Legendre symbol.

__T1:__ Let $\displaystyle p$ be an odd prime and $\displaystyle a,b$ integers coprime with $\displaystyle p.$ Then $\displaystyle \left(\frac{ab}p\right)=\left(\frac ap\right)\left(\frac bp\right).$

__Proof:__

We take integers $\displaystyle a,b$ coprime with $\displaystyle p$ and reduce them $\displaystyle \mod p.$ Then we just check three cases: (i) $\displaystyle a,b\in R_p,$ (ii) $\displaystyle a,b\notin R_p,$ (iii) one of $\displaystyle a$ and $\displaystyle b$ is in $\displaystyle R_p$ and the other is not. Now this smacks something of Lemma 3, doesn't it? Indeed it does – and I leave the completion of the proof to the interested reader.

But I hope you see my point. Lemma 3 is a result in group theory (nothing to do with quadratic residues) but it can be used to prove a result about quadratic residues via the fact that thet the set $\displaystyle R_p$ is a subgroup of a larger group. Do you see?

Incidently, this shows that the mapping $\displaystyle f:\left(\mathbb Z_p^\times\right)\to\{1,-1\}$ with $\displaystyle f(a)=\left(\frac ap\right)$ is a homomorphism with kernel $\displaystyle R_p.$