I have the following problem that I am stuck on.
Assume $n>1$ and let $U(\mathbb{Z}_{n})$ be the set of invertible elements of $\mathbb{Z}_{n}$ as a quotient ring. Show that $U(\mathbb{Z}_{n})$ consists of those elements $\overline{x}=x+n\mathbb{Z}$ for which $gcd(x,n)=1$.
My work so far: Let $\overline{x}\in U(\mathbb{Z}_{n})$. Then $\exists$ $\overline{y}\in\mathbb{Z}_{n}$ such that $\overline{x} \cdot\overline{y}=\overline{xy}=\overline{1}$. Thus, we have $xy-1=kn$ in $n\mathbb{Z}$ for some $k\in\mathbb{Z}$.......
I'm not sure how to go from here. Am I even on the right track? Thanks in advance for any help!