# Elementary question about localization of ideals

I'm trying to show the following:

Let $I,J$ be ideals of a commutative ring (with 1) $A$ such that $I_{P}=J_{P}$ for every prime ideal P of R. Here $I_{P}$ means the localization of $I$ in $P$. Then $I=J$.

Well I was thinking in using the following result: let $M$ be an $A$-module. If $M_{P}=0$ for every prime ideal then $M=0$.

But don't we need some kind of assumption like $J \subset I$?

Because if for instance, say $J \subset I$ then $(I/J)_{P} \cong I_{P}/J_{P}$ so $(I/J)_{P}$ is the trivial module for every prime ideal $P$ so $I/J=0$ hence $I=J$.

Is this wrong? How do we proceed?

-
Well, how about considering $I/(I\cap J)$, and $J/(I\cap J)$? Note that any prime ideal that contains $I$ must also contain $J$ (and vice versa), and that you only need to work with those ideals. – Arturo Magidin Mar 30 '11 at 2:53
I know this as the "local-global principle", and the way I've seen this proven is by using the maximal (and thus prime) ideal containing $(J : i)$ for $i\in I - J$ to derive a contradiction. – Alex Becker Mar 30 '11 at 3:00
@Arturo Magidin: Thanks. If I recall correctly, isn't a result that $S^{-1}(M \cap N)=S^{-1}M \cap S^{-1}N$ (M,N both $A$-modules). I believe I saw this result in Atiyah's and Macdonald's book though I don't have it right now. – user6495 Apr 1 '11 at 15:35
@user6495: Yes. – Arturo Magidin Apr 1 '11 at 15:40
@Arturo Magidin: Thanks a lot, for some reason your answer didn't appear until now (although it says you answered yesterday). – user6495 Apr 1 '11 at 15:50

You know what to do if $J\subseteq I$ or if $I\subseteq J$.
How about considering the ideals $I$ and $I\cap J$, then? If you can show that $(I\cap J)_P = I_P\cap J_P$, then your argument will go through for $I$ and $I\cap J$, showing $I=I\cap J$. Then you can repeat the argument with $J$ and $I\cap J$.