Use the defining criterion that a flat module makes injective for every injective module homomorphism . By right exactness of the tensor product, preserving injections is equivalent to preserving every short exact sequence.
First assume is flat over , and fix a maximal ideal . Let be an injection of -modules. Regard it as an injection of -modules. There are natural module isomorphisms
For example, maps to , with inverse . These are well-defined because every already acts invertibly on . Under these isomorphisms the tensor map is , which is injective by flatness. Thus is flat over .
For the converse, assume every is flat over and take any injection of -modules. By part (c), each is injective. Since localization commutes with tensor products, the localization of identifies with
It is injective by the assumed local flatness. Apply part (c) again, now to , to conclude that it is injective globally. Since was arbitrary, is flat. Therefore
This proves flatness is local without any finite-generation hypothesis.
The local criterion states that an -module is flat if and only if is flat over for every prime ideal . It is enough equivalently to test maximal ideals.
If is flat, localization of an exact sequence and the natural isomorphism
show immediately that every is flat.
Conversely, let be injective and let be the kernel of
After localization at any prime , flatness of gives . A module whose localization at every maximal ideal is zero must itself be zero: if , its annihilator is contained in a maximal ideal , and then in . Hence , tensoring by preserves every injection, and is flat. This proves that flatness is local.