-1

Solve $6x\equiv 2\pmod 8$

This is the method that I used: $$6x\equiv 2\pmod 8\implies12x\equiv 4\pmod 8\implies3x\equiv 1\pmod 8\implies9x\equiv 3\pmod 8$$ $$\implies x\equiv 3\pmod 8$$

However, the solution to the question gives $2$ solutions: $$x\equiv 3\pmod 8 ~\text{or}~x\equiv 7\pmod 8$$ How did they get the second solution? Forgive me for such a basic question, but I have only just started learning Number Theory and modular Arithmetic. Also, I'm not quite sure if I was allowed to divide by $4$ in the $3$rd stage.

Thanks for your help.

  • When you reduced $6x \equiv 2 \pmod 8$ to $3x \equiv 1 \pmod 8$, the other solution $3x \equiv 5 \pmod 8$ was lost. This happens whenever you "divide both sides" by a number that is not coprime to the modulo. – player3236 Oct 26 '20 at 13:47
  • @player3236 ah, that makes more sense now. So I can't divide boths sides by a number not coprime to the modulo? Or can I, but I just have to be more careful by not dismissing some solutions? – A-Level Student Oct 26 '20 at 13:48
  • You have to be aware, that you are not calculating in a field anymore, so multiplicative inverses do not have to exist. Also you can solve this equation simple by plugging in the 8 possible values for x, which are 0,1,2,3,4,5,6,7 and just evaluate. – Cornman Oct 26 '20 at 13:50
  • You can, however, divide both sides by a number coprime to the modulo. In this case, you can divide both sides by $3$ to obtain $2x \equiv 18/3$ – player3236 Oct 26 '20 at 13:50
  • @Cornman I'm very sorry, but I'm still in high school, I haven't studied fields or multiplicative inverses before. :( – A-Level Student Oct 26 '20 at 13:51
  • @player3236 thanks, that's a great help! Would you like to post that as an answer so it'll be seen more easily? – A-Level Student Oct 26 '20 at 13:51
  • The "multiplicative inverse" can be thought as $a^{-1}$. Normally we write $a^{-1} = 1/a$ in the real numbers, since $a \times 1/a = 1$. However in modulo 8, there is no $2^{-1}$, since $2 \times x \not \equiv 1$ for any $x$. Dividing both sides is actually the same as multiplying the multiplicative inverse, but since it does not exist, you cannot do so. By Bezout's Lemma, this exists only if $a$ is coprime to the modulo. – player3236 Oct 26 '20 at 13:55
  • 1
    You have $6x\equiv 2\pmod{8}\iff 3x\equiv 1\pmod{4}$ so when you divide by $2$ you divide the modulo aswell. This is because $6x=2+8k$ is same as $3x=1+4k$ – kingW3 Oct 26 '20 at 13:59

1 Answers1

1

As said in comments, you can't "divide both sides" by a number non-coprime to the modulo. In other words, you can't divide by any number $n$ such that $\gcd(n, 8) \ne 1.$

We can think of what modulo means. We need to find $x$ such that $6$ times $x$ leaves a remainder of $2$ when divided by $8$. Any number divided by $8$ can be expressed as $8n$. So we can make an equation: $$6x-2=8n.$$

Now, we are allowed to divide by $2$, since this is just a simple arithmetic equation. We have $$3x-1=4n.$$

We know that $0\le x \le 7$, since if $x$ is over $7$, for example $8$, then it's pretty much the same as $x=0$, since the mod starts over at $8.$

We can just plug in the numbers now for $x$. A way to save time is to note that $4n$ is always even, and so $3x$ must be odd, since we add $1$ to $3x$, making the LHS even.

So $3x$ is odd, which means $x$ is odd. Therefore we check the values $$x = {1, 3, 5, 7}.$$

Simply plugging each value in, we find that when $x=3, n=2$ and when $x=7, n=5$. The only two numbers that matter here are $x=3$ and $x=7$, since those are going to be the modulos. Going back to the original mod equation, we have the $\pmod{8}$, so our answers are $$x\equiv 3\pmod{8}, x\equiv 7\pmod{8}.$$

Hopefully that made sense. I tried to go step by step but if it didn't make sense, please ask questions!

Sirswagger21
  • 1,841
  • Thanks for the answer. Why is it that you can't "divide both sides" by a number non-coprime to the modulo? By the way, I'm AMAZED that an 8th grader is answering this question, it's brilliant! Have you taught yourself congruence arithmetic? – A-Level Student Oct 26 '20 at 17:06
  • @A-levelStudent Seems you've read my profile :) I've taken an Intermediate Number Theory course online (just a couple months ago actually), so I've familiarized myself with this stuff. You'll surely get there!

    As for your question, kingW3's comment pretty much explains it. He says, "You have $6x≡2(mod8)⟺3x≡1(mod4)$ so when you divide by 2 you divide the modulo aswell. This is because $6x=2+8k$ is same as $3x=1+4k$." I completely agree, hopefully this makes sense. However, you can divide by non-coprime numbers, since then there is no need to divide the modulo.

    – Sirswagger21 Oct 26 '20 at 22:18
  • Thanks for the clarification. Just wondering. have you studied any calculus independently? – A-Level Student Oct 26 '20 at 22:25
  • Nope, not yet. I'm starting to learn some precalculus, but nothing too much. – Sirswagger21 Oct 27 '20 at 17:26
  • Fair enough. You're doing brilliantly! – A-Level Student Oct 27 '20 at 19:07