1

I'm not too sure how to answer this question here, so if someone could help me out, that'd be great.

Super $m$ is odd and $a$ and $m$ are coprime. Show that

$ax^{2} + bx + c \equiv 0 $(mod $m)$

has an integer solution $x \equiv r ($mod $m)$ if and only if $b^{2} - 4ac$ is a square modulo $m$.

Thanks.

Edit: Here is my proposed solution based on the comments:

$ax^{2} + bx + c \equiv 0 ($mod $m) \implies x^{2} + \frac{b}{a}x + \frac{c}{a} \equiv 0 ($mod $m)$.

$\implies (x + \frac{b}{2a})^{2} - \frac{b^{2}}{4a} + \frac{c}{a} \equiv 0 ($mod $m)$.

$\implies (x + \frac{b}{2a})^{2} \equiv \frac{b^{2}-4ac}{4a^{2}} ($mod $m)$

$4a^{2}$ is always a perfect square mod $m$, so $b^{2} - 4ac$ must be a perfect square modulo $m$.

One more question is, are we allowing rational solutions for $x$? Do we have to worry about $a/c$ not being an integer, or $b^2-4ac$ being divisible by $4a^2$?

  • 1
    Just mimic the proof of the quadratic formula. – Mummy the turkey Oct 06 '20 at 13:22
  • What happens if you attempt to complete the square? Are there any other usual quadratic equation approaches you are aware of that may help here? – abiessu Oct 06 '20 at 13:22
  • So would I start by saying $ax^{2} + bx + c = km$? If I try to use the quadratic formula on that, then I get $c - km$ as my constant term, which isn't what I want. @abiessu –  Oct 06 '20 at 13:29
  • 1
    Start by saying $ax^2+bx+c\equiv0$ and, as suggested above, mimic the proof of the quadratic formula, but for integers mod $m$ rather than for real numbers – J. W. Tanner Oct 06 '20 at 13:32
  • @J.W.Tanner I edited the question with a supposed proof. Are you able to make sure it looks alright? And posted a question on there. –  Oct 06 '20 at 13:45
  • 1
    @Cjw123 you need to be more careful in what you say. In particular $1/a$ is not a thing in this context. You must note that since $gcd(a, m) = 1$ $a$ has a multiplicative inverse mod $m$. In this way it is better to write "$a^{-1}$" to mean the "inverse of $a$ in the ring $\mathbb{Z}/m\mathbb{Z}$." This way we are not "allowing rational solutions" - we are just never leaving $\mathbb{Z}/m\mathbb{Z}$. You should also notice that you have only shown one direction (although the other should not be hard from where you are) – Mummy the turkey Oct 06 '20 at 17:52
  • 1
    Similarly when you "divide by 2" this is admissable since $m$ is odd, so $2$ has a multiplicative inverse mod $m$. These are all things you should be noting in your proof – Mummy the turkey Oct 06 '20 at 17:53
  • @Mummy As explained here modular fraction arithmetic works the same as normal fraction arithmetic as long as we restrict to fractions with denominator coprime to the modulus. In particular, the OP's use of modular fractions is fine since $a$ is coprime to the modulus. – Bill Dubuque Oct 11 '20 at 08:58
  • @BillDubuque of course the arithmetic is the same - this is just the ring axioms. However, I dislike this for pedagogical reasons - the comment of OP in the question "should I worry about $a/c$ not being an integer ..." suggests that they did not understand that the operation is not taking place in $\mathbb{Q}$ hence my comment referred to "$a^{-1}$" - maybe I was a bit frivilous in saying "not a thing". – Mummy the turkey Oct 11 '20 at 09:26

1 Answers1

1

It's possible to use rational numbers in modular arithmetic, but you have to be careful about what you mean. Instead of what you did, multiply both sides by $4a$ and put the $c$ on the other side. Then when you complete the square, you won't have fractions.

  • Perhaps I'm making a really dumb algebra error, but I'm getting the following:

    $ax^2 + bx + c \equiv 0 (modm) \implies 4a^2x^2 + 4abx \equiv -4ac (modm).$ When I'm completing the square on $4a^2x^2+4abx$, I'm trying to form it into 4(ax+b)^2 but i'm getting an extra factor of $abx$ on there. I'm doing something wrong....

    –  Oct 06 '20 at 13:53
  • @Cjw123 You should form it into $(2ax +b)^2$ instead. – player3236 Oct 06 '20 at 14:04