Suppose $R$ is a PID and $ann(M) = (r)$ for some $r \in R$. Prove that for any $x \in R$ if $gcd(x, r) = 1$, then $xM = M$ and $M(x) = \{0\}$. Let $R$ be a commutative ring and $M$ be an $R$-module $M$. For any $r \in R$, let $rM = \{ rm : m \in M\}$ and $M(r) = \{m \in M: rm = 0\}$. Suppose $R$ is a PID and $ann(M) = (r)$ for some $r \in R$. Prove that for any $x \in R$ if $gcd(x, r) = 1$, then $xM = M$ and $M(x) = \{0\}$.
I am only able to solve the second part: since PID is an integral domain the only $m \in M$ such that $xm = 0$ is $0$ so $M(x) = \{0\}$.
However, I have no idea how to solve the first part. Can someone provide me with some ideas on how to solve it? I am thinking of this $gcd(x, r) = 1$ implies $xa + rb = 1$ implies $xaM + rbM = M$ implies $xaM = M$ since $r$ annihilates all elements of $M$ and $bM \subset M$. However I can't show that $aM = M$ such that I get $xM = M$.
When I am doing this question, I have some questions that I can't quite understand. I used to think that gcd is a concept that is applicable only in integer, however, here it is discussing gcd on ring. What happens if the ring is $\mathbb{Q}$ (rationals), does gcd still make sense? I mean say I have $1/2$ and $1$, what is the gcd then? 
 A: HINT: Since $R$ is a PID, $1= \gcd(x,r)=sx+tr $ for some $s,t\in R$. Notice that $xM\subseteq M$. Can you prove with this that $M\subseteq xM$?
For the second part: Suppose $y\in M(x)$, i.e. $xy=0$, then use the formula above to conclude that $y=1\cdot y$ is equal to zero. Your reasoning in this item is not right (unless you consider $M=R$ and the induced operation), you may have $R=\mathbb{Z}$ and $M=\mathbb{Z}_2$ (integers modulo 2), then $2\cdot 1=1+1=0$ but $2\neq 0 \neq 1$.
Your discussion about the $\gcd$ is totally fine. This concept may not exist in some rings. However, when you consider PID's (or more generally Euclidean Domains), $\gcd$ always exist (but it may not be unique, one can show it's unique up to multiplication by units). $\mathbb{Q}$ is principal ideal domain (it's a field so its only ideals are $(0)$ and $\mathbb{Q}$) so $\gcd$ exists, the "problem" is that (as mentioned before) it's unique up to multiplication by units so EVERY non-zero element of $\mathbb{Q}$ is a $\gcd$ of any couple of elements of $\mathbb{Q}$.
