 So this lecture is part of an online commutative course and will be about flat modules. We just recall the definition. So the definition says that M is flat if not goes to A goes to B being exact. In other words, tensioning with a flat module preserves injectiveness. And we also seen earlier that M is flat is equivalent to the localization MP being flat. Over RP for all primes in the spectrum of the ring R could also take all maximal elements of the spectrum. In particular, we see that stock wise locally free. So we discussed the stock wise locally free modules last lecture, and we see that these are all flat. Because the stalks are free, obviously implies that they're flat. So, since all the stalks are flat module is flat. So, so summarize we've shown that free modules are stably free. And these are locally free. And these are projective and projective ones are stalk wise free and stalk wise free a flat. And out of all these conditions it's probably flatness that's the most useful. This is because first of all it's easy to check that a module is flat because you have just have to check its flat at each prime and we'll see a bit about how to do this. The other major advantages there are huge numbers of examples of flat modules whereas if you're talking about say projective modules or stably free modules they're actually much rarer. And so, not only all these projective and locally free and so on modules are flat but also, and we have some more examples. Any localization are P at a prime or at any multiplicative subset is flat and localizations of a ring in general not projective or free or whatever so this shows why we're interested in flat modules there are plenty of flat modules which don't satisfy any of the stronger conditions. I should also point out that over for schemes. The analog for modules is sheaves. And projective sheaves are pretty rare. At least if you're working with non affine schemes, whereas flat sheaves are common. The rings. Flat modules are somewhat more common than from projecting modules when you start doing algebraic geometry and doing schemes projective scheme. Sheaves are almost nonexistent and flat sheaves become even more important and needless to say free sheaves and Stably free sheaves and so on are also quite rare. So, and we should also give a just remind a few examples of modules that are not flat. So, the standard example of module that's not flat is the, is the module Z over to Z over the ring R is the integer so this is not flat. We've seen earlier several times, and you can also ask our sub modules or quotients of flat modules flat and the answer is they usually not. So, here, we have the exact sequence. And here this, these are flat, and this is not flat. So quotients or flat modules need not be flat in general. So we can also ask our sub modules of flat modules flat. And again the answer is no in general for instance we could take the ideal generated by x and y. And this is an ideal of the polynomial ring in two variables, and the quotient is just K. And here this module is flat because it's free. And this is not flat. It's actually easier to check this is not flat in a few lectures time when we've done the basics of homological algebra so I won't bother proving this is not yet or it's not difficult to check. Here you see this, this module here isn't flat. And you might ask if you've got a flat module mapping on to a flat module is the kernel flat and the answer is yes. In general, if we've got sequence more goes to a goes to be goes to see goes to more which is exact. Then B and C flat implies a is flat. A and C is flat implies B is flat. And a B being flat do not imply C is flat. So you've got to be a little bit careful and again, these two facts here are very easy to prove using homological algebra so I'll postpone the proof of them. One of the key things that makes flat modules, really useful apart from the fact they're rather common is that flat modules over local rings behave really nicely, at least if they're fine presented. So here we have the sort of main theorem suppose. And finally presented module over a local ring. So, then the following are equivalent. First of all, M is free. Secondly, M is projective. And thirdly, M is flat. Thirdly, not goes to A goes to B goes to M goes to not exact implies not goes to a over M goes to be over M is exact. When we've done homological algebra, we will see that this condition here is in fact equivalent to saying that tour of M are over M. Equal zero but as we haven't actually defined the torsion groups yet we're using this sort of ad hoc definition for what tour means. So, so we can also add conditions about being locally free or storewise locally free but you've probably had enough of these. Now, these implications are very easy. This implication will be very easy when we've done homological algebra so we'll postpone it for a bit. So the main problem is to show that that condition for implies condition one. Before going on a better remark that I've said finitely presented here and you may think that means that finitely generators isn't good enough. In fact, finitely generated is enough, but the proof is somewhat more complicated so I'm only going to give the proof for finally presented modules because I don't really care all that much about non notarian rings. So, so let's show that this funny condition here implies that M is free. And what we do is we choose a homomorphism from R to the N to M, which is an isomorphism from R over M to the N to M over M M to the N so so M over the question up by the maximum ideal is a finite dimensional vector space over the field that can be generated. So you can just take an isomorphism from this finitely generated vector space to lift it to homomorphism like that. And we want to show this is an isomorphism, and we will show it is an isomorphism by using a homomorphism as lemma over and over again. First check it's on to let's call this F. So we first check. F is on to. Well now what we do is we put. R to the N goes to M goes to N goes to zero so N is the quotient of M by the image of R to the N. And then, first of all, then is finitely generated because M is. And secondly, you can see that this condition here implies that N is equal to M times N. So that comes from this condition here. And now you know that these two conditions are exactly what you need for Nakayama's lemma. So Nakayama, this implies that N is equal to zero. And so let's look at what we've got so far. So we have R to the N maps on to M and it's got a kernel. And this kernel K is finitely generated. Let's make it injective. And it's finitely generated as M is finitely presented. It's not very difficult to check that if M is finitely presented then any kernel from a free module of finite rank on to M has as finite kernel. So now we tensor with R over M. And this is where we use this funny condition, condition number four says that if we've got an exact sequence and we tensor it mapping on to M and we tensor it with A over M, with R over M, then the result is exact. So this means that nought goes to K over Mk goes to R over M. The M is exact. So this, this is exact because of this condition trawl one R over M, M to zero, that's where we use the condition. So K over Mk is actually equal to nought, because this maps to M over M times M goes to zero. And we know that this is isomorphism. So this is an isomorphism. This is exact means this is equal to zero. So we know K is finitely generated as we said so up there so now we again notice that Nakayama's lemma applies. So this implies that K is equal to zero. And if K is equal to zero this means that R to the N is isomorphic to M. So M is free, which is what we wanted to prove. Let's use this to discuss finitely presented modules over any ring. So here we have I guess this is a corollary. If M is a finitely presented module over any ring R so we're now no longer restricting to local rings then the following are equivalent. And first of all M is projective. I guess we could also have it's stopwise free and could be flat. And I guess I forgot conditions so let's just have locally free up there. So all these conditions are equivalent. And again zero implies one implies two implies three we've sort of done earlier. And three implies three implies two follows from the lemma we've just proved we've seen that stopwise flat, which is the same as flat implies stopwise free because since M is finitely presented and the stalks are flat over local rings it means they're free over local rings so three implies two finitely presented modules and two implies zero when I guess we actually needed two implies one we did earlier. And I've got a feeling I forgot to show that for finitely presented modules projective implies locally free but whatever we don't really make much use of locally free modules. And these modules are particularly important because they sort of are the analog over rings of vector bundles. So so that's enough for the moment about free modules the next lecture be rather what will be about torsion free modules and it'd be rather short because torsion free modules are not really all that important.