Thursday, 28 May 2026

Exercise (6.3).22

Let $p$ be an odd prime and have a primitive root. Show that

(a) $x^2 \equiv -1 \pmod p$ has solutions if and only if $p \equiv 1\pmod 4$.

(b) $x^4 \equiv -1\pmod p$ has solutions if and only if $p \equiv 1\pmod 8$.


(a) Proposition (6.17) tells us that $x^2 \equiv -1 \pmod p$ has solutions if and only if $(-1)^{\phi(p)/g} \equiv 1 \pmod p$, where $g=\gcd(\phi(p),2)$.

Since $p$ is an odd prime, $\phi(p)=p-1$ is even, and so $g=2$.

We start with

$$ (-1)^{\frac{p-1}{2}} \equiv 1 \pmod p $$

This requires $\frac{p-1}{2}$ to be even, that is, for some integer $k$

$$\begin{align} \frac{p-1}{2} & = 2k \\ \\ p & = 4k + 1 \end{align}$$

That is,

$$ p \equiv 1 \pmod 4 $$

This is the required condition.


(b) Proposition (6.17) tells us that $x^4 \equiv -1 \pmod p$ has solutions if and only if $(-1)^{\phi(p)/g} \equiv 1 \pmod p$, where $g=\gcd(\phi(p),4)$.

Since $p$ is an odd prime, $\phi(p)=p-1$ is even, and so $g$ could be 2 or 4.

Let's consider $g=2$ first.

This means $p-1=2j$ where $j$ is odd. An even $j$ would mean $g=\gcd(p-1,4)=\gcd(2j,4)=4$.

We start with

$$ (-1)^{\frac{p-1}{2}} \equiv 1 \pmod p $$

This requires $\frac{p-1}{2}$ to be even, that is, for some integer $k$

$$\begin{align} \frac{p-1}{2} & = 2k\\ \\ \frac{2j}{2} & = 2k \\ \\ j & = 2k \end{align}$$

This is a contradiction, because $j$ is odd and $2k$ is even. And so $g \ne 2$.

This leaves $g=4$ as the only option.

We start with

$$ (-1)^{\frac{p-1}{4}} \equiv 1 \pmod p $$

This requires $\frac{p-1}{4}$ to be even, that is, for some integer $k$

$$\begin{align} \frac{p-1}{4} & = 2k \\ \\ p & = 8k + 1 \end{align}$$

That is,

$$ p \equiv 1 \pmod 8 $$

This is the required condition.