Commutative Algebra Lecture 8: Flat Modules and Algebras • Recall that an R-module M is flat if for each short exact sequence of R-modules 0 → A → B → C → 0, the sequence obtained by tensoring with M is still exact: 0 → M ⊗R A → M ⊗R B → M ⊗R C → 0. For example, free modules are always flat (it’s clear that R is flat as an R-module, and easy to check that direct sums of flat modules are flat), and we’ve checked that if S ⊆ R is a multiplicative subset, then S −1 R is a flat R-module. More generally, if A is an R-algebra, we say A is flat (over R) is A is flat as an R-module. So localizations are flat algebras; we will also see in Lecture 11 that completions of Noetherian rings are flat. • Flatness is one of those conditions that is equivalent to ostensibly stronger and weaker properties: Lemma 1. Let R be a ring and M an R-module. The following are equivalent: i. If A → B is an injective R-module homomorphism with A and B finitely generated, then M ⊗R A → M ⊗R B is also injective. ii. If A → B is any injective R-module homomorphism, then M ⊗R A → M ⊗R B is also injective. iii. M is flat, i.e. if 0 → A → B → C → 0 is a short exact sequence of R-modules, then 0 → M ⊗R A → M ⊗R B → M ⊗R C → 0 is also exact. iv. If A → B → C is any pair of composible R-module homomorphisms exact at B, then M ⊗R A → M ⊗R B → M ⊗R C is exact at M ⊗R B. Proof. We prove that (ii)⇒(iii)⇒(iv)⇒(ii) and that (i) ⇐⇒ (ii). 1 (ii⇒iii) If 0 → A → B → C → 0 is exact, then we know that the sequence M ⊗R A → M ⊗R B → M ⊗R C → 0 is exact without any flatness assumptions on M . Then all that is left to check is exactness of 0 → M ⊗R A → M ⊗R B, i.e. injectivity of M ⊗R A → M ⊗R B. But this holds if we assume that M ⊗R · preserves the injectivity of A → B. f g (iii⇒iv) If A B C is exact, construct the image factorization (surjection followed by injection) for each of A → B and B → C: im(f ) f A g B C im(g) By including the kernel of f and cokernel of g, we can extend this diagram to include three short exact sequences: 0 0 0 im(f ) coker(g) f A B ker(f ) g C im(g) 0 0 0 (Exactness of im(f ) → B → im(g) at B is equivalent to exactness of A → B → C at B.) Then tensoring with M , the short exact sequences stay short exact, so we obtain the following injections and surjections M ⊗ im(f ) M ⊗A f M ⊗B g M ⊗ im(g) 2 M ⊗C with M ⊗ im(f ) → M ⊗ B → M ⊗ im(g) exact at M ⊗ B. But since image factorization is unique, we find that M ⊗ im(f ) ∼ = im(M ⊗ f ) and M ⊗ im(g) ∼ = im(M ⊗ g). Therefore im(M ⊗ f ) → M ⊗ B → im(M ⊗ g) is exact at M ⊗ B, which implies that M ⊗ A → M ⊗ B → M ⊗ C is exact at M ⊗ B, as desired. (iv⇒ii) If A → B is injective, then 0 → A → B is exact. Tensoring with M , then, we obtain an exact sequence 0 → M ⊗ A → M ⊗ B, so M ⊗ A → M ⊗ B is injective. (i ⇐⇒ ii) The implication (ii⇒i) is trivial. For the converse, suppose that f : A ֒→ B is an injection such that M ⊗ A → M ⊗ B is not injective; we will construct a finitely generated counterexample A′ ֒→ B ′ . P Since M ⊗ A → M P ⊗ B is not injective, there is a nonzero element i mi ⊗ ai ∈ M ⊗ A such that i mi ⊗ P f (ai ) = 0. Define A′ ⊆ A as the submodule of A generated by the ai . Then i mi ⊗ ai 6= P 0 as an element of M ⊗ A′ , since any ′ chain of elementary relations connecting i mi ⊗ ai to 0 in M ⊗ A would also P constitute a proof in M ⊗ A that i mi ⊗ ai = 0. P Defining B ′ is a little trickier. Since i mi ⊗ f (ai ) = 0 in M ⊗ B, there does exist a chain of equalities X X mi ⊗ f (ai ) = m′j ⊗ b′j = · · · = 0, i j with each equality coming from one of the defining relations of the tensor product M ⊗ B, such as m1 ⊗ b + m2 ⊗ b = (m1 + m2 ) ⊗ b. Then if we let B ′ ⊆ B be the submodule generated by the f (ai ), the b′j , and all the other elements of B used in P the chain of equalities above, then B ′ is finitely generated and i mi ⊗ f (ai ) = 0 ′ ′ in M ⊗ B ′ as well. Therefore f restricts to an injective homomorphism PA → B of finitely generated R-modules, but M ⊗f sends the nonzero element i mi ⊗ai to 0. • Geometrically, an R-algebra A corresponds to a morphism of schemes Spec(A) → Spec(R). The “fiber” of Spec(A) at a point p ∈ Spec(R) (i.e. a prime ideal p of R) is (Spec of) the tensor product A ⊗R κ(p), where κ(p) is the residue field of the local ring Rp , or equivalently, the fraction field of the domain R/p. Roughly speaking, if A is a flat R-algebra then the fiber “varies continuously” as we vary p. Example 2. For example, let R = k[t] with k an algebraically closed field, and let A = k[t, x]/(x2 − t). Then A is free of rank 2 as an R-module, so A is a flat R-algebra. A prime ideal of k[t] of the form p = (t − a) has κ(p) = k, where the map k[t] → k sends t 7→ a. Computing the fiber of A at this prime, we get A ⊗R κ(p) ∼ = k[t, x]/(x2 − t) ⊗k[t] k ∼ = k[x]/(x2 − a). 3 Now k[x]/(x2 − a) ∼ = k × k if a 6= 0, geometrically two disjoint points, and if a = 0 we get k[x]/(x2 ), geometrically a single point with multiplicity two. As a varies, the two points merge and separate continuously. Example 3. Another example has R = k[t] and A = k[t, x]/(tx − 1). Then A ∼ = Rt is a localization, hence flat. The fiber over a prime (t − a) of R is A ⊗R κ(p) ∼ = k[t, x]/(tx − 1) ⊗k[t] k ∼ = k[x]/(ax − 1), which is isomorphic to k (geometrically, a single point) if a 6= 0, and isomorphic to the zero ring (geometrically, the empty set) if a = 0. Looking at the graph of tx − 1 = 0 in the tx-plane, we see that the fiber over (t − a) shoots off “to infinity” as a → 0. If we projectivized this picture, there’d be a point in the fiber of A over (t) at “infinity.” But generally, it’s not a problem if the fiber is smaller than you expect at some isolated points; it’s a problem if the fiber is larger, as in the next example: Example 4. Let R = k[t] and A = k[t, x]/(tx). This is not flat: because the Rmodule homomorphism R → R given by multiplication by t is injective, but after tensoring with A, we get the homomorphism A → A multiplying by t, which sends x 7→ 0. The fiber over a prime (t − a) is isomorphic to k (a point) if a 6= 0, but is isomorphic to k[x] (a line) if a = 0. This dimension-jumping behavior is not possible for flat families, as we will see in Lecture 10. • More generally, flat modules are always torsion-free: If r ∈ R is a non-zerodivisor and M is flat, then R r· R is injective, so we find that M r· M must be injective too. This is what it means for M to be torsion-free. — Bonus topic not covered in class — • Even more generally, for any ideal I ⊆ R, we get an injection of R-modules I → R, so if M is flat, then I ⊗R M → M is injective. (In other words, I ⊗R M → IM is an isomorphism.) For example, M = Z/2 is not a flat R = Z-module: let I = (2). Then I ⊗R M ∼ = R ⊗R M ∼ = M since I ∼ = R as an R-module, but IM = 0. Quotient rings of R are almost never flat R-algebras; see the homework. • In fact, this ideal-theoretic condition is equivalent to flatness: Lemma 5. Let R be a ring, and M an R-module. Then the following are equivalent: 1. M is flat. 2. I ⊗R M → M is injective for all ideals I ⊆ R. 4 Proof. We’ve shown that 1⇒2; we’ll prove now that 2⇒1. Assume that I ⊗R M → M is injective for all ideals I of R. We will show that for all injections A → B of finitely generated R-modules, the tensor product homomorphism M ⊗ A → M ⊗ B is also injective. Let A ֒→ B be an injection of finitely generated R-modules. Since B is finitely generated, we can find an R-module surjection Rn ։ B for some n ∈ N, so that we can write B ∼ = Rn /K for some submodule K ⊆ Rn . Then A ⊆ B is of the form A∼ = L/K for some L ⊆ Rn . It is enough to show that M ⊗ L → M ⊗ Rn is injective whenever L is a submodule of Rn , because in that case, we can represent the above situation by the diagram 0 K L A 0 0 K Rn B 0 with exact rows, and then tensoring with M gives us (0 )M ⊗ K M ⊗L M ⊗A 0 0 M ⊗K M ⊗ Rn M ⊗B 0 The bottom row is still exact because by assumption M ⊗ · preserves the injectivity of K ֒→ Rn . (The top row then must still be exact since M ⊗ · also preserves the injectivity of the middle vertical arrow L ֒→ Rn , but that fact will not be used.) Then a diagram chase shows that M ⊗ A → M ⊗ B must also be injective: if x ∈ M ⊗ A is sent to 0 ∈ M ⊗ B, then letting y ∈ M ⊗ L map to x ∈ M ⊗ A, we find that y (as an element of M ⊗ Rn ) is sent to 0 in M ⊗ N ; thus y ∈ M ⊗ K. But then y is in the kernel of M ⊗ L → M ⊗ N ′ , so its image x must be 0 after all. Now we will prove that M ⊗ · preserves injections of the form L ֒→ Rn by induction on n. The base case n = 1 is the hypothesis, because then L ⊆ R is an ideal of R. Now let L ֒→ Rn with n arbitrary, and set I = L ∩ R = {r : (r, 0, . . . , 0) ∈ L}. Then I is the kernel of L ⊆ Rn → Rn−1 , so L/I ֒→ Rn−1 . Then we have 0 I L L/I 0 0 R Rn Rn−1 0. Tensoring with M preserves the first and third vertical injections by the base case and the induction hypothesis, respectively, so by another diagram chase it preserves the center injection as well. 5 • As a corollary, we can characterize flat modules over a PID: Corollary 6. Let R be a PID and M an R-module. Then M is flat if and only if M is torsion-free. Proof. M is torsion-free if and only if r· : M → M is injective for every r 6= 0 in R. Another way to put this is to say that the map (r) ⊗R M → M is injective for every r 6= 0 in R. Since 0 ⊗R M → M is always injective, and all the ideals of R are principal, we find that M is torsion free if and only if I ⊗R M → M is injective for every ideal I ⊆ R. This is equivalent to M being flat by the previous lemma. • In particular, if R is a PID and M is a finitely generated flat R-module, then M is free. (This absolutely fails if M is not finitely generated: for example, take M = Q over R = Z!) — End of bonus topic — • There’s a much more general characterization of finitely-generated flat modules in terms of freeness: Theorem 7. Let R be a ring and M a finitely generated R-module. Then M is flat if and only if for every prime ideal p ⊆ R, the localization Mp is free as an Rp -module. • We’ll prove this theorem by first showing that flatness is a local property, and then showing that over a local ring, the finite flat modules are free. Lemma 8. Let R be a ring and M an R-module. Then the following are equivalent: 1. M is flat. 2. Mp is flat as an Rp -module for each prime ideal p ⊆ R. Proof of 1⇒2. This is a special case of the assertion that if M is a flat R-module and A is any R-algebra, then A ⊗R M is a flat A-module. This is easy to check, and is an optional homework exercise. Proof of 2⇒1. Let A ֒→ B be an injective R-module homomorphism, and suppose that Mp is a flat Rp -module for each prime p. Let K be the kernel of M ⊗R A → M ⊗R B; we wish to show that K = 0. We will do so by showing that Kp = 0 for each prime p. Let p be a prime ideal of R. Since the sequences 0 → A → B and 0 → K → M ⊗R A → M ⊗R B are exact, and localization preserves exact sequences, we get 6 exact sequences 0 → Ap → Bp and 0 → Kp → (M ⊗R A)p → (M ⊗R B)p . We may tensor the first sequence with the flat Rp -module Mp to obtain an exact sequence 0 → Mp ⊗Rp Ap → Mp ⊗Rp Bp . On the other hand, we know that (M ⊗R A)p ∼ = Mp ⊗Rp Ap and (M ⊗R B)p ∼ = Mp ⊗Rp Bp from Homework 3, so we find that 0 → Kp → Mp ⊗Rp Ap → Mp ⊗Rp Bp is exact. Therefore Kp is the kernel of an injective homomorphism, and thus is zero. Hence the support of K is empty, and K = 0. • All that remains, then is to prove the following lemma: Lemma 9. Let R be a local ring and M a finitely generated R-module. Then M is flat if and only if M is free. The idea will be start with a basis for M/mM as an R/m-vector space (where m is the maximal ideal of R), and lift it to a basis of M as an R-module. • The first step is Nakayama’s lemma, which removes flatness from Lemma 9 and weakens a basis to a generating set. We’ll prove it in stages using this version of the Cayley-Hamilton theorem: Theorem 10 (Cayley-Hamilton). Let R be a ring, I ⊆ R an ideal, M a finitelygenerated R-module, and ϕ : M → M an R-module homomorphism with ϕ(M ) ⊆ IM . Then ϕ satisfies a monic polynomial with coefficients in I. P Proof. Suppose {m1 , . . . , mn } generates M , and for each i write ϕ(mi ) = nj=1 aij mj n with each aij ∈ I. Then det(ϕ · 1n×n − aij i,j=1 ) acts by 0 on each mi , hence must be the zero endomorphism of M . Expanding the determinant, we obtain a monic polynomial equation satisfied by ϕ: ϕn − b1 ϕn−1 − b2 ϕn−2 − · · · − bn = 0 with each bi ∈ I. Lemma 11 (Nakayama, baby version). Let R be a ring, I an ideal, and M a finitelygenerated R-module with M = IM . Then there exists b ∈ I with (1 − b)M = 0. Proof. Apply the Cayley-Hamilton theorem to the identity map M → M . Then we obtain 1 − b1 − b2 − · · · − b n = 0 as an endomorphism of M , so (1 − b)M = 0 with b = b1 + · · · + bn ∈ I. 7 Lemma 12 (Nakayama, child version). Let R be a ring, I an ideal contained in every maximal ideal of R, and M a finitely-generated R-module with M = IM . Then M = 0. Proof. Let (1 − b)M = 0 with b ∈ I. Since b is in every maximal ideal, (1 − b) is in none, hence is a unit and M = 0. Lemma 13 (Nakayama, teenage version). Let R be a ring, I an ideal contained in every maximal ideal of R, M a finitely-generated R-module, and N ⊆ M a submodule with M = IM + N . Then M = N . Proof. If M = IM + N , then I(M/N ) = M/N . Hence M/N = 0. Lemma 14 (Nakayama, grown-up version). Let R be a ring, I an ideal contained in every maximal ideal of R, M a finitely-generated R-module, and let m1 , . . . , mn ∈ M generate M/IM . Then m1 , . . . , mn generate M . Proof. Let N = Rhm1 , . . . , mn i ⊆ M . If N → M/IM is surjective, then M = IM + N , so M = N . • Generally speaking, for an ideal I to be contained in every maximal ideal is a very strong condition. But if R is a local ring, all it means is that I is a proper ideal. So Nakayama’s lemma is usually invoked in the following way: if M is a finitely generated over a local ring R (with maximal ideal m) and m1 , . . . , mn generate the R/m-vector space M/mM , then m1 , . . . , mn generate M . • All that’s left is to show that if M is flat, then passing to M/mM also reflects linear independence: Lemma 15. Let R be a local ring with maximal ideal m. Let M be a flat Rmodule, and suppose that m1 , . . . , mn are R/m-linearly independent in M/mM . Then m1 , . . . , mn are R-linearly independent in M . Proof (following Matsumura). We use induction on n. The base case n = 0 is trivial: the empty set is always linearly independent. P Now suppose n ≥ 1, and let nj=1P aj mj = 0 in M . Let I be the ideal (a1 , . . . , an ). Then I ⊗ M → M is injective, so nj=1 aj ⊗ mj = 0 in I ⊗ M . Now I is generated by n elements, so it has a surjection Rn → I sending the jth basis element ej to aj . Let the kernel of this surjection be K ⊆ Rn . Then we have an exact sequence (0 )K ⊗ M Rn ⊗ M P : nj=1 ej ⊗ mj 8 I ⊗M 0 0 P P Thus there exists an element i ki ⊗yi ∈PK ⊗M whose image in Rn ⊗M is nj=1 ej ⊗ mj . Writing each ki ∈ K ⊆ Rn as ki = nj=1 bij ej , we find that X bij ej ⊗ yi 7→ i,j X ej ⊗ mj , j P so mj = i bij yi forP each j ∈ {1, . . . , n}. Furthermore, since each ki is in the kernel n of R → I, we have nj=1 bij aj = 0 for each i. P Now m1 67→ 0 in M/mM , so m1 = P / mM and at least one bi1 ∈ / m, i.e. is a i bi1 yi ∈ n unit in R. Thus from the equation j=1 bP ij aj = 0 for this i, we find that a1 is an R-linear combination of the other ai : a1 = nj=2 cj aj for some cj ∈ R. Then we can write the equation a1 m1 + a2 m2 + · · · + an mn = 0 as a2 (m2 + c2 m1 ) + · · · + an (mn + cn m1 ) = 0. Now assuming that the images of the {mj : 1 ≤ j ≤ n} in M/mM are R/m-linearly independent, so are the images of the {mj + cj m1 : 2 ≤ j ≤ n}, since a nontrivial linear relation among the latter would give a nontrivial linear relation among the former. Hence by the induction hypothesis applied to m2 + c2 m1 , . . . , mn + cn m1 , we find that each of a2 , . . . , an must vanish in R. (And so must a1 , being a linear combination of the a2 , . . . , an ). Thus m1 , . . . , mn are linearly independent in M as well. • Putting it all together, let R be a local ring with maximal ideal m and M a finitely generated flat R-module. Then a basis for M/mM as an R/m-vector space lifts to a generating set for M by Nakayama’s lemma (since M is finitely generated), and this generating set for M is R-linearly independent because its images in M/mM are R/m-linearly independent (since M is flat). Thus we have found an R-basis for M , and M is free. 9