This is a problem taken from chapter $1$ of Dummit and Foote book
Show that if $n$ is not prime then $ \mathbb{Z} / n \mathbb{Z}$ is not a field
My attempt : I got this answer from solution manual of Dummit and Foote written by James Ha
Consider the set $\mathbb{Z}/n\mathbb{Z}$ for $n$ is not prime then there exist positive integer $a, b$ such that $ n= ab$ and $ a, b >1$ . Suppose there exist a multiplicative inverse $\bar c$ of $\bar a $.Then it must be true that $ac= qn +1$ for some $q \in \mathbb{Z}$ .However ,$n=ab $ so $ac= qn +1 = q ab +1$ from which it follow that $a(c-qb)=1$ .This is impossible because $a> 1!$
So $\bar a$ has no inverse in $\mathbb{Z} /n \mathbb{Z}$ and $\mathbb{Z} /n\mathbb{Z} - \{0\} , .)$ is not a group. we must conclude that $\mathbb{Z}/n \mathbb{Z}$ is not field for $n$ not prime
My Doubt: I'm not getting this line then it must be true that $ac= qn +1$ for some $q \in \mathbb{Z}$
My confusion is that why it is written that $ac= qn +1$ is true for some $q \in \mathbb{Z}? $
Is there any theorem related to this statement? I was searching this related statement in Dummit Foote book but didn't found its