Showing that if $R$ is a commutative ring and $M$ an $R$-module, then $M \otimes_R (R/\mathfrak m) \cong M / \mathfrak m M$. Let $R$ be a local ring, and let $\mathfrak m$ be the maximal ideal of $R$. Let $M$ be an $R$-module. I understand that $M \otimes_R (R / \mathfrak m)$ is isomorphic to $M / \mathfrak m M$, but I verified this directly by defining a map $M \to M \otimes_R (R / \mathfrak m)$ with kernel $\mathfrak m M$. However I have heard that there is a way to show these are isomorphic using exact sequences and using exactness properties of the tensor product, but I am not sure how to do this. Can anyone explain this approach?
Also can the statement $M \otimes_R (R / \mathfrak m) \cong M / \mathfrak m M$ be generalised at all to non-local rings?

If $R$ is any commutative ring and $I \subset R$ is an ideal, then $M \otimes_R R/I \cong M/IM$. Consider the short exact sequence of $R$-modules $0 \to I \to R \to R/I \to 0$ and tensor with $M$ over $R$ to obtain the exact sequence $M \otimes_R I \to M \to M \otimes_R R/I \to 0$. The image of the first map is $IM$, so by the first isomorphism theorem we obtain $M/IM \cong M \otimes_R R/I$ as desired.
