= Multiplicativity of the Legendre symbol
{title2=$\left(\frac{ab}{p}\right)=\left(\frac ap\right)\left(\frac bp\right)$}
For an <odd prime> $p$ and any <integers> $a,b$, the <Legendre symbol> obeys
$$
\left(\frac{ab}{p}\right)=
\left(\frac ap\right)\left(\frac bp\right).
$$
In particular, if $p\nmid a$, then $(a^{-1}/p)=(a/p)$, where $a^{-1}$ is a <modular multiplicative inverse>. Multiplication by a nonzero square also leaves the <Legendre symbol> unchanged: $(ar^2/p)=(a/p)$ for $p\nmid r$.<Quadratic Residues by Ben Lynn>[Ben Lynn, Quadratic Residues, The Legendre Symbol: multiplicativity and invariance under a nonzero square factor]{ref}
The <subgroup> and <coset> arguments under <quadratic residue> and <quadratic nonresidue> prove the sign rule without computing a large power: square times square is square, square times nonsquare is nonsquare, and nonsquare times nonsquare is square. If either factor is zero modulo $p$, both sides of the identity vanish. On $\mathbb F_p^\times$, the <Legendre symbol> is thus a <group homomorphism> to $\{1,-1\}$ whose <kernel of a group homomorphism> is the <quadratic residue> <subgroup>. Viewed on all <integers>, it is a <completely multiplicative function> and a <Dirichlet character> modulo $p$.
\Image[/quadratic-residue-character-product-table.png]
{title=Products modulo seven: the <Legendre symbol> reduces a six-by-six table to sign multiplication}
{description=Rows and columns put <quadratic residues> $1,2,4$ before <quadratic nonresidues> $3,5,6$. Every cell displays the product modulo seven and its <Legendre symbol>. The four blocks have signs $+1,-1,-1,+1$, showing the <subgroup> and its other <coset>.}
For an original calculation, factor the numerator $30=2\cdot3\cdot5$. Modulo seven, $(30/7)=(2/7)(3/7)(5/7)=1\cdot(-1)\cdot(-1)=1$, agreeing with $30\equiv2\pmod7$. Modulo eleven, the signs are instead $-1,1,1$, giving $(30/11)=-1$, agreeing with $30\equiv8\pmod{11}$. The same factorization can therefore certify different square behavior at different <prime numbers>.
Alternatively, <Euler's criterion> gives $(ab)^{(p-1)/2}\equiv a^{(p-1)/2}b^{(p-1)/2}$ modulo $p$. For nonzero factors both sides correspond to signs in $\{1,-1\}$. Since $p$ is odd, these signs are distinct modulo $p$, so the <modular congruence> proves the asserted equality of <integers>, not merely an equality of representatives.
Back to article page