# A question on localization

For an integral domain $R$, I know that $$R=\bigcap_{\text{maximal ideals }\mathcal{m}}R_{\mathcal{m}}.$$ Why must $R$ be an integral domain?

I want to know a counterexample when $R$ is not an integral domain.

-
This intersection notation is not even well-defined if $R$ is not an integral domain; the intersection is supposed to be taking place in $\text{Frac}(R)$. –  Qiaochu Yuan Dec 28 '12 at 7:09

Let $p, q$ be distinct prime numbers. Let $R = \mathbb{Z}/pq\mathbb{Z}$. Let $m = pR$. $\ker(R \rightarrow R_m) = \{x \in R|\ sx = 0$ for some $s \in R - m\}$. Since $qp = 0$ in $R$ and $q \in R - m$, $p \in \ker(R \rightarrow R_m)$. Hence $\ker(R \rightarrow R_m) \neq 0$. So $R$ is not a subring of $R_m$.