Two ideals both alike in dignity, in fair Paris where we lay our scene. (proving ideals are isomorphic) 
Let $A$ be an integral domain. I have to show that two ideals $\mathfrak a$ and $\mathfrak b$ are isomorphic as $A$-modules if and only if there exist $a$ and $b$ such that $a\mathfrak b=b\mathfrak a$.

I gather that for "$\Leftarrow$" the isomorphism is $x\rightarrow a^{-1}bx$ or something, but I can't prove that $a$ and $b$ have inverses.

My question is: why are $a$ and $b$ invertible?

 A: This question has been answered in comments:

They need not be. Let $K$ the field of fractions of $A$. –  Daniel Fischer Jan 25 at 22:55 

and 

$a$ has an inverse in $K$, the field of fractions. It doesn't matter whether $a^{−1}∈A$, it only matters if it is a homomorphism. In your question, you are missing a "nonzero" before "$a$ and $b$" since $0\mathfrak{a}=0\mathfrak{b}$ for all ideals. –  Jack Schmidt Jan 25 at 23:35

A: The correct statement is: Let $I,J \subseteq A$ be two ideals of an integral domain $A$. Then $I,J$ are isomorphic $A$-modules if and only if there are $a,b \in A \setminus \{0\}$ such that $aI = bJ$.
$\Leftarrow$: Let $aI=bJ$. For every $i \in I$ there is a unique $j \in J$ such that $ai=bj$. It is now easy to check that $i \mapsto j$ induces an isomorphism of $A$-modules. Alternatively, you may look at the $A$-module isomorphism $Q(A) \to Q(A), ~ x \mapsto b^{-1} a x$ and observe that it maps $I$ onto $J$.
$\Rightarrow$: Let $I \cong J$ be an isomorphism of $A$-modules. It extends to an isomorphism of $Q(A)$-modules $I \otimes_A Q(A) \cong J \otimes_A Q(A)$. Notice that $I \otimes_A Q(A)$ embeds into $A \otimes_A Q(A) = Q(A)$, so that its dimension over $Q(A)$ is at most $1$. It follows that the isomorphism of $Q(A)$-modules is given by multiplying with an element of $Q(A)^*$ when we embed both into $Q(A)$, say $\frac{a}{b}$. It now follows that $aI=bJ$.
