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

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?

-
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

$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$

-
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$$

-
$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)

-