Two principal ideals coincide if and only if their generators are associated

Suppose we have a ring $R$ and $(a),(b)$ are both ideals of $R$. Is it always true that $(a)=(b)$ if and only if there exists a unit $c$ such that $a=bc$ (i.e., $a$ and $b$ are associate)?

I have already verified that the forwards direction is true. But I have no idea on the backward direction. If it is true, can someone provide a proof to me?

Backward direction: Suppose that there exists a unit $c \in R$ such that $a=bc$. This implies that $(a)\subset (b)$. By using the same thing, (i.e., $b$ and $a$ are associate), there exists a unit $d \in R$ such that $b=ad$. This implies that $(b) \subset (a)$. is this correct?

-
No. You need to prove it yourself. You have asked like 10 questions here, and have shown very little work. Let me provide a hint: (a)=(b) if and only if $a\mid b$ and $b\mid a$. – Alex Youcis Apr 9 '13 at 14:49
@AlexYoucis: So you mean the statement is false ? – Idonknow Apr 9 '13 at 14:52
@Idonknow No, he's saying you should answer your own question and providing you with a hint. – Alexander Gruber Apr 9 '13 at 14:53
@Idonknow No. The statement is true, I'm just saying that you need to take a more serious crack at if, or if you have, show us. I mean, come on, we aren't homework jockeys just sitting here waiting to answer other people's homework. We'd like to help you, but we'd also like to see that you're attempting to learn/improve in the process. – Alex Youcis Apr 9 '13 at 14:54

This is easily proved true if $\rm\:a,b\:$ are not zero-divisors. It may fail otherwise, e.g. Kaplansky gave this counterexample: in the ring of continuous real functions on $[0,3],$ define piecewise $\rm\:a(t)\:$ and $\rm\:b(t)\:$ as follows: $\rm\: a(t) =1\!-\!t=b(t)\:$ on $[0,1];$ both $\,0\,$ on $[1,2];$ $\rm\:a(t)=t-2 = -b(t)$ on $[2,3].$

Kap remarked that the property is true for Artinian rings, principal ideal rings, and rings whose zero-divisors are contained in the Jacobson radical. For much further analysis see

When are Associates Unit Multiples?
D.D. Anderson, M. Axtell, S.J. Forman, and Joe Stickles
Rocky Mountain J. Math. Volume 34, Number 3 (2004), 811-828.

-
Such nice answers are one of the reasons why I even browse through "boring" questions. – Martin Brandenburg Apr 9 '13 at 15:11

This is not quite true over arbitrary (commutative) rings, although it holds over integral domains. From the given condition you get elements $u,v$ so that $b=ua$, $a=vb$ and so $b=uvb$ and $a=vua$. When $a$ or $b$ is a regular element, as always happens in an integral domain (with the exception of the trivial case $a=b=0$) then one can cancel it to conclude that $u$ and $v$ are inverses of each other.

This fails however in more general rings. As happens often with such statements, one can easily force an example by dividing out suitable things from a polynomial ring. Take $R=k[a,b,u,v]/(a-vb,b-ua)$ for some field (or ring) $k$, now we have forced $aR=bR$. However neither $u$ nor $v$ are invertible, as the evaluation $a:=0,b:=0$, which induces a morphism $R\to k[u,v]$ where the images of $u,v$ are non-invertible, shows.

-
A proof that the "generic" counterexample in your second paragraph works can be found in Theorem 8 of the paper I linked to (for any coefficient ring). They attribute to C.R. Fletcher (1970) the case when the coefficient ring is a field. But probably it is much older, since generic counterexamples are the first thing one tries (and such ideas are very old). – Math Gems Apr 9 '13 at 15:42