---
tag: 0ZXW95S44M
kind: statement
role: theorem
name: Second supplement to quadratic reciprocity
msc: [11A15]
uses: [01J8AMV9RS]
sources:
  - url: https://en.wikipedia.org/wiki/Quadratic_reciprocity
    locator: q = ±2 and the second supplement
---

## Statement

Let $p$ be an odd prime.
Then
$$\left(\frac{2}{p}\right) = (-1)^{(p^2-1)/8},$$
where the left side is a [[Legendre symbol|01J8AMV9RS]].

## Remarks

So $2$ is a quadratic residue modulo $p$ if $p \equiv \pm 1 \pmod 8$, and a nonresidue if $p \equiv \pm 3 \pmod 8$.
For example, $3^2 \equiv 2 \pmod 7$, but $2$ is not a square modulo $5$.
One proof uses [[Gauss's lemma|037ACYXB5Z]] with $a = 2$.

## History

Euler proved the second supplement.

## Explanations

### L1 human

Whether $2$ is a square modulo $p$ depends only on the remainder of $p$ on division by $8$.
The remainders $1$ and $7$ give a square, and the remainders $3$ and $5$ do not.
