 So this lecture is part of an online commutative algebra course, and we will be having a review of tensor products of modules over a ring. So the tensor product of two modules over a ring R is to note it like this. So here, this is the ring and M and N are modules, and this tensor product will also be a module over R. And this bit here is sometimes omitted if I'm feeling lazy or forgetful, as long as it's obvious what R is. And first of all, we have to define it, and then we will show how to calculate it. And then in later lectures, we will discuss the relation between tensor products and localization. So first of all, let's define it. So M tensor R N is universal module for bilinear maps from M times N. So what on earth does this mean? What it means is that we're given a bilinear map from M times N to M tensor over R N. So bilinear means if you hold something in N fixed, it's linear in M, and if you hold something in M fixed, it's linear in N. So the image of M N under this bilinear map is denoted by M tensor N. So first of all, we've got a bilinear map. And secondly, it's universal. This means if we've got any other bilinear map from M to module A, so suppose we're given a bilinear map here, then there's a unique map from M tensor N to A, which is linear map, which is linear, making this diagram commute. So I just emphasize here that this map here is bilinear, this map here is bilinear, but this map here is just linear. So what is happening is that bilinear maps from M times N to A are the same as linear maps from M tensor N to A. So the tensor product is a kind of way of linearizing bilinear maps. So now we have two problems about M tensor over R N. First of all, is it unique and does it exist? So we've sort of defined it to be something with this property and for that to be a definition, we need to show that there exists an essentially unique element with this property. And actually it's not unique, but it's almost unique. So as we'll see in a moment, it's good enough. So let's first discuss uniqueness. So suppose we've got bilinear map, two modules M and N, and suppose we've got two tensor products. So one of them I'll denote by M tensor R N and let's denote the other one by a sort of square sign. And what I want to do is to show that these are essentially the same, but well by definition, these maps are bilinear. And now we want to show these are isomorphic. Well, first of all, this tensor product is universal for bilinear maps, which means there's a unique map from this one to this one, making the diagram commute. But then this is also universal. So there's a unique map from this to anything with a bilinear map from N times N. So there's a unique map going the other way, making the diagram commute. Now the composition of these two maps is a map from M tensor N to itself, making the sort of trivial diagram commute. So it must be the identity. So these maps must be inverses of each other. So these two are not only isomorphic, but there's a sort of canonical isomorphism between them. So any two tensor products are canonically isomorphic. And this is pretty much as good as uniqueness. So if you can show that any two objects with some property are canonically isomorphic, then that means it's essentially unique. You know, sometimes in mathematics we get things where any two objects are isomorphic, but not canonically isomorphic. For example, you know any field has an algebraic closure and any two algebraic closures are isomorphic, but they're not actually canonically isomorphic. If you've got two algebraic closures, then maybe lots of different isomorphism between them. And there's no clear way in which there's a best possible isomorphism. So, and this actually causes some problems for algebraically closed fields. You can't quite talk about the algebraic closure of a field because the isomorphism between any two isn't canonical. Anyway, we don't have this problem for tensor products that they're as close to being unique as you can get without actually being unique. So we just treat them as being unique. Now what about existence of a tensor product? Well, the existence is sort of trivial where you can just force existence as follows. So what we need a map from M times N to M tensor N and we're going to let M tensor N be the free module, so the free group generated, let's say free abelian group generated by these elements M tensor N. And then we're going to quotient out by a whole bunch of relations. So we make R M tensor N minus R M tensor N, so that's not for being, this should be the free R module. And then we quotient out by R M tensor N minus M tensor R N. And then we quotient out by M one plus M two tensor N minus M one tensor N minus M two tensor N. And we also quotient out by M tensor N one plus N two minus M tensor N one minus M tensor N two. So what's going on here? First of all, this relation up here says, is just giving the image of M tensor N. So there is a homomorphism from M tensor N. Sorry, so there is a map from the set M times N to M tensor N. Now the point of these relations is they sort of make the map bilinear. So if the map here is bilinear, these relations have to be satisfied. And conversely, if you quotient out by all these relations then this map becomes bilinear. So this is in some sense a universal way of constructing a bilinear map from M times N to something. And it's kind of more or less trivial to check that this has the universal property. If we've got any map from M times N, any bilinear map from M times N to X, then we can extend, we can define a map from this set to it. So if this map is F, then we define the map just by mapping M tensor N to F of MN. And using these relations, you can show this does actually give a linear map from this space here to X. So existence is kind of almost trivial. The trouble is this construction is completely useless in practice except for proving existence. The trouble is what we've taken is this huge R module generated by vast numbers of elements. And we've quotient it out by another huge set of elements. So we've got some huge thing quotient it out by another huge thing. And we have no idea what the results might be. So we need to provide a good way of calculating it. Well, first of all, before going on, I should add in a sort of warning. This is a tensor product for commutative rings for non commutative rings. The tensor product is more subtle. And I'll just mention what the problem is. First of all, we define M tensor over RAN for M a right R module and N a left R module. And the relation we put in is MR tensor N is equal to M tensor RN. And the problem is this is only an Abellion group not an R module. The problem is, I mean, how are you going to define the R module structure on it? You can't multiply by M on the left by R because M doesn't have a left R module structure. And if you multiply by M on the right by R to give it its R module structure, it kind of gets messed up with this operation here. You can make M tensor over RN into an R module provided if M is a two-sided R module and N is a left R module, then M tensor over RN becomes a left R module. Because now you can use the left R module structure on M to define the action of R on this. In fact, tensor products for non-commutative rings are really tensor products should really be done as tensor products of bimodules. So if M tensor over RN is an R bimodule, so sorry, if M and N are bimodules, so is M tensor over RN. And that's because you can use the left R module structure on M to make this into a left R module and the right R module structure on N similarly. And you can use the right R module structure on M and the left R module structure on N to define the tensor product. So for non-commutative rings, things really get rather more confusing. For commutative rings, any left module is automatically a bimodule in a canonical way, which is why for commutative rings, we can get away with defining tensor products of modules. Anyway, we won't be using tensor products of non-commutative rings, at least not very much. Now we're gonna work out some examples. We're going to do tensor products of modules over vector spaces and over Z because these are the easiest cases to see what's going on. Well, as I said, we can't really use the construction we had before because it's too much of a mess. So what we do is we first we'll write down some obvious properties of the tensor product and then use these to calculate it. First of all, M1 plus M2 tensor N is naturally isomorph to M1 tensor N plus M2 tensor N. And this follows because bilinear maps from M1 plus M2 times N are the same as pairs consisting of bilinear map M1 times N to something and a map from M2 times N to something. And if you unravel this, you find this means the tensor product is sort of additive. And of course, the same applies for taking sums of if N is a sum of two things, which I'm not going to write out because it's obvious. Secondly, R tensor over R of M is isomorphic to M. And again, this is because bilinear maps from R times M to X are the same as linear maps from M to X. And now for vector spaces, we can figure out tensor products. So we have K to the M tensor with K to the N is there for isomorphic to K to the MN because this tensor product is just going to be the sum of MN copies of K tensor over K. Which we've seen as just isomorphic to K. By the way, do not confuse the tensor product, V tensor over W with V times W here, V W of vector spaces. So this is the tensor product and this is the ordinary product. And there is a relation between them. First of all, there is a natural map V times W to V tensor W. However, you should remember this map is not linear. It's only bilinear. So if V has a basis, V one up to V M and W has a basis, W one up to W N, then V times W has a basis, V one up to V M, W one up to W N. Whereas V tensor with W has a basis of the elements V I, tensor W J. So here there are M times N basis elements and here there are M plus N basis elements. Now let's work out tensor products of finitely generated abelian groups. So any finitely generated abelian group is a direct sum of copies of Z and Z over NZ. So since the tensor product behaves very nicely with respect to direct sums, all we need to work out is the tensor product of Z with Z, the tensor product of Z with Z over NZ and the tensor product of Z over NZ with Z over NZ. And two of these are trivial. So this is just Z and this is just Z over NZ because tensioning with our ring doesn't make any difference. So I've got to think a little bit about this one though. Well, first of all, this is generated by one tensor one. This is because if M is generated by elements MI and N by elements NJ, then M tens with N is generated by elements MI tens NJ as you can easily check. So it's generated by one element. So it's going to be some sort of cyclic group. And let's try and work out what cyclic group it is. Well, first of all, we notice that M of one tensor one is equal to M of one tensor one, which is equal to zero because M times one is zero in Z over NZ. Similarly, N of one tensor one is equal to zero because you can do the same trick on the right-hand side. So the tensor product, so MN of one tensor one is equal to zero where this is the greatest common nominate of M and N. So the tensor product Z over MZ is equal to zero tens of Z over NZ is at most Z over MNZ. And we can see it's actually equal to this because there is a bilinear map from Z over MZ times Z over NZ onto Z over MNZ, which just takes A, B to A, B. And this must factor through the tensor product by the universal property of the tensor product. So there must be a map from this map onto that map. And as the tensor product is at most equal to this in size, we see this must be an isomorphism. So Z over MZ tens of Z over NZ is more or less Z over MNZ. And let's look at some special cases of it. We see in particular, Z over MZ tens of Z over NZ is equal to naught if M and N are co-prime. So Z over two Z tens of three over three Z is just zero and not Z over six Z as you might guess. So we can see that Z over MZ tens of Z over NZ some other examples, let's just take Z over 24 Z tens with say Z over 20 Z is just going to be Z over four Z and so on. So it's very easy working out tensor products of a bilion groups. More generally for rings, you can see that R modulo i tens with R modulo j is isomorphic R modulo the ideal generated by i and j here, i and j are ideals of R. And more generally still R over i tens of R with any module M is just isomorphic M over IM. So both of these are fairly easy to check in the same way that we did it for a bilion groups. So finally, I want to discuss the relation between tensor products and exactness. So suppose nought goes to A goes to B goes to C goes to nought is exact and these are all R modules. Now let's tense it with M. We can ask is nought goes to A tens of M goes to B tens of M goes to C tens of M goes to nought exact. And if this was so, it'd be very, very convenient because we could then study the tensor product of B by studying the tensor products with A of A and C with M. And the answer is yes, if R is a field. Because if R is a field, then B is just isomorphic to A plus C and we know that tensor products preserves sort of commutes with addition of modules. However, it's the answer is no if R is Z. And we can see this for the following example. Let's look at the sequence nought goes to Z goes to Z goes to Z modulo two Z goes to nought where this is multiplication by two. And what this is, this is, this is the universal counter example to everything. So if you've got any statement about tensor products or modules or whatever else, try it out on this example first before getting too excited about it because this is a counter example about half the things people incorrectly believe about modules. So let's work out what the tensor products are. Let's just take the tensor product with Z modulo two Z and see what happens. We'll get nought goes to Z modulo two Z because the tensor product of Z modulo two Z with Z is just that. This goes to Z modulo two Z goes to Z modulo two Z goes to nought and this map is okay. It's just the identity map. And this map is multiplication by two which is just the zero map. So this map here is not injective and we should cross out this nought here because it's no longer exact. Okay, this fact that when you take an exact sequence and tension with the module you need not get something that's exact there's a really major problem in commutative algebra. In fact, there is an entire subject called homological algebra devoted solely to dealing with the problem that taking tensor products doesn't preserve exactness. Okay, so next lecture we're going to discuss the relation between exactness and tensor products in a bit more detail. And in particular, we'll see that tensor products taking tensor products preserves at least this bit of exactness but not the bit at the left.