Flatness is all about avoiding an annoying property of the tensor product: it does not preserve submodules.

Fix a commutative ring {R}. We say that an {R}-module {M} is flat if the functor {Mod(R) \rightarrow Mod(R), N \rightarrow M \otimes_R N}, is exact; it is always right-exact. It is sufficient to show that for any injection 

\displaystyle 0 \rightarrow N' \rightarrow N  

the tensored sequence is exact, i.e. 

\displaystyle 0 \rightarrow N' \otimes M \rightarrow N \otimes M.  

It is immediate that the direct sum or tensor product of flat modules is flat, and that a direct summand in a flat module is flat. Also, the module {R} itself is clearly flat. So any free module is flat, and thus so is any projective module.   In the local case, we’ll see that the converse is true at least if we stick to finitely generated modules over a noetherian ring (more generally, for finitely presented modules over any ring). 

Since completion preserves exactness, {\hat{R}} is a flat {R}-module where {\hat{R}} is an {I}-adic completion of {R} for {R} noetherian. Localization does to, so any localization is flat.   So many common examples are flat.  But because of the above injectivity characterization, a nonzerodivisor in R must act by a nonzerodivisor on any flat module.  Thus for instance, \mathbb{Z}/2\mathbb{Z} is not flat over \mathbb{Z}(more…)