Simple Modulo Questions Hey guys I have some questions regarding modulo.
Some of these are solvable and some are not but I have to prove why they have no solution. Any   help would be appreciated thanks!
$39x\equiv65 \pmod {99}$
$[8]\times[x] = [12]$ in $\mathbb{Z}_{20}$
$[x]=[21]^{-1}$ in $\mathbb{Z}_{43}$
If anybody could explain the answer that would be really helpful as I am really lost. Thanks so much!
 A: Sometimes a naive approach can make wonders, for example (all the time we do arithmetic modulo$\,43\,$):
$$21\cdot 2=-1\Longrightarrow 21\cdot(-2)=1\Longrightarrow 21^{-1}=-2=41\pmod {43}$$
A: For small numbers like these, you can just try all the cases.  A spreadsheet will make it very easy.  For the first, make a column of 0 through 98, put =mod(39*a1)-65 in b1, copy down and look for zero.
Hint:  To avoid that, look for common factors.  Since $39$ and $99$ are both multiples of $3\ldots $.  For the second, all three numbers are multiples of $4$.  For the last, all numbers are invertible if the modulus is prime.
A: Hint for #1: $39$ is divisible by ...
Hint for #3: $2 \times 21 = 42$.
A: Hints $\rm\ \ (1)\quad 3\cdot 33\,\mid\, 3\cdot 13x-65\ \Rightarrow\ 3\mid 65$
$\rm(2)\quad 20\mid 8x-12\iff 5\mid 2x-3\iff 5\mid 2x+2 = 2(x+1)$
$\rm(3)\quad  mod\ 43\!:\ \dfrac{1}{21}\equiv \dfrac{2}{42}\equiv \dfrac{2}{-1}\equiv -2$
Generally it is true that $\rm\ ax\equiv b\,\ (mod\ n)\:$ is solvable $\rm\iff gcd(a,n)\mid b.\:$ Indeed, notice that $\rm\: ax\equiv b\,\ (mod\ n)\:\Rightarrow\:ax = b + ny\:$ for some $\rm\:y\in \Bbb Z,\:$ so $\rm\:gcd(a,n)=d\mid a,b\:\Rightarrow\:d\mid ax-ny = b.\:$ Conversely, by Bezout's gcd identity, for some $\rm\:x,y\in\Bbb Z\:$ we have $\rm\: ax-ny = gcd(a,n) = d,\:$ therefore scaling the Bezout identity by $\rm\:b/d\in\Bbb Z\:$ yields a solution of $\rm\: ax\equiv b\,\ (mod\ n).$
