# The Stacks Project

## Tag 00HD

Lemma 10.38.5. Let $M$ be an $R$-module. The following are equivalent:

1. $M$ is flat over $R$.
2. for every injection of $R$-modules $N \subset N'$ the map $N \otimes_R M \to N'\otimes_R M$ is injective.
3. for every ideal $I \subset R$ the map $I \otimes_R M \to R \otimes_R M = M$ is injective.
4. for every finitely generated ideal $I \subset R$ the map $I \otimes_R M \to R \otimes_R M = M$ is injective.

Proof. The implications (1) implies (2) implies (3) implies (4) are all trivial. Thus we prove (4) implies (1). Suppose that $N_1 \to N_2 \to N_3$ is exact. Let $K = \mathop{\rm Ker}(N_2 \to N_3)$ and $Q = \mathop{\rm Im}(N_2 \to N_3)$. Then we get maps $$N_1 \otimes_R M \to K \otimes_R M \to N_2 \otimes_R M \to Q \otimes_R M \to N_3 \otimes_R M$$ Observe that the first and third arrows are surjective. Thus if we show that the second and fourth arrows are injective, then we are done1. Hence it suffices to show that $- \otimes_R M$ transforms injective $R$-module maps into injective $R$-module maps.

Assume $K \to N$ is an injective $R$-module map and let $x \in \mathop{\rm Ker}(K \otimes_R M \to N \otimes_R M)$. We have to show that $x$ is zero. The $R$-module $K$ is the union of its finite $R$-submodules; hence, $K \otimes_R M$ is the colimit of $R$-modules of the form $K_i \otimes_R M$ where $K_i$ runs over all finite $R$-submodules of $K$ (because tensor product commutes with colimits). Thus, for some $i$ our $x$ comes from an element $x_i \in K_i \otimes_R M$. Thus we may assume that $K$ is a finite $R$-module. Assume this. We regard the injection $K \to N$ as an inclusion, so that $K \subset N$.

The $R$-module $N$ is the union of its finite $R$-submodules that contain $K$. Hence, $N \otimes_R M$ is the colimit of $R$-modules of the form $N_i \otimes_R M$ where $N_i$ runs over all finite $R$-submodules of $N$ that contain $K$ (again since tensor product commutes with colimits). Notice that this is a colimit over a directed system (since the sum of two finite submodules of $N$ is again finite). Hence, (by Lemma 10.8.4) the element $x \in K \otimes_R M$ maps to zero in at least one of these $R$-modules $N_i \otimes_R M$ (since $x$ maps to zero in $N \otimes_R M$). Thus we may assume $N$ is a finite $R$-module.

Assume $N$ is a finite $R$-module. Write $N = R^{\oplus n}/L$ and $K = L'/L$ for some $L \subset L' \subset R^{\oplus n}$. For any $R$-submodule $G \subset R^{\oplus n}$, we have a canonical map $G \otimes_R M \to M^{\oplus n}$ obtained by composing $G \otimes_R M \to R^n \otimes_R M = M^{\oplus n}$. It suffices to prove that $L \otimes_R M \to M^{\oplus n}$ and $L' \otimes_R M \to M^{\oplus n}$ are injective. Namely, if so, then we see that $K \otimes_R M = L' \otimes_R M/L \otimes_R M \to M^{\oplus n}/L \otimes_R M$ is injective too2.

Thus it suffices to show that $L \otimes_R M \to M^{\oplus n}$ is injective when $L \subset R^{\oplus n}$ is an $R$-submodule. We do this by induction on $n$. The base case $n = 1$ we handle below. For the induction step assume $n > 1$ and set $L' = L \cap R \oplus 0^{\oplus n - 1}$. Then $L'' = L/L'$ is a submodule of $R^{\oplus n - 1}$. We obtain a diagram $$\xymatrix{ & L' \otimes_R M \ar[r] \ar[d] & L \otimes_R M \ar[r] \ar[d] & L'' \otimes_R M \ar[r] \ar[d] & 0 \\ 0 \ar[r] & M \ar[r] & M^{\oplus n} \ar[r] & M^{\oplus n - 1} \ar[r] & 0 }$$ By induction hypothesis and the base case the left and right vertical arrows are injective. The rows are exact. It follows that the middle vertical arrow is injective too.

The base case of the induction above is when $L \subset R$ is an ideal. In other words, we have to show that $I \otimes_R M \to M$ is injective for any ideal $I$ of $R$. We know this is true when $I$ is finitely generated. However, $I = \bigcup I_\alpha$ is the union of the finitely generated ideals $I_\alpha$ contained in it. In other words, $I = \mathop{\rm colim}\nolimits I_\alpha$. Since $\otimes$ commutes with colimits we see that $I \otimes_R M = \mathop{\rm colim}\nolimits I_\alpha \otimes_R M$ and since all the morphisms $I_\alpha \otimes_R M \to M$ are injective by assumption, the same is true for $I \otimes_R M \to M$. $\square$

1. Here is the argument in more detail: Assume that we know that the second and fourth arrows are injective. Lemma 10.11.10 (applied to the exact sequence $K \to N_2 \to Q \to 0$) yields that the sequence $K \otimes_R M \to N_2 \otimes_R M \to Q \otimes_R M \to 0$ is exact. Hence, $\mathop{\rm Ker} \left(N_2 \otimes_R M \to Q \otimes_R M\right) = \mathop{\rm Im} \left(K \otimes_R M \to N_2 \otimes_R M\right)$. Since $\mathop{\rm Im} \left(K \otimes_R M \to N_2 \otimes_R M\right) = \mathop{\rm Im} \left(N_1 \otimes_R M \to N_2 \otimes_R M\right)$ (due to the surjectivity of $N_1 \otimes_R M \to K \otimes_R M$) and $\mathop{\rm Ker} \left(N_2 \otimes_R M \to Q \otimes_R M\right) = \mathop{\rm Ker} \left(N_2 \otimes_R M \to N_3 \otimes_R M\right)$ (due to the injectivity of $Q \otimes_R M \to N_3 \otimes_R M$), this becomes $\mathop{\rm Ker} \left(N_2 \otimes_R M \to N_3 \otimes_R M\right) = \mathop{\rm Im} \left(N_1 \otimes_R M \to N_2 \otimes_R M\right)$, which shows that the functor $- \otimes_R M$ is exact, whence $M$ is flat.
2. This becomes obvious if we identify $L' \otimes_R M$ and $L \otimes_R M$ with submodules of $M^{\oplus n}$ (which is legitimate since the maps $L \otimes_R M \to M^{\oplus n}$ and $L' \otimes_R M \to M^{\oplus n}$ are injective and commute with the obvious map $L' \otimes_R M \to L \otimes_R M$).

The code snippet corresponding to this tag is a part of the file algebra.tex and is located in lines 8356–8376 (see updates for more information).

\begin{lemma}
\label{lemma-flat}
Let $M$ be an $R$-module. The following are equivalent:
\begin{enumerate}
\item
\label{item-flat}
$M$ is flat over $R$.
\item
\label{item-injective}
for every injection of $R$-modules $N \subset N'$
the map $N \otimes_R M \to N'\otimes_R M$ is injective.
\item
\label{item-f-ideal}
for every ideal $I \subset R$ the map
$I \otimes_R M \to R \otimes_R M = M$ is injective.
\item
\label{item-ffg-ideal}
for every finitely generated ideal $I \subset R$
the map $I \otimes_R M \to R \otimes_R M = M$ is injective.
\end{enumerate}
\end{lemma}

\begin{proof}
The implications (\ref{item-flat}) implies (\ref{item-injective})
implies (\ref{item-f-ideal}) implies (\ref{item-ffg-ideal}) are all
trivial. Thus we prove (\ref{item-ffg-ideal}) implies (\ref{item-flat}).
Suppose that $N_1 \to N_2 \to N_3$ is exact.
Let $K = \Ker(N_2 \to N_3)$ and $Q = \Im(N_2 \to N_3)$.
Then we get maps
$$N_1 \otimes_R M \to K \otimes_R M \to N_2 \otimes_R M \to Q \otimes_R M \to N_3 \otimes_R M$$
Observe that the first and third arrows are surjective. Thus if we show
that the second and fourth arrows are injective, then we are
done\footnote{Here is the argument in more detail:
Assume that we know that the second and fourth arrows are
injective. Lemma \ref{lemma-tensor-product-exact} (applied
to the exact sequence $K \to N_2 \to Q \to 0$) yields that
the sequence $K \otimes_R M \to N_2 \otimes_R M \to Q \otimes_R M \to 0$ is exact. Hence,
$\Ker \left(N_2 \otimes_R M \to Q \otimes_R M\right) = \Im \left(K \otimes_R M \to N_2 \otimes_R M\right)$.
Since
$\Im \left(K \otimes_R M \to N_2 \otimes_R M\right) = \Im \left(N_1 \otimes_R M \to N_2 \otimes_R M\right)$
(due to the surjectivity of $N_1 \otimes_R M \to K \otimes_R M$) and
$\Ker \left(N_2 \otimes_R M \to Q \otimes_R M\right) = \Ker \left(N_2 \otimes_R M \to N_3 \otimes_R M\right)$
(due to the injectivity of $Q \otimes_R M \to N_3 \otimes_R M$), this becomes
$\Ker \left(N_2 \otimes_R M \to N_3 \otimes_R M\right) = \Im \left(N_1 \otimes_R M \to N_2 \otimes_R M\right)$,
which shows that the functor $- \otimes_R M$ is exact,
whence $M$ is flat.}.
Hence it suffices to show that $- \otimes_R M$ transforms
injective $R$-module maps into injective $R$-module maps.

\medskip\noindent
Assume $K \to N$ is an injective $R$-module map and
let $x \in \Ker(K \otimes_R M \to N \otimes_R M)$.
We have to show that $x$ is zero.
The $R$-module $K$ is the union of its finite
$R$-submodules; hence, $K \otimes_R M$ is
the colimit of $R$-modules of the form
$K_i \otimes_R M$ where $K_i$ runs over all finite
$R$-submodules of $K$
(because tensor product commutes with colimits).
Thus, for some $i$ our $x$ comes from an element
$x_i \in K_i \otimes_R M$. Thus we may assume that $K$
is a finite $R$-module. Assume this. We regard the
injection $K \to N$ as an inclusion, so that
$K \subset N$.

\medskip\noindent
The $R$-module $N$ is the union of its finite
$R$-submodules that contain $K$. Hence, $N \otimes_R M$
is the colimit of $R$-modules of the form
$N_i \otimes_R M$ where $N_i$ runs over all finite
$R$-submodules of $N$ that contain $K$
(again since tensor product commutes with colimits).
Notice that this is a colimit over a directed system
(since the sum of two finite submodules of $N$ is
again finite).
Hence, (by Lemma \ref{lemma-zero-directed-limit})
the element $x \in K \otimes_R M$ maps to
zero in at least one of these $R$-modules
$N_i \otimes_R M$ (since $x$ maps to zero
in $N \otimes_R M$).
Thus we may assume $N$ is a finite $R$-module.

\medskip\noindent
Assume $N$ is a finite $R$-module. Write $N = R^{\oplus n}/L$ and $K = L'/L$
for some $L \subset L' \subset R^{\oplus n}$.
For any $R$-submodule $G \subset R^{\oplus n}$,
we have a canonical map $G \otimes_R M \to M^{\oplus n}$
obtained by composing
$G \otimes_R M \to R^n \otimes_R M = M^{\oplus n}$.
It suffices to prove that $L \otimes_R M \to M^{\oplus n}$
and $L' \otimes_R M \to M^{\oplus n}$ are injective.
Namely, if so, then we see that
$K \otimes_R M = L' \otimes_R M/L \otimes_R M \to M^{\oplus n}/L \otimes_R M$
is injective too\footnote{This becomes obvious if we
identify $L' \otimes_R M$ and $L \otimes_R M$ with
submodules of $M^{\oplus n}$ (which is legitimate since
the maps $L \otimes_R M \to M^{\oplus n}$
and $L' \otimes_R M \to M^{\oplus n}$ are injective and
commute with the obvious map $L' \otimes_R M \to L \otimes_R M$).}.

\medskip\noindent
Thus it suffices to show that $L \otimes_R M \to M^{\oplus n}$
is injective when $L \subset R^{\oplus n}$ is an $R$-submodule.
We do this by induction on $n$. The base case $n = 1$ we handle below.
For the induction step assume $n > 1$ and set
$L' = L \cap R \oplus 0^{\oplus n - 1}$. Then $L'' = L/L'$ is a submodule
of $R^{\oplus n - 1}$. We obtain a diagram
$$\xymatrix{ & L' \otimes_R M \ar[r] \ar[d] & L \otimes_R M \ar[r] \ar[d] & L'' \otimes_R M \ar[r] \ar[d] & 0 \\ 0 \ar[r] & M \ar[r] & M^{\oplus n} \ar[r] & M^{\oplus n - 1} \ar[r] & 0 }$$
By induction hypothesis and the base case the left and right vertical
arrows are injective. The rows are exact. It follows that the middle vertical
arrow is injective too.

\medskip\noindent
The base case of the induction above is when $L \subset R$ is an ideal.
In other words, we have to show that $I \otimes_R M \to M$ is injective
for any ideal $I$ of $R$. We know this is true when $I$ is finitely
generated. However, $I = \bigcup I_\alpha$ is the union of the
finitely generated ideals $I_\alpha$ contained in it. In other words,
$I = \colim I_\alpha$. Since $\otimes$ commutes with colimits we see that
$I \otimes_R M = \colim I_\alpha \otimes_R M$ and since all
the morphisms $I_\alpha \otimes_R M \to M$ are injective by
assumption, the same is true for $I \otimes_R M \to M$.
\end{proof}

Comment #396 by Fan on December 15, 2013 a 11:28 pm UTC

I don't understand the last sentence of the first paragraph: does it suffice to show that $K_2 \otimes_R M \to N_2 \otimes_R M$ is injective?

Take the chain $0 \to Z \xrightarrow 2 Z$ for example. Tensoring with $Z/2Z$ gives $0 \to Z/2Z \xrightarrow 0 Z/2Z$, which is not exact. However, $K_2 = 0$ and the map $K_2 \otimes_R M \to N_2 \otimes_R M$ is still injective.

Comment #400 by Johan (site) on December 19, 2013 a 3:59 am UTC

OK, yes, that is nonsense! Thanks for this and the other remarks. For the fixes please see here.

There is also 1 comment on Section 10.38: Commutative Algebra.

## Add a comment on tag 00HD

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the lower-right corner).