Let us consider the ring $\mathbb{Z}_n$ where $\bar{m}\in\mathbb{Z}_n$
Could anyone help me prove that $\bar{m}$ is a zero divisor in $\mathbb{Z}_n$ if and only if $m,n$ are not coprime
So far I have:
Assume $\exists \bar{a}: \bar{m} \bar{n}=n \mathbb{Z} \Rightarrow$ for some $b\in\mathbb{Z}:am=bn$
I then assumed $n,m$ were coprime and attempted to use $\exists a',b'\in \mathbb{Z}:a'm+b'n=1$ to come to a contradiction, however haven't found one, the most promising thing I have found so far is that
$a=n(a'b+ab')$ and $b=m(a'b+ab')$ $\Rightarrow n|a$ and $m|b$