Let $R$ be a commutative ring with unit. Show that $\langle a\rangle = \langle b\rangle \iff a$ and $b$ are friends Let $R$ be a commutative ring with unit. $\langle a\rangle = \langle b\rangle \iff a$ and $b$ are friends.
So the direction of $a,b$ friends $\implies$ is trivial.
I can't manage to prove the other direction though. Can anyone help me?
I started with that: The ideals are equal so $a\in \langle b\rangle$ so there exists $c\in R$ such that $a=bc$. The same goes for exists $d\in R$ such that $b=ad$ so we get $a(1-dc)=0$ so I need to prove $1-dc$ isn't a zero divisor but got no idea how.


I can't manage to prove the other direction though.

It's not your fault, it is not possible to prove because there are counterexamples. (See also the linked questions to that question.)
The only reasonable context in which the converse you suggest is true is when $R$ is a domain, that is, cancellation is possible.
