[Math] Suppose $p$ is an odd prime. Show that $x^4 \equiv-1$ (mod $p$) has a solution if and only if $p \equiv1$ (mod $8$).

number theory

Suppose $p$ is an odd prime. Show that $x^4 \equiv-1$ (mod $p$) has a solution if and only if $p \equiv1$ (mod $8$).

I have proven one similar result '$x^2 \equiv-1$ (mod $p$) has a solution if and only if $p \equiv1$ (mod $4$)'. I try to mimick the proof but i fail. The following is my attempt:

Suppose $x^4 \equiv-1$ (mod $p$) has a solution, say $a$. Then $a^4 \equiv -1$ (mod $p$). The congruence implies that $\gcd(a^4,p)=1 \Rightarrow \gcd(a,p)=1$. By Fermat's little theorem, $a^{p-1} \equiv 1$ (mod $p$). Note that $1 \equiv a^{p-1} \equiv a^{4{\frac{p-1}{4}}} \equiv (-1)^{\frac{p-1}{4}}$ (mod $p$).

But I don know whether $\frac{p-1}{4}$ is an integer or not. If it is not an integer, then the congruence does not hold.

Can anyone guide me?

EDIT: Since $a^4 \equiv -1$ (mod $p$), we have $a^8 \equiv 1$ (mod $p$) $\Rightarrow $ $ord_p(a)=8 \Rightarrow 8 | \phi(p) \Rightarrow p \equiv 1$ (mod $p$)

Suppose $p \equiv 1$ (mod $8$). Then there exists a primitive root for $p$, say $r$. Then we have $r^{p-1} \equiv (r^{4})^{\frac{p-1}{4}} \equiv1$ (mod $p$). Hence there is a solution to $x^4 \equiv-1$ (mod $p$).

Is my proof in edit correct?

Best Answer

Hint:

Note that $x^4\equiv -1\mod p$ has a solution if and only if there is an element $x$ of order $8$ in $(\mathbb{Z}/p\mathbb{Z})^\times$.

Related Question