If $R$ is a commutative ring, define a relation $\equiv$ on $R$ by $a\equiv b$ if there is a unit $u\in R$ with $b=ua$.
Let $(a)=\{ra: r\in R\}$. Prove that if $R$ is an integral domain, then $(a)=(b)\implies a\equiv b$.
My attempt:
(I have proved that $\equiv$ is an equivalence relation. I don't know if that could help solve this problem.)
$(a)=(b)\implies(a)\subseteq(b)$ and $(b)\subseteq(a)$
Let $x\in(a)$.
So $x=r_1a$ for some $r_1\in R$.
Since $(a)\subseteq(b)$, $x\in(b)$.
So $x=r_2b$ for some $r_2\in R$.
$r_1a=r_2b$ --------------- (1)
Let $x\in(b)$.
So $x=r_3b$ for some $r_3\in R$.
Since $(b)\subseteq(a)$, $x\in(a)$.
So $x=r_4a$ for some $r_4\in R$.
$r_3b=r_4a$ --------------- (2)
Multiplying both sides of (1) by $r_4$, we get
$r_1r_4a=r_2r_4b$
$r_1r_3b=r_2r_4b$ [Using (2)]
If $b\neq 0$, I guess I can cancel $b$ from both sides of the equation because $R$ is an integral domain. But how would I proceed?