# Show that $x^4 \equiv -4$ (mod $p$) is solvable iff $p \equiv 1$ (mod $4$)

Given an odd prime $$p$$, I want to prove that $$x^4 \equiv -4$$ (mod $$p$$) is solvable if and only if $$p \equiv 1$$ (mod $$4$$). More specifically, I want to prove this using a hint, which says to first factorize $$x^4+4$$.

I proved that whenever the congruence is solvable, we have $$p \equiv 1$$ (mod $$4$$), however, I didn't manage to do that using the factorization but rather using Legendre symbols $$(\cdot / \cdot)$$. But I would like to prove the converse using the factorization.

This is the way I have tried to solve it but I'm unsure of whether it is correct or not:

So first we factorize $$x^4+4$$ as $$x^4 + 4 = (x^2 + 2x + 2)(x^2 - 2x + 2) = ((x+1)^2 + 1)((x-1)^2 + 1),$$ which can be written as $$= (a^2 + 1)(b^2 + 1).$$

Now we want to show that there exists $$a, b$$ such that $$(a^2 + 1)(b^2 + 1) \equiv 0$$ (mod $$p$$). So in modulo $$p$$, we have that $$a^2 + 1 \equiv 0 \iff a^2 \equiv -1$$ has a solution iff $$(-1/p) = 1$$. We have that $$(-1/p) = (-1)^{(p-1)/2} = 1$$ since $$(p-1)/2$$ is even whenever $$p \equiv 1$$ (mod $$4$$). The same goes for $$b^2 + 1$$, and we are done.

• If p is an odd prime, (-1/p)=1 iff p=1 mod 4. Your prove is correct and gives you also the converse. – Javier Linares Jan 16 at 13:51
• Thank you for checking it! – virreand Jan 16 at 14:03
• Is not this competent with Fermat theorem: $p=a^2+b^2$ iff $p=4k+1$? – sirous Jan 17 at 18:27

The factorization you have found shows that $$x^4 \equiv -4$$ has a solution iff $$y^2 \equiv -1$$ has a solution: $$x^4 + 4 = ((x+1)^2 + 1)((x-1)^2 + 1)$$
Now $$y^2 \equiv -1$$ has a solution iff there is an element of order $$4$$ mod $$p$$. This happens iff $$4$$ divides $$p-1$$ because the group of units mod $$p$$ is cyclic.