find all integer $x$ such that $7x\equiv 2x$ (mod 8) I am  trying to find all integer $x$ such that $7x\equiv 2x$ (mod 8)
First, I have $$ 7x-2x=8k \hspace{0.1in} (\text{where} \hspace{0.1in}k\in\mathbb{z}) $$
$$5x=8k$$ $$x=\frac{8k}{5}$$
Does $x=\frac{8k}{5}$ right? if not, can someone give me a hit or a suggestion to solve it?
thanks 
 A: I think you went one step too far, you already had the answer. When you got to $5x = 8k$, you should have realized that what you're looking for are the multiples of $8$. The only $x$ that will work are $x$ that are multiples of $8$.
And since $8$ is such a small number, it's no problem to check the eight possibilities one by one.


*

*If $x \equiv 1 \bmod 8$, then $7x \equiv 7 \bmod 8$ and $2x \equiv 2 \bmod 8$.

*If $x \equiv 2 \bmod 8$, then $7x \equiv 6 \bmod 8$ and $2x \equiv 4 \bmod 8$.

*If $x \equiv 3 \bmod 8$, then $7x \equiv 5 \bmod 8$ and $2x \equiv 6 \bmod 8$.

*If $x \equiv 4 \bmod 8$, then $7x \equiv 4 \bmod 8$ and $2x \equiv 0 \bmod 8$.

*If $x \equiv 5 \bmod 8$, then $7x \equiv 3 \bmod 8$ and $2x \equiv 2 \bmod 8$.

*If $x \equiv 6 \bmod 8$, then $7x \equiv 2 \bmod 8$ and $2x \equiv 4 \bmod 8$.

*If $x \equiv 7 \bmod 8$, then $7x \equiv 1 \bmod 8$ and $2x \equiv 6 \bmod 8$.

*If $x \equiv 0 \bmod 8$, then $7x \equiv 0 \bmod 8$ and $2x \equiv 0 \bmod 8$.


This confirms the answer.
