Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Solve for $x$: $4x = 6(mod~5)$

Here is my solution:

From the definition of modulus, we can write the above as $ \large\frac{4x-6}{5} = \small k$, where $k$ is the remainder resulting from $4x~mod~5=6~mod~5=k$.

Solving for $x$, $x = \large \frac{5k+6}{4} \implies x(k) = \frac{5k+6}{4}$

Now, my teacher said that is incorrect, and that $k = ...-2,-1,0,1,2,...$

I honestly don't understand what is wrong about my answer; and shouldn't k only take on nonnegative values, following from the definition of modulus?

share|cite|improve this question
Note: the solutions must be integers. when $k = 3$, you get $21/4$, which is not an integer. – ncmathsadist Apr 25 '13 at 15:03
I think $k$ can also take negative values. $k$ can only take those integral values which would make $x$ an integer, and vice-versa. A better way of writing the expression would be $4x-5k=6$. $x=4;k=2$ is one solution. $x(k)=\frac{5k+6}{4}$ is incorrect because I think you're assuming $k$ can take all integral values. – Ayush Khaitan Apr 25 '13 at 15:08
@AyushKhaitan What precisely is an integral value? – Mack Apr 25 '13 at 16:48
up vote 3 down vote accepted

$x$ won't always be integer in your solution

So, $4x-6=5k\implies 4x-5k=6=10-4\implies 4(x+1)=5(k+2)$

$\implies \frac{4(x+1)}5=k+2$ an integer

$\implies 5$ divides $4(x+1)$

$\implies 5$ divides $(x+1)\implies x=5a-1$ where $a$ is any integer

i.e., $x\equiv-1\pmod 5\equiv4$

share|cite|improve this answer
I'm not quite certain of what you are doing. Are you solving for a specific x-value? – Mack Apr 25 '13 at 15:28
@Mack, does $x\equiv4\pmod 5$ mean a specific value?. For each distinct integral value of $a$ will give you a distinct value off $x$ – lab bhattacharjee Apr 25 '13 at 15:46
I don't see that written anywhere in your answer. – Mack Apr 25 '13 at 15:48
@Mack, what about the last line? Also, $x=5a-1$ before that – lab bhattacharjee Apr 25 '13 at 15:49
@Mack: $x \equiv -1(\mod 5)$ is same as $x \equiv 4(\mod 5)$ – Inceptio Apr 25 '13 at 15:49

Hint: $4\equiv-1\pmod5$ and hence $4^2\equiv1\pmod5$. So, multiplying both sides by $4$, you get: $$4x\equiv6\pmod5\iff x\equiv6\cdot4\pmod5\equiv4\pmod5$$

share|cite|improve this answer
$4x\equiv6\pmod 5\implies -x\equiv6\pmod 5\equiv1\implies x\equiv-1\pmod 5\equiv4$ – lab bhattacharjee Apr 25 '13 at 15:53
@labbhattacharjee: You probably misplaced the comment? – Inceptio Apr 25 '13 at 15:57
@Inceptio, no! inspired by Dennis's method, I wanted to supply a simpler one:) – lab bhattacharjee Apr 25 '13 at 16:00
@labbhattacharjee: $(+1)$ for your simpler version. – Inceptio Apr 25 '13 at 16:04

$4x \equiv 6(\mod 5) \implies4x \equiv 1$ or $-4(\mod 5)$

$4 \equiv -1(\mod 5) \implies x \equiv \dots (\mod5)$(Fill in the blanks)

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.