Show that a congruence has solution iff “something” is a quadratic residue

248 Views Asked by At

Let $p>2$ be a prime number and consider the congruence $$aX^2+bX+c \equiv 0 \pmod{p},$$ where $p \not \mid a$, and let $m$ be a natural number such that $mp +b^2-4ac \geq 0$. Show that the congruence have a solution if, and only if, $mp+b^2=4ac$ is quadratic residue $\mod p$.

Honestly, I passed hours thinking about it but I couldn't get anywhere. I just know results that I couldn't relate to this problem, so if you could say explicitly what theorems you're using, I'd be grateful!

3

There are 3 best solutions below

0
On

Multiply your congruence by $4a$.

Complete the square in the usual way for quadratics.

There is a solution if and only if $b^2-4ac=(2ax+b)^2$ mod $p$ i.e. if and only if $b^2-4ac$ is a q.r.

0
On

Hint. Note that $2$ and $a$ are invertible modulo $p$ and $$aX^2+bX+c\equiv a(X+b(2a)^{-1})^2-(b^2-4ac)(4a)^{-1}\pmod{p}.$$ Hence, modulo $p$, $$aX^2+bX+c\equiv 0\Leftrightarrow (2aX+b)^2\equiv(b^2-4ac).$$

0
On

Forget that you are working with congruences and think of solving usual quadratic equations with rational numbers (or integers) as coefficients. You know the formula for the roots. With rational coefficients we desire again rational solutions; this means the discriminant must be positive and more, should be a square of a rational number.

Here the analogue of square in modular arithmetic is a quadratic residue. So we want $b^2-4ac$ to be a square modulo $p$. That is, we must have $b^2-4ac = k^2+mp$ for some integers $k,m$.