Flatness and Exactness

Introduction

A sequence is exact when the image of each map is the kernel of the next, and the question of which functors preserve exactness is the beginning of homological algebra. The balanced product is always right exact and in general not left exact, and a module over which the failure disappears is called flat. Flatness is therefore the module-theoretic condition that makes base change behave well; it holds for free modules, for projective modules and for localisations, and it fails for the torsion modules; over a general domain it also fails for some torsion-free modules, the simplest being a non-principal ideal of a polynomial ring. The tensor–hom adjunction is the categorical statement that explains why right exactness is automatic and left exactness is not.

Throughout, $R$ is a commutative ring with $1 \neq 0$ and all modules are $R$-modules. The exact-sequence vocabulary of the companion article of this category on exact sequences is used freely, and the balanced product is the one constructed in the companion article on the balanced product.

Right Exactness of the Tensor Product

Statement

Theorem. Let $M' \xrightarrow{\ \alpha\ } M \xrightarrow{\ \beta\ } M'' \to 0$ be an exact sequence of $R$-modules, and let $N$ be any $R$-module. Then the induced sequence

$$ M' \otimes_R N \xrightarrow{\ \alpha \otimes \operatorname{id}\ } M \otimes_R N \xrightarrow{\ \beta \otimes \operatorname{id}\ } M'' \otimes_R N \longrightarrow 0 $$

is exact. That is, the functor $- \otimes_R N$ is right exact.

Proof. The map $\beta \otimes \operatorname{id}$ is surjective because $M''$ is generated by the image of $\beta$ and the elementary tensors generate $M'' \otimes_R N$: a tensor $m'' \otimes n$ is $(\beta \otimes \operatorname{id})(\tilde m \otimes n)$ for any $\tilde m$ with $\beta(\tilde m)=m''$. For the exactness at the middle, it is enough by the universal property to show that $\operatorname{im}(\alpha \otimes \operatorname{id})=\ker(\beta \otimes \operatorname{id})$. The inclusion $\subseteq$ holds because $(\beta \otimes \operatorname{id})(\alpha \otimes \operatorname{id})=\beta\alpha \otimes \operatorname{id}=0$. For the reverse, consider the quotient $Q=(M \otimes_R N)/\operatorname{im}(\alpha \otimes \operatorname{id})$ and the induced balanced map $M \times N \to Q$; it factors through $M'' \times N$ because it kills $\operatorname{im}\alpha \times N$ by exactness at $M$, giving a balanced map $M'' \times N \to Q$ and hence a homomorphism $\varphi:M'' \otimes_R N \to Q$. The composite $M \otimes_R N \to M'' \otimes_R N \xrightarrow{\varphi} Q$ is the quotient map, so $\ker(\beta \otimes \operatorname{id}) \subseteq \operatorname{im}(\alpha \otimes \operatorname{id})$.

Failure of Left Exactness

Proposition. The functor $- \otimes_R N$ need not preserve injectivity. Concretely, the injection $\mathbb{Z} \xrightarrow{\ \cdot 2\ } \mathbb{Z}$ becomes, after tensoring with $\mathbb{Z}/2\mathbb{Z}$, the map $\mathbb{Z}/2\mathbb{Z} \to \mathbb{Z}/2\mathbb{Z}$ given by multiplication by $2$, that is, the zero map, which is not injective.

Proof. Tensoring $0 \to \mathbb{Z} \xrightarrow{\cdot2} \mathbb{Z} \to \mathbb{Z}/2\mathbb{Z} \to 0$ with $\mathbb{Z}/2\mathbb{Z}$ gives $\mathbb{Z}/2 \to \mathbb{Z}/2 \to \mathbb{Z}/2 \otimes \mathbb{Z}/2 \to 0$. The first map sends $1 \otimes 1$ to $2 \otimes 1 = 1 \otimes 2 = 0$ in $\mathbb{Z}/2$, so it is zero. Hence $0 \to \mathbb{Z}/2 \to \mathbb{Z}/2$ is not exact at the first copy.

The failure is exactly a torsion phenomenon: the kernel of $\cdot 2$ on $\mathbb{Z}$ is zero, but after tensoring with $\mathbb{Z}/2$ the element $1 \otimes 1$ has been killed by the relation $2 \otimes 1=1 \otimes 2=0$.

Flat Modules

Definition and First Examples

Definition. An $R$-module $N$ is flat if the functor $- \otimes_R N$ is exact, equivalently (since it is always right exact) if it preserves injectivity: for every injection $\alpha:M' \to M$ the map $\alpha \otimes \operatorname{id}_N$ is injective.

Proposition. (i) Every free module is flat, and more generally every projective module is flat. (ii) A direct sum of modules is flat if and only if each summand is flat; direct summands of flat modules are flat. (iii) A filtered colimit of flat modules is flat. (iv) For a multiplicatively closed set $S \subseteq R$, the localisation $S^{-1}R$ is flat over $R$.

Proof. (i) For a free module $N=R^{(I)}$ the functor $- \otimes_R N$ is the functor $M \mapsto M^{(I)}$, which is exact; a direct summand of a flat module is flat by (ii), and projectives are direct summands of free modules. (ii) Tensoring with a direct sum is the direct sum of the tensored functors, and a direct sum of maps is injective if and only if each is. (iii) Filtered colimits commute with tensor products and with kernels. (iv) is the exactness of localisation, below.

Proposition. Over a principal ideal domain, a module is flat if and only if it is torsion-free.

Proof. Torsion-free finitely generated modules over a principal ideal domain are free, hence flat, and an arbitrary torsion-free module is the filtered colimit of its finitely generated torsion-free submodules, hence flat. Conversely, if $x \neq 0$ is annihilated by $r \neq 0$, then under the identification $(r) \cong R$ the ideal-criterion map $(r) \otimes_R N \to N$ is multiplication by $r$ on $N$, whose kernel $N[r]$ contains $x$; the map is not injective and $N$ is not flat.

In particular $\mathbb{Q}$ is flat over $\mathbb{Z}$, while $\mathbb{Z}/n\mathbb{Z}$ for $n \ge 2$ and $\mathbb{Q}/\mathbb{Z}$ are not.

The Ideal Criterion

Theorem (ideal criterion). An $R$-module $N$ is flat if and only if for every finitely generated ideal $I \subseteq R$ the natural map $I \otimes_R N \to N$ is injective.

Proof. The condition is necessary because $I \to R$ is injective and flatness would make $I \otimes N \to R \otimes N=N$ injective. Sufficiency is the standard reduction, quoted here as standard: an injection $M' \to M$ is a filtered colimit of injections of finitely generated submodules, and the criterion on ideals of the special form $I \to R$ gives injectivity in general.

Flatness has a structural form as well.

Theorem (Lazard). An $R$-module is flat if and only if it is a filtered colimit of free modules, equivalently of finitely generated free modules.

The ideal criterion above is the ideal-theoretic form of flatness and Lazard's theorem is its structure-theoretic form: a flat module is built from free modules by filtered colimits, and it is the closure of the class of flat modules under filtered colimits that the criterion is normally applied through.

The criterion reduces flatness to a condition on the ideals of $R$, which is why flatness can often be checked by hand: for $R=\mathbb{Z}$ the ideals are principal, so the only condition is that multiplication by $r$ on $N$ has no kernel, which is torsion-freeness, recovering the proposition above.

Torsion Counterexamples

Proposition. (i) $\mathbb{Z}/n\mathbb{Z}$ is not flat over $\mathbb{Z}$ for $n \ge 2$. (ii) $\mathbb{Q}/\mathbb{Z}$ is not flat over $\mathbb{Z}$. (iii) $\mathbb{Z}/m \otimes_{\mathbb{Z}} \mathbb{Z}/n \cong \mathbb{Z}/\gcd(m,n)$, so the tensor product of two torsion modules can vanish without either factor vanishing.

Proof. (i) Tensoring $0 \to \mathbb{Z} \xrightarrow{\cdot n} \mathbb{Z} \to \mathbb{Z}/n\mathbb{Z} \to 0$ with $\mathbb{Z}/n$ gives the zero map on $\mathbb{Z}/n$, not an injection. (ii) It has torsion, and torsion is not flat by the criterion. (iii) is the computation of the companion article on the balanced product.

Torsion-Freeness Is Not Enough

The equivalence of flatness with torsion-freeness is special to principal ideal domains, and over a general domain the implication is one-way.

Example. Let $R=k[x,y]$ over a field $k$ and let $I=(x,y)$. As a submodule of the domain $R$ the ideal $I$ is torsion-free, and it is generated by the two elements $x$ and $y$ with the relation $y \cdot x-x \cdot y=0$, so it is not free; it is not flat either. The ideal criterion applied to the module $N=I$ with the test ideal $I$ gives the multiplication map $$ I \otimes_R I \longrightarrow I, \qquad f \otimes g \longmapsto fg , $$ and the element $x \otimes y-y \otimes x$ lies in its kernel, since $xy=yx$. That element is nonzero: grade $R$ by total degree, so that $I$ is concentrated in degree $1$, generated by $x$ and $y$; then $I \otimes_R I$ is generated in degree $2$ by the four products $x \otimes x$, $x \otimes y$, $y \otimes x$, $y \otimes y$. The relations among these generators are those forced by the syzygy $y\cdot x-x\cdot y=0$ of the two generators of $I$, namely the four elements $y\,u-x\,v$ with $u,v$ among the four products, and each of them is homogeneous of degree $3$. There is therefore no nonzero relation of degree $2$, while a relation with coefficients in $k$ is homogeneous of degree $2$; hence the four products are linearly independent over $k$, the kernel of the multiplication map contains the nonzero element $x \otimes y-y \otimes x$, and $I$ is not flat. What fails is not torsion-freeness but generation: a nonzero principal ideal of a domain is free of rank $1$, hence flat, while an ideal that needs two generators carries relations among them. For a principal ideal domain every ideal is principal, the obstruction disappears, and flat, torsion-free and (for finitely generated modules) free coincide.

Remark. Testing the criterion on principal ideals alone is not enough. Over a domain, injectivity of multiplication by $r$ on $N$ for every $r$ is exactly torsion-freeness; the module $I=(x,y)$ above is torsion-free and not flat, and it fails the criterion at the non-principal ideal $I$ itself, used as the test ideal. The principal ideals therefore detect only torsion, and the criterion must be applied to all finitely generated ideals.

The Tensor–Hom Adjunction

Theorem. For $R$-modules $M,N,P$ there is a natural isomorphism

$$ \operatorname{Hom}_R(M \otimes_R N,\,P) \;\cong\; \operatorname{Hom}_R\bigl(M,\,\operatorname{Hom}_R(N,P)\bigr), $$

under which $\varphi$ on the left corresponds to the map $m \mapsto (n \mapsto \varphi(m \otimes n))$ on the right.

Proof. The displayed correspondence is well defined and $\mathbb{Z}$-linear, and it is injective because the elementary tensors generate. Given $\psi:M \to \operatorname{Hom}_R(N,P)$ on the right, the map $(m,n) \mapsto \psi(m)(n)$ is balanced, so by the universal property there is $\varphi$ with $\varphi(m \otimes n)=\psi(m)(n)$, and the two constructions are mutually inverse. Naturality in each variable is immediate.

Corollary. (i) The functor $- \otimes_R N$ is left adjoint to $\operatorname{Hom}_R(N,-)$, so it preserves colimits and in particular is right exact. (ii) $\operatorname{Hom}_R(-,P)$ is left exact contravariant and $\operatorname{Hom}_R(P,-)$ is left exact covariant: for every exact sequence $0 \to M' \to M \to M''$ the sequences

$$ 0 \to \operatorname{Hom}_R(M'',P) \to \operatorname{Hom}_R(M,P) \to \operatorname{Hom}_R(M',P) $$

and $0 \to \operatorname{Hom}_R(P,M') \to \operatorname{Hom}_R(P,M) \to \operatorname{Hom}_R(P,M'')$ are exact.

Proof. (i) Left adjoints preserve colimits, and an exact sequence $M' \to M \to M'' \to 0$ is a colimit statement; right exactness is the preservation of the colimits $\operatorname{coker}$. (ii) A homomorphism out of $M''$ restricts to $M$ and, if it vanishes on $M$, is zero; a homomorphism into $M'$ composed with the injection is zero only when it was zero; this gives exactness at the first two places, and the same argument applies covariantly.

The adjunction explains the asymmetry: right exactness of $\otimes$ is the preservation of colimits by a left adjoint, while left exactness of $\operatorname{Hom}$ is the preservation of limits by a right adjoint. Neither functor is exact in general, and flatness of $N$ is precisely the extra condition needed for $- \otimes_R N$ to be a left adjoint that also preserves kernels.

Localisation as a Flat Base Change

Proposition. Let $S \subseteq R$ be multiplicatively closed. The localisation $S^{-1}R$ is a flat $R$-module, and for every $R$-module $M$ the localisation $S^{-1}M$ is naturally isomorphic to $S^{-1}R \otimes_R M$.

Proof. Localisation of a module is an exact functor: a fraction $m/s$ maps to zero in $S^{-1}(M/M')$ exactly when it lies in the image of $S^{-1}M'$, by the calculus of fractions. Definition of the isomorphism: the balanced map $S^{-1}R \times M \to S^{-1}M$, $(r/s,m) \mapsto rm/s$, induces $\Phi:S^{-1}R \otimes_R M \to S^{-1}M$, and $\Phi((1/s) \otimes m)=m/s$; the inverse sends $m/s$ to $(1/s) \otimes m$.

The identification $S^{-1}M \cong S^{-1}R \otimes_R M$ means localisation is an extension of scalars along $R \to S^{-1}R$, so it is a base change in the sense of the companion article on extension of scalars, and it is flat because $S^{-1}R$ is a flat $R$-module. This is the reason localisation preserves exactness while general base change does not: a localisation is a flat base change, and an arbitrary quotient $R \to R/I$ is not.

Proposition. Localisation commutes with kernels, images, cokernels, finite direct sums and tensor products: for any $R$-modules $M,N$,

$$ S^{-1}(M \otimes_R N) \cong S^{-1}M \otimes_{S^{-1}R} S^{-1}N . $$

Proof. The identification is immediate on elementary fractions, using $(m \otimes n)/s \mapsto (m/s) \otimes (n/1)$; exactness gives compatibility with kernels and cokernels.

Flat Modules over Local and Noetherian Rings

Theorem. Let $(R,\mathrm{M})$ be a Noetherian local ring and $M$ a finitely generated $R$-module. If $M$ is flat then $M$ is free.

Proof. By Nakayama's lemma choose a basis $\bar x_1,\dots,\bar x_n$ of the vector space $M/\mathrm{M}M$ over $R/\mathrm{M}$ and lift it to $x_1,\dots,x_n \in M$; the map $F=R^n \to M$ sending the standard basis to the $x_i$ is surjective by Nakayama. Let $K=\ker(F \to M)$ and tensor $0 \to K \to F \to M \to 0$ with $R/\mathrm{M}$. Since $M$ is flat the resulting sequence is exact at $K/\mathrm{M}K$, so the map $K/\mathrm{M}K \to F/\mathrm{M}F$ is injective; and $F/\mathrm{M}F$ and $M/\mathrm{M}M$ both have dimension $n$, so the surjection $F/\mathrm{M}F \to M/\mathrm{M}M$ is an isomorphism and $K/\mathrm{M}K=0$. Nakayama gives $K=0$, hence $F \cong M$.

Theorem. For an $R$-module $M$: (i) $M$ is flat if and only if $M_{\mathrm{P}}$ is flat over $R_{\mathrm{P}}$ for every prime ideal $\mathrm{P}$, equivalently for every maximal ideal; (ii) if $R$ is Noetherian and $M$ is finitely generated, then $M$ is flat if and only if $M$ is projective; (iii) if $R$ is a principal ideal domain, then $M$ is flat if and only if $M$ is torsion-free.

Proof. (i) Flatness is preserved by localisation and localisation detects it, because the ideal criterion can be tested after localising at each maximal ideal. (ii) A finitely generated flat module over a Noetherian local ring is free by the previous theorem, and projectivity is local, so a finitely generated flat module over a Noetherian ring is locally free of finite rank and hence projective. (iii) Testing the ideal criterion against the principal ideals gives exactly torsion-freeness, and every ideal of a principal ideal domain is principal.

Example. The $\mathbb{Z}$-module $\mathbb{Q}$ is flat and torsion-free but not free; $\mathbb{Z}/n\mathbb{Z}$ is not flat for $n>1$, being torsion; the finitely generated flat $\mathbb{Z}$-modules are exactly the free ones, since a finitely generated torsion-free module over a principal ideal domain is free.

Summary

The tensor product is right exact: if $M' \to M \to M'' \to 0$ is exact then so is $M' \otimes_R N \to M \otimes_R N \to M'' \otimes_R N \to 0$, because the elementary tensors generate and the relations force the kernel to be the image. It is not left exact, and the standard witness is the injection $\mathbb{Z} \xrightarrow{\cdot2} \mathbb{Z}$, which becomes the zero map after tensoring with $\mathbb{Z}/2\mathbb{Z}$.

An $R$-module $N$ is flat when $- \otimes_R N$ is exact, equivalently when it preserves injective maps. Free modules and projective modules are flat, direct sums and summands of flat modules are flat, filtered colimits of flat modules are flat, and localisations $S^{-1}R$ are flat; over a principal ideal domain flatness is equivalent to torsion-freeness. The ideal criterion reduces the checking of flatness to the maps $I \otimes_R N \to N$ for finitely generated ideals $I$, and Lazard's theorem identifies the flat modules as the filtered colimits of free modules. Torsion modules such as $\mathbb{Z}/n\mathbb{Z}$ and $\mathbb{Q}/\mathbb{Z}$ are not flat, and $\mathbb{Z}/m \otimes_{\mathbb{Z}} \mathbb{Z}/n \cong \mathbb{Z}/\gcd(m,n)$ shows how much information the tensor product discards.

The tensor–hom adjunction $\operatorname{Hom}_R(M \otimes_R N,P) \cong \operatorname{Hom}_R(M,\operatorname{Hom}_R(N,P))$ identifies $- \otimes_R N$ as the left adjoint of $\operatorname{Hom}_R(N,-)$ and explains the asymmetry: the left adjoint preserves colimits, hence right exactness of the tensor product, while $\operatorname{Hom}_R(-,P)$ and $\operatorname{Hom}_R(P,-)$ are left exact. Finally, localisation is flat base change, since $S^{-1}M \cong S^{-1}R \otimes_R M$ and $S^{-1}$ is exact, and it commutes with kernels, cokernels, finite sums and tensor products. Over a Noetherian local ring a finitely generated flat module is free, by Nakayama's lemma, and hence over a Noetherian ring a finitely generated flat module is projective; flatness is local on the base ring, and over a principal ideal domain it is equivalent to torsion-freeness, so the finitely generated flat $\mathbb{Z}$-modules are exactly the free ones. The equivalence of flatness with torsion-freeness is special to principal ideal domains: over $k[x,y]$ the torsion-free ideal $(x,y)$ is not flat, as its multiplication map $I \otimes_R I \to I$ kills the nonzero element $x \otimes y-y \otimes x$.

Summary of Notation

Symbol Meaning
$R$ a commutative ring with $1 \neq 0$
$M,N,P$ $R$-modules
$- \otimes_R N$ the right exact tensor functor
$\operatorname{Hom}_R(M,N)$ $R$-linear maps
$S^{-1}R$, $S^{-1}M$ localisation at a multiplicatively closed set $S$
$I \otimes_R N \to N$ the ideal-criterion map
$\mathbb{Z}/n$ the cyclic module $\mathbb{Z}/n\mathbb{Z}$
$M', M''$ sub- and quotient modules in an exact sequence

Further Reading

  • Nicolas Bourbaki, Commutative Algebra: Chapters 1–7 (Springer, 1989), for flatness and exactness over a commutative ring.
  • Henri Cartan and Samuel Eilenberg, Homological Algebra (Princeton University Press, 1956), for the tensor–hom adjunction and the derived functors.
  • Hideyuki Matsumura, Commutative Ring Theory (Cambridge University Press, 1989), for flatness criteria and the localisation theory.
  • Joseph J. Rotman, An Introduction to Homological Algebra (Springer, 2nd ed. 2009), for $\operatorname{Tor}$ and flatness.
  • Jean-Pierre Serre, Local Algebra (Springer, 2000), for the homological characters of flatness.
  • Charles A. Weibel, An Introduction to Homological Algebra (Cambridge University Press, 1994), for right exactness, adjunctions and derived functors.