Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $p$ be a prime which is $5 \pmod {8}$. Let $r$ be an element of $\mathbb{Z}/p\mathbb{Z}^*$ of order $4$ and let $a$ be a quadratic residue modulo $p$. Prove that a solution of $x^{2}=a \pmod p$ is given by either $x=a^{(p+3)/8}$ or $x=ra^{(p+3)/8}$.

I tried showing $a^{(p+3)/4}=a \pmod p$, but I couldn't figure out how to proceed.

share|cite|improve this question

You are on the right path. Let's try to prove that $a^{(p+3)/4}\equiv a \pmod{p}$. This is not always true, so our proof will run into a stumbling block. However, the stumbling block will tell us what the fix might be. (Conveniently, we are told what it is!)

To prove $a^{(p+3)/4}\equiv a \pmod{p}$ is equivalent to proving that $a^{(p-1)/4}\equiv 1 \pmod{p}$. Since $a$ is a quadratic residue, say $a\equiv b^2\pmod{p}$, we have $a^{(p-1)/4}\equiv b^{(p-1)/2}\equiv \pm 1\pmod p$. If you prefer, you may express this in terms of order. The order of $a^{(p-1)/4}$ is either $1$ or $2$.

If $a^{(p-1)/4}$ has order $1$, we are finished. What about if the order is $2$? Then $a^{(p+3)/4}\equiv -a \pmod{p}$. Awfully close, except for that unfortunate minus sign. That's where the $r$ of the statement of the problem comes to the rescue.

share|cite|improve this answer

Hint, if $r$ is an element of order $4$, then $r^2=?$.

$a^{(p+3)/4}=a \pmod p$ might not be true....

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.