Does Localization Commute with Direct/Inverse Limits

Let $A$ be a ring and let $M_n$ be $A$-modules. For a prime ideal $P$ in $A$ is it true that $$(\varprojlim_n M_n)_P=\varprojlim_n (M_n)_P\text{ and } (\varinjlim_n M_n)_P=\varinjlim_n (M_n)_P?$$

If it is not true, are there conditions on $A$ and $M$ which do make it true?

• What type of (co)limits? It is true for finite limits and colimits because localization is exact. – Alex Youcis Sep 26 '13 at 3:39
• Thanks Alex fo your edit.. index $n$ is not finite... – Sang Cheol Lee Sep 26 '13 at 4:11
• It's actually true for all colimits, because localisation is a left adjoint. – Zhen Lin Sep 26 '13 at 7:08
• @ZhenLin Sure, but I don't think it's generically true for limits, right? I'm sure there is some obvious example, but I don't know what it is? If the OP was curious about localizations in general perhaps power series rings could provide a counterexample. Namely, $\displaystyle \varprojlim A[x]/(x^n)_x=0$ but $\displaystyle A[[x]]_x\ne 0$. Yeah? – Alex Youcis Sep 26 '13 at 7:13
• Indeed. The question is essentially a special case of "When does ${-} \otimes_A B$ preserve limits?" – Zhen Lin Sep 26 '13 at 7:15

If $A$ is a commutative ring and $S \subseteq A$ is a subset, then localization $M \mapsto S^{-1} M$ provides a functor $\mathsf{Mod}(A) \to \mathsf{Mod}(S^{-1} A)$ which is left adjoint to the forgetful functor. In particular, it preserves all colimits. The forgetful functor $\mathsf{Mod}(S^{-1} A) \to \mathsf{Mod}(A)$ also preserves all colimits (the same is true for $\mathsf{Mod}(B) \to \mathsf{Mod}(A)$ for every $A$-algebra $B$), in fact they are created by the forgetful functor to $\mathsf{Ab}$. So in particular localization as a functor $\mathsf{Mod}(A) \to \mathsf{Mod}(A)$ preserves all colimits.
Localization also commutes with finite limits, because $S^{-1} A$ is a flat $A$-algebra. But usually it doesn't commute with infinite limits. For example, the canonical homomorphism $(\prod_{i \in I} \mathbb{Z}) \otimes_{\mathbb{Z}} \mathbb{Q} \to \prod_{i \in I} \mathbb{Q}$ is not surjective when $I$ is infinite. The image consists of those sequences of rational numbers whose denominators can be bounded.