TITLE: Why does $M\otimes k(\mathfrak{m})=M_\mathfrak{m}/\mathfrak{m}M_\mathfrak{m}$? (From Matsumura, proof of Theorem 4.8.)
QUESTION [5 upvotes]: Matsumura's Commutative Ring Theory, proof of Theorem 4.8, page 27, says: 

Let $A$ be a ring, $M$ a finite $A$-module, and $\mathfrak{m}$ a maximal ideal. If $k(\mathfrak{m})=A_\mathfrak{m}/\mathfrak{m}A_\mathfrak{m}$ is the residue field of $A_\mathfrak{m}$, then
  $$
M\otimes k(\mathfrak{m})=M_\mathfrak{m}/\mathfrak{m}M_\mathfrak{m}.
$$

I know $A_m/mA_m\cong (A/m)_\bar{m}$, but even then
$$
M\otimes k(m)\cong M\otimes (A/m)_\bar{m}=\cdots?
$$
Even if $(A/m)_\bar{m}\cong A/m$, then doesn't
$$
M\otimes k(m)\cong M\otimes A/m\cong M/mM
$$
but that's not the same as $M_m/mM_m$, is it?

REPLY [4 votes]: This holds for any $A$-module:
$$
M\otimes_A k(\mathfrak{m})\simeq M\otimes_A (A_{\mathfrak m}\otimes_{A_{\mathfrak m}}k(\mathfrak{m}))\simeq (M\otimes_A A_{\mathfrak m})\otimes_{A_{\mathfrak m}}k(\mathfrak{m})\simeq$$ $$M_{\mathfrak m}\otimes_{A_{\mathfrak m}}k(\mathfrak{m})\simeq M_\mathfrak{m}/\mathfrak{m}M_\mathfrak{m}
$$
The first isomorphism follows from $B⊗_BX≃X$, where $X$ is a $B$-module (see Matsumura, Formula 4, page 267), the second follows from the associativity of tensor product (or see Matsumura, Formula 10, page 268), while the third uses that $M_S\simeq M\otimes_AA_S$ (see Matsumura, Theorem 4.4, page 26).