The ring $ℤ/nℤ$ is a field if and only if $n$ is prime 
Let $n \in ℕ$. Show that the ring $ℤ/nℤ$ is a field if and only if $n$
  is prime.

Let $n$ prime. I need to show that if $\bar{a} \neq 0$ then $∃\bar b: \bar{a} \cdot \bar{b} = \bar{1}$. Any hints for this ?
Suppose $ℤ/nℤ$ is a field. Therefore: for every $\bar{a} \neq 0$ $∃\bar b: \bar{a}\cdot \bar{b}=1$. How can I show that $n$ must be prime ?
 A: Hints: If $p \not\mid a$ then $ak \operatorname{mod} p$ are different for $k=0, \ldots, p-1$. If $n$ is not prime, then $n=mk$ with $2\le m,k \le n-1$.
A: Just for basic idea :
See that , In $\mathbb{Z}_4$, element $\bar{2}$ does not have inverse.
See that , In $\mathbb{Z}_6$ the element $\bar{2}$ and $\bar{3}$ does not have inverse.
See that , In $\mathbb{Z}_8$ the element $\bar{2}$ and $\bar{4}$ does not have inverse.
In general In $\mathbb{Z}_{pq}$ elements $\bar{p}$ and $\bar{q}$ does not have inverse.
Suppose $n$ is prime and let $\bar{a} \in \mathbb{Z}_n$ 
Consider $\{ \bar{a}.\bar{b} : \bar{b}\in \mathbb{Z}_n\}$.
please check that this can not be a proper subset of $\mathbb{Z}_n$ 
(You are supposed to use that $n$ is prime to prove above result).
As $\{ \bar{a}.\bar{b} : \bar{b}\in \mathbb{Z}_n\}= \mathbb{Z}_n$,  we see that :
for some $\bar{b}\in \mathbb{Z}_n$ we have $\bar{a}. \bar{b}=\bar{1}$ and thus we are done.
A: Hint:  For prime implies field, use the fact that there are no zero divisors and the pigeonhole principle to argue there must be such a $\overline b$
A: If $n$ is prime and $\overline a\ne0$ so $a$ isn't a multiple of $n$ and then $a$ and $n$ are coprime so by the Bezout theorem there's $b,c\in\mathbb Z$ such that
$$ba+cn=1$$
hence by passing to the class we find $\overline a\overline b=\overline1$.
Conversely if $n$ isn't prime then we write $n=ab$ so $\overline0=\overline a\overline b$ where $\overline a\neq \overline0 $ and $\overline b\neq 0$ hence $\mathbb Z/n\mathbb Z$ isn't an integral domain and then it isn't a field.
A: I abbreviate your ring to "$R$".
Hint for 1)
Suppose $p$ is prime and first prove that $\bar{a},\bar{b}\neq0$ implies $\bar{ab}\neq \bar{0}$. If to the contrary $a,b$ were not multiples of $p$, but $ab$ is a multiple of $p$, can you see the contradiction? Use this to show that $\{\bar{a}r\mid r\in R\}=R$, proving that there is $b$ such that $ab=1\in R$.
Hint for 2)
There exists $1 <j,k<n$ such that $jk=n$. What does that look like in the ring? (I mean $\bar{j}\bar{k}\in R$
