3

Let $m$ be odd and let $a \in \mathbb{Z}.$ The congruence $x^2 \equiv a \mod m$ has a solution if and only if for each prime $p$ dividing $m,$ one of the following conditions holds, where $p^{\alpha} \mid \mid m$ and $p^{\beta}\mid \mid a$:

  • $\beta \geqslant \alpha$;

  • $\beta < \alpha$, $\beta$ is even, and $a/p^{\beta}$ is a quadratic residue mod p.

I know that for odd $m$ that if $a$ is a quadratic residue modulo $p$ then it is also a quadratic residue modulo $p^{\alpha},$ but how do we prove the above proposition?

1 Answers1

2

Simplification: Let $m=p_1^{\alpha_1}\cdots p_t^{\alpha_t}$ where the $p_i$ are distinct primes. Then the congruence $x^2\equiv a \pmod{m}$ has a solution if and only if each of the congruences $x^2\equiv a \pmod{p_i^{\alpha_i}}$ has a solution.

One direction is obvious. A solution modulo $m$ is also a solution modulo $p_i^{\alpha_i}$.

For the other direction, for each $i$ let $x_i$ be such that $x_i^2\equiv a\pmod{p_i^{\alpha_i}}$. By the Chinese Remainder Theorem, there is an $x$ such that $x\equiv x_i \pmod{p_i^{\alpha_i}}$ for all $i$ from $1$ to $t$. This $x$ is a solution of the congruence $x^2\equiv a\pmod{m}$.

Working with prime powers: So now it is sufficient to prove the result for $m=p^{\alpha}$, where $p$ is prime. Let $p^\beta$ be the largest power of $p$ that divides $a$.

We need to show that the congruence has a solution if and only if one of the two conditions of the post holds.

The case $\beta\ge \alpha$ is easy, for $x=0$ is a solution.

Suppose now that $\beta\lt \alpha$. Suppose that $x^2\equiv a \pmod{p^\alpha}$. and let $p^\gamma$ be the highest power of $p$ that divides $x$. Then unless $\gamma=\beta/2$, $x^2-a$ cannot be divisible by $p^\alpha$.

So $\beta=2\gamma$ must be even.

Let $x=p^{\beta/2}y$. Then $p^{\beta}y^2\equiv a\pmod{p^{\alpha}}$. Dividing through by $p^{\beta}$ we get $$y^2\equiv a/p^{\beta}\pmod{p^{\alpha-\beta}}.$$ In particular, since $\beta-\alpha\ge 1$, we have $$y^2\equiv a/p^{\beta}\pmod{p},$$ and therefore $a/p^{\beta}$ is a quadratic residue of $p$.

We leave showing that $a/p^{\beta}$ being a quadratic residue of $p$ is sufficient in the case $\beta\lt \alpha$. One needs to show that a solution of the congruence $y^2\equiv a/p^{\beta}\pmod{p}$ can be lifted to a solution modulo any power of $p$, in particular $p^{\alpha-\beta}$.

André Nicolas
  • 507,029
  • Great answer, I understand much better now, thank you. – user167857 May 30 '15 at 03:02
  • 1
    You are welcome. I left a few very small gaps and a largish one. At the end, we need to know that if $c$ is not divisible by the odd prime $p$, then a solution of $y^2\equiv c\pmod{p}$ can be "lifted" to a solution of $x^2\equiv c\pmod{p^k}$. I expect you have done that already in your course, in a more general setting (polynomial congruences). It is often called Hensel lifting. If this is not familiar, I can add a remark about some of the details, but only on request and probably not for a day or so. – André Nicolas May 30 '15 at 03:14
  • No need to add the extra details, I have proved this fact already, thanks again. – user167857 May 30 '15 at 03:16