24 RICHARD BORCHERDS

9. Lecture 9 Flatness and

Recall that M ⊗R N represents bilinear maps from M × N, so it is the modle generated by m ⊗ n with the relation s that these are bilinear in m, n. We have the basic adjointness relation

(9.1) HomR(A ⊗R B,C) = HomR(A, HomR(B,C)) As a consequence we get the following exactness relations: If (9.2) 0 → A → B → C is exact, so is

(9.3) 0 → HomR(M,A) → HomR(M,B) → HomR(M,C) If (9.4) A → B → C → 0 is exact so is

(9.5) M ⊗R A → M ⊗R B → M ⊗R C → 0 and

(9.6) 0 → HomR(C,M) → HomR(B,M) → HomR(A, M) (Note change in order of A, B, C). All of these follow from the general fact from category theory that right adjoints preserve limits, while left adjoints preserve colimits. Taking a tensor product with M is left adjoint to Hom(M, ∗). For example, to show

(9.7) M ⊗R A → M ⊗R B → M ⊗R C → 0 is exact it is enough to show that

(9.8) 0 → HomR(M ⊗R C,X) → HomR(M ⊗R B,X) → HomR(M ⊗R A, X) is always exact, (as this just says that the homs from M ⊗ C are the same as homs from M ⊗ B vanishing on M ⊗ A, which is the defining property of the quotient). By adjointness this is equivalent to (9.9) 0 → HomR(M, HomR(C,X)) → HomR(M, HomR(B,X)) → HomR(M, HomR(A, X)) being exact. This in turn follows from exactness of

(9.10) 0 → HomR(C,X) → HomR(B,X) → HomR(A, X) which in turn follows from exactness of (9.11) A → B → C → 0 Examples: (9.12) 0 → Z → Z → Z/2Z → 0 is exact. However (9.13) 0 → (Z/2Z) ⊗ Z → (Z/2Z) ⊗ Z → (Z/2Z) ⊗ Z/2Z → 0

(9.14) 0 → Hom(Z/2Z, Z) → Hom(Z/2Z, Z) → Hom(Z/2Z, Z/2Z) → 0 MATH 250B: COMMUTATIVE 25

(9.15) 0 → Hom(Z/2Z, Z/2Z) → Hom(Z, Z/2Z) → Hom(Z, Z/2Z) → 0 are not exact. This is the cause of homological algebra. We can use this result to calculate tensor products, by writing a as a quotient of free modules and using the fact that a tensor product with a is obvious. Tensor products of finitely generated modules with something can often be worked out in a similar way. For modules that are not finitely generated this method can be cumbersome, and the following methods using localization and di- rect limits are sometimes easier. Tensor products commute with direct limits: A⊗lim→ Ni = lim→ A⊗Ni (where the index i runs over the positive integers, or more generally a directed set). (Define direct limits.) We skip the (easy) proof (the idea is that a bilinear maps from A×limNi are the same as direct limits of bilinear maps from A⊗Ni. Alternatively use the fact that tensor products commute with all colimits, such as direct limits.) However one has to be a bit careful. Foe example we can write Z[1/2] as a of Ni = Z with all maps from Ni to Ni+1 being multiplication by 2. Then all the modules Ni ⊗ Z/2Z are Z/2Z. However the direct limit is NOT Z/2Z: in fact it is zero. The point is that even though the amps from Ni to Ni+1 are injective, the corresponding maps from Z/2Z ⊗ Ni to Z/2Z ⊗ Ni+1 are NOT injective and the direct limit is NOT a union.

−1 − Lemma 9.1. M[S ] = M ⊗R R[S 1].

Proof. We have inverse maps taking m/s to m ⊗ 1/s and m ⊗ (r/s) to (mr)/s.  Example: Q ⊗ Q = Q, Q ⊗ Z/nZ = 0, Q/Z ⊗ Q/Z = 0. A major application of tensor products is to construct products of ”affine schemes”. More precisely if A and B are over a R then A ⊗R B is a ring (put (a⊗b)(c⊗d) = ac⊗bd and check this is well defined and gives an algebra structure). Its spectrum is a sort of fiber product of Spec A and SP ecB over Spec R. FOr example k[x]⊗k k[y] = k[x, y]. Note that the topology on A⊗R B is NOT in general the product topology! Definition 9.2. A module is called flat if tensoring with it preserves exactness. This rather unintuitive concept was introduced by Serre, and Grothendieck showed that it is fundamental in . It is far from obvious why it is so important: in fact people had been studying for almost a century without noticing it! Very roughly, a module is flat if the fibers of its sheaf over Spec R vary ”nicely” without jumping suddenly in structure, so flatness tends to appear whenever one is studying families of modules or rings or schemes. Corollary 9.3. R[S−1] is a flat R-module. Proof. This follows from the previous lemma and the fact that localization is exact. In particular if M is a submodule of N then MS−1 is a submodule of NS−1, as follows from the condition for something to be 0 in a localization.  Notice that R/I is NOT in general a flat R-module, and quotienting by I does NOT in general preserve exactness for modules. (M ⊗ R/I = M/MI, so tensoring with R/I is the same as quotienting by I.) This makes localization easier to handle than taking quotients. 26 RICHARD BORCHERDS

If a is not a zero divisor in R then multiplication by a on a flat module is injective. In particular any flat module over an is -free. The converse is true over principal domains: any torsion free module is flat. (In general it is enough to check flatness for injections of ideals, but for PIDs any injection of an ideal looks like multiplication by some element a.) For example, flat module over the integers are just the same as torsion-free abelian groups. For more general rings, flatness is a much more useful notion than being torsion free. Here is an example to show how flat modules behave well. Suppose S is an R-algebra. There is a ”change or rings” functor from R modules to S modules taking M to S ⊗R M. How does this behave on morphisms? There is a natural map

(9.16) S ⊗R HomR(M,N) → HomS(S ⊗R M,S ⊗R N) Is this an isomorphism? Sometimes, but not always. It is an isomorphism whenever S is flat and M is finitely presented. Proof: • It is always an isomorphism when M = R. (Easy check) • It is an isomorphism when M = Rn for some finite n. • Take an (9.17) Rm → Rn → M → 0 (using the fact that M is finitely presented) Now compare the exact se- quence n m (9.18) 0 → S ⊗R HomR(M,N) → S ⊗R HomR(R ,N) → S ⊗R HomR(R ,N) (using the fact that S is flat) with the exact sequence (9.19) n m 0 → HomS(S⊗RM,S⊗RN) → HomS(S⊗RR ,S⊗RN) → HomS(S⊗RR ,S⊗RN) The last two terms of both sequences are isomorphic by the previous ob- servation. So by the 5-lemma the first nonzero terms in both sequences are isomorphic. The geometric significance of this is that we can calculate Hom(M,N) locally, at least if M is finitely presented. In other words at each point p of spec R we can calculate HomR(M,N)P as HomRP (MP ,NP ), using the fact that RP is flat.

Example 9.4. Take R = Z, S = Z/2Z, M = Z/2Z, N = Z. Then HomR(M,N) = 0 but HomS(S ⊗R M,S ⊗R N is nonzero. This shows that the previous result can fail if S is not flat.

Example 9.5. Take R = Q, S = Q[x] (flat over R), M is the of a countable number of copies of R = Q, N = Q. Then again the previous result fails, Q Q because S ⊗ n∈Z R is not the same as n∈Z S.

Lemma 9.6. M = 0 if and only if Mm = 0 for all maximal ideals m.

Proof. If Mm = 0 then for all x ∈ M, Ann(x) is not in m. So Ann(x) = R so x = 0.  Lemma 9.7. A sequence is exact if and only if it is exact when localized at all prime ideals. (In other words exactness is a local property.) Proof. One implication follws from the fact that localizations are exact. For the other direction, use (Ker(B → C)/Im(A → B))m = (Ker(Bm → Cm)/Im(Am → Bm)) (by flatness). The result now follows from the previous lemma. MATH 250B: COMMUTATIVE ALGEBRA 27



Corollary 9.8. Flatness is local: a module M is flat if Mm is flat over Rm for all maximal (or all prime) ideals m.

Proof. Suppose Mm is always flat over Rm. If A ⊆ B then Am ⊆ Bm, so Am ⊗Rm

Mm ⊆ Bm ⊗Rm Mm, so (M ⊗R A)m ⊆ (M ⊗R B)m for all m, so M ⊗ A ⊆ M ⊗R B, so M is flat over R.