# Principal ideals in a commutative ring R

Given $A$ and $B$ principal ideals with the sum $A+B$ also principal. How to show $A\cap B$ is principal? If $A+B$ happens to be the unit ideal then I see that $A\cap B=AB$ which is principal. I tried deriving analogous properties with $A+B$ equalling an arbitrary principal ideal. No headway there.

-
Is your ring an integral domain? – Martin Brandenburg Oct 28 '12 at 9:35
It is not an integral domain, necessarily. That's the very obstruction I faced when I tried it the way Berci has answered below – Host-website-on-iPage Oct 28 '12 at 9:47
Hmm.. I tried it in more general, and couldn't get anywhere (so far). I'm not sure it holds in that generality.. – Berci Oct 28 '12 at 9:50
I found it, it holds, answer updated. – Berci Oct 28 '12 at 13:42

Let $A=(a)$, $B=(b)$ and $A+B=(c)$. As $A,B\subseteq A+B$, we have $a=cx$ and $b=cy$ for some elements $x,y$ (if $R$ is unitary). Then, it reduces to the case $(x)+(y)=R$ (at least if cancellation is allowed).
Update: It follows also when we are not allowed to cancel $c$:
So, $c\in A+B$ means $c=cxu+cyv$. Then $A\cap B\supseteq (cxy)$ is obvious. For the other direction, if $z\in A\cap B$, then it can be written as $z=cxs=cyt$, so we have: $$cs=cxus+cyvs=cytu+cyvs\in (cy)$$ and hence $z=csx\in (cxy)$. -QED-