Intersection of ideals generated by two relatively prime elements I am wondering how to prove the following statement:

Let $R$ be a PID, $a,b$ are relatively prime.
  Then $\langle a\rangle \cap \langle b\rangle =  \langle ab\rangle$


Progress: I think it  holds when $a$ or $b$ is $0$. Or $a$ or $b$ is a unit. And of course $\langle ab\rangle\subseteq \langle a\rangle \cap \langle b\rangle $. Then I got stuck. 
 A: Since $a$ and $b$ are relatively prime, there exist $x$, $y \in R$ such that $xa+yb=1$. Now let $c \in \langle a \rangle \cap \langle b \rangle$. Then there exist $z_1, z_2 \in R$ such that $c=z_1a=z_2b$. We now have $$c=1c=(xa+yb)c=xac+ybc=xz_2ba+yz_1ab=(xz_2+yz_1)ab \in \langle ab \rangle.$$
Note that we did not use here that $R$ is a principal ideal domain, only that it is commutative.
A: Before I give you a solution, its important you know what a generated ideal really means.
Let $R$ be a ring. I am sure you know the definition of an ideal, but what do we mean when we say a "generated" ideal? 
Let $J$ = {$j_{1},j_{2}, \dots j_{s}$} be a subset of $R$, then the set defined as follows: 
$$\sum_{i=1}^{s} h_{i}.j_{i}$$ where $h_{i} \in R$, $j_{i} \in J$ is infact an ideal in $R$, (It is a good exercise to show that this set really is an ideal)  and we denote it as $I = \langle J \rangle$ and say that this ideal is "generated" by $J$. So a principal ideal is really just a special case of a generated ideal where the $J$ (our generating set) has just one element. Don't worry too much if you don't fully grasp the above definition. What's important is that a PID is an ideal generated by a single element. Now in response to your question:
We want to show that $\langle a \rangle \bigcap \langle b \rangle = \langle ab \rangle$, where $a,b$ are co-prime. These ideals are essentially sets and whenever you want to show two sets are equal you have to show each one is a subset of the other. So you have already shown that $\langle ab \rangle \subset \langle a \rangle \bigcap \langle b \rangle$. It only remains to show the other inclusion.
Before you proceed, think about what the intersection really means. The PID generated by $a$ is the set of all elements which are multiples of $a$ and  the PID generated by $b$ is the set of all elements which are multiples of $b$ and their intersection means that you have to find a set of elements which are both multiples of $a$ and $b$, but you have said that $a,b$ are co-prime which means that this is only possible when we consider multiples of $ab$. (If this is hard for you to visualise, try a few examples out, take $a = 3, b = 5$ in the ring of $\mathbb{Z}$) 
So what we have proved is that any element in $\langle a \rangle \bigcap \langle b \rangle$ is a multiple of $ab$ and therefore also belongs to $\langle ab \rangle$, hence $\langle a \rangle \bigcap \langle b \rangle \subset \langle ab \rangle$ and we have equality. 
