 This lecture is part of an online course on commutative algebra and will be about the operation of localization of a ring. So what this means is we're given a ring R and a subset S. And what we want to do is construct a new ring denoted by R S to minus one. So all elements of S have inverses. So let's start by looking at some examples. Let's just take to be the ring of integers. And let's take S to be the non zero integers. So what we do is we take the integers and we force all non zero integers to have inverses and it's obvious what we get. R S to minus one is just the rationals Q. Or what we can do is we could take R to be Z and let's take S to be the number two. So we're just going to invert the number two and then R S to minus one is all rationales of the form a over two to the N. So we're allowed twos in the denominator, no other primes. Or what we could do is we could take R to be Z and we could take S to be all other primes three, five, seven and so on. And then R S to the minus one is equal to all numbers the form a over B with B odd. And again, A and B rational numbers. And you can kind of draw a picture of the spectra of these rings. So if we draw the spectrum of Z like this, so here's the point zero. And on it there are these close points two, three, five and so on. Then what are the spectrums of these rings? Well, the spectrum of the rationals is just this generic point here. The spectrum of the ring where we take all rationals of the form a over two to the N is just everything except the prime two. You see we've sort of killed off the prime two by allowing two to be invertible. And finally, if we take this ring here. We've killed off all odd primes but we've kept the prime two so the spectrum sort of looks like this. Now, we can think of localization as being restriction to a subset of the spectrum. So you see this localization kind of corresponds to taking the subset of the spectrum of all points other than two. And this localization kind of corresponds to taking the subset just consisting of two and the generic prime zero. So if we were really interested in the prime two and wanted to focus on its problems, we would use this ring here. So we sort of look close to the prime two. And if we were really fed up with two, we would use this ring here. In other words, we just throw two away from the spectrum. So you can also think of this as being restriction to places where an element of the ring is none zero. So the element two of the ring kind of vanishes at this point. So we're focusing on the points where it doesn't vanish in some sense. And this might be a bit more obvious with the next example where I'm going to take the ring to be polynomials over the complex numbers. And here again, I can take r equals c of x and take s to be all non zero elements. And then r s to the minus one is just the field of rational functions, usually denoted by C with round brackets. So it's just all polynomials px over q of x with q not equal to zero. Alternatively, I can take r to be polynomials and take s to be just the element x set with one element x and then r s to the minus one is just the ring of all Laurent polynomials. So we're allowed sort of a minus nx to the minus n plus say more plus a mx to the m. So we're allowed polynomials where we're allowed negative powers of x. So this is all things of the form p of x over x to the something. Or I could take r to be C of x again. And this time I'm going to take s to be the set of all things of the form x minus alpha for alpha not equal zero. So here I inverted x minus alpha for alpha equals zero and here I'm going to convert all the others. So r s to the minus one is then the set of all things p of x over q of x that are defined at x equals zero because we're not allowed to take q of x to be x times something because that's not in this set but we can take it to be x minus any non zero element and then this is defined at x equals zero. And if we try and draw the spectrum of this, then we get a generic point and we get lots of points, not one minus one and so on. So these correspond to the ideal x, x minus one, x plus one and so on. And now the spectrum of this one is, we've sort of thrown out the origin of the complex numbers. So spectrum sort of looks like this bit and this bit. The spectrum of the purple one, we are kind of throwing out all complex numbers from the complex line except near the origins of the spectrum kind of looks like this. And of course the spectrum of the ring of rational functions is, we only keep the generic point and throw out all the points on the generic point. So you can see the reason for named localization. So in this purple example, where we're inverting x minus alpha for all non zero alpha, we're sort of focusing on the origin of the complex line. So we're sort of localizing means we're just looking locally near zero to see what happens. So you notice that this example with R equals the polynomials over complex numbers and the example with R being the integers are actually very, very similar. The black, red and purple ways of localizing kind of almost the same. So you can think of inverting two in the integers as being very similar to taking the ring of Laurent polynomials over a polynomial ring and so on. And the similarities part because both of them are principal ideal domains. So how do we construct the inverse R s the minus one. Well, this is very easy. We just take our we add new variables t one t two t three and so on one for each element of s and quotient out by the ideal generated by s one t one minus one s two t two minus one and so on. So this forces t one to be the inverse of s one and so on. So, we can also see from this that this has the following universal properties suppose we've got any homomorphism are from our to a ring t and suppose the images of the s are invertible in T. We've also got a map from R to R s minus one rather obviously, and there is always a unique map from the localization to T, making this diagram commute and that's kind of obvious because it's just going to map T to the inverse of s in, T i to the inverse of s and T, so T i maps to s i to minus one and so on. It's a very easy exercise to check that this is a sort of universal ring where all the elements are s local are invertible in the following in the sense that there's a unique map to any ring T with those properties. However, there's a bit of a problem with this. It's sort of unclear how big this is because we first of all made it really huge by adding polynomials and a possibly infinite number of variables and then we've quotient it out by this huge ideal. And in doing this we kind of lose track about we sort of lose control over this ring here it's not quite clear how big it is. For example we have a map from R to R s to minus one, and we can ask what is the kernel. Are there any elements of R that map to zero in here? Well, there might be for instance if R s equals zero for s in s, this implies that R is equal to zero in R s to minus one. So anything killed by an element of s has image zero in this. Is there anything else in the kernel? Well, yes, we might have R s1 s2 equals zero. And again if s1 and s2 are in s then R has to be zero and similarly if R multiplied by any product of elements of s is zero then R has to be zero in this. And you can ask is there anything else in the kernel that we haven't managed to think of maybe there's some clever way of showing that some element of R is in the kernel. And the answer is no, but we have to prove this. So in order to simplify we will assume that s is a multiplicative subset. So this means one is in s and s1 s2 in s implies their product is in s. And this is harmless. Given s, just take all finite products of elements of s. And of course one. And this will be a multiplicative subset. And if the elements of s are invertible in a ring then all the elements of this bigger multiplicative subset will be invertible. So we get the same answer by localizing. So this is a mostly harmless assumption. So this makes little difference in practice. Well, if it makes little difference why are we doing it? Well, it simplifies notation. We could perfectly well do this without assuming s is multiplicative, but it would just make notation a bit more tiresome and all the themes would be a little bit messier to state. So let's assume s is multiplicative and s has no zero divisors. And now we're going to construct the ring r s minus one. And this is very easy. All we do is copy usual construction of the rationals from the integers, more or less. So in other words, we take all pairs s with r in r and s in s. And it's very difficult remembering what this ordered pair means. So we're going to write this as r slash s. And at the moment we're thinking of this as an ordered pair, although it will of course later turn out to be the quotient of r by the element s. Well, that's no good because you remember with rational numbers, a rational number, rational numbers have to probably that two over one is equal to four over two and so on. So we need to put an equivalence relation on these pairs. So we define an equivalence relation r one over s one is defined to be the same as r two over s two. It's not only if r one s two equals r two s one, just as for the rationals. And now we define addition, subtraction, multiplication, zero and one in the obvious way. For instance, we define zero should be zero over one. It means the equivalence class of zero over one, of course, but it's really ties and writing equivalence classes so we don't usually bother. We define multiplication by r one over s one times r two over s two is defined to be r one r two over s one s two. r one over s one plus r two over s two is defined in the obvious way, the r one s two plus r two s one over s one s two. Notice that here, we're using the fact that s is multiplicative. Then instead of having pairs r s, we'd have to have pairs r and a finite sequence of elements of s, which would be a little bit just make the notation more tiresome. We also have to define a homomorphism from r to r s to minus one. And it's always how we do that. We just map r to r over one. Here we're using the fact that the multiplicative sunset contains one otherwise again notation would be become rather more tedious. And now we should check various conditions. We should check that this is an equivalence relation. Secondly, we should check that the operations are well defined. This means, for example, that if r one over s one is equivalent to r two over s two, then this implies that r one over s one plus r three over s three is equivalent to r two over s two plus r three over s three. And finally, we should check ring axioms. And I'm not going to bother to do most of this because most of these checks are easy and they're very boring to watch someone else do them. However, there is one of them I am going to do because there is one subtle point. The subtle point is to check that the equivalence relation is transitive. This is the only one of these numerous checks we have to do that isn't in fact completely trivial. So let's just work through it and see what the subtle point is. Well, we're given that suppose r one over s one is equivalent to r two over s two and r two over s two is equivalent to r three over s three. We want to show this implies r one over s one is equivalent to r three over s three. So let's figure out what this means well this just says r one s two is equal to r two s one. This is our two s three is equal to our three s two. And this is our one s three equals our three s one. So let's try and prove that more from these two. We find that r one s two s three is equal to r two s one s three, which is equal to r three s two s one. I hope I've got all these subscripts right. Which just says that s two times r one s three minus r three s one is equal to zero. And now comes the subtle bit. So this condition implies this if s two is not a zero divisor. And this is the points in the proof at which we use the fact that the set s doesn't contain any zero divisors. If s does contain zero divisors, then this equivalence relation need not actually be an equivalent relation. It need not be transitive and the entire construction of the localization breaks down. So, well now we can see that the map from r to r s the minus one is injective. And this is kind of obvious because our maps are over one and r over one is only equivalent to zero if if r equals zero. Here I could emphasize that this uses the fact that s is no zero divisors. And we will see that this map actually can be is not injective in general. We also see that all elements of r over s are of the form. Sorry, four elements of r s minus one of the form r over s and r over s equals zero. If and only if r is equal to zero. We've got a very nice description of exactly what this ring is. We know what the elements are and we know when the elements are zero. So let's have a couple of examples of this. So first of all, we can just take r to be an integral domain. S is the non zero elements. And then r s minus one is just the field of quotients. So this operation of localization is really just a generalization of the construction of the quotient field of an integral domain. Next we can take r to be any ring s to be the non zero divisors. And we notice that this is multiplicative and then r s the minus one is called the total quotient ring. And again, the map from r to r s the minus one is injective. And in some sense, this is the biggest ring of quotients we can form from r for which r is still a sub ring. For example, if r is equal to z times z, we can see the total quotient ring. R s the minus one is the product of two copies of the rational numbers. Well, that does the case when s has no zero divisors. Now let's look at the case when s has zero divisors or s may have zero divisors. Well, now we're just going to put i to be the ideal of r in r with r s equals naught for some s in the multiplicative set. Well, we better check that this is actually an ideal. Well, it's obviously closed under multiplication by r, but we better just check it's closed under addition. Suppose r one s one equals zero and r two s two equals zero. So r one r two in the ideal i. Well then r one plus r two is killed by s one s two. So r one plus r two is an i. And you notice we're again using the fact that the set s is multiplicative at this point. And now we see the image of s in r over i has no zero divisors. So we can form r over i and then just invert by the image of s. I'm going to denote the image of s by s minus one, which is slightly sloppy because the map from s to this ring here need not be injective. And we're going to define the ring r s minus one to be equal to this ring here. So we're just quotient by things killed by s and then we invert the image of s. And we can check that this has the universal properties of r s minus one, which I won't bother doing because it's straightforward. And now the key point is we can work out the kernel. The kernel of the map from r to r s minus one is i, which is just the set of r such that r s equals naught for some s in s. So the point is we now we still have control over this ring. The elements of r s to minus one are all of the form r s to minus one just as before and r s to minus one is equal to zero if and only if r times s one equals naught for some s one in s. So we know exactly what the elements are and we know exactly when they are zero. So we see that r one over s one equals r two over s two, if and only if s times r one s two minus r two s one equals naught for some s in s. If you want you can use this as a definition of an equivalence relation on the pairs are s and define the ring directly without first defining this idea I. And the trouble is if you use this as an equivalence relation it's really rather tiresome and checking everything works and furthermore this equivalence relation is kind of none obvious looks rather artificial. So I think it's best to construct the quotient by in two steps by first doing the case when s is no zero divisors. So just have a couple of examples. So the first example. Let's take r to be the ring of polynomials and two variables modulo the ring x y and let's take s to be x or rather it's multiplicative closure. See, in the ring are s to minus one. We actually kill off the element why because why times x is equal to zero so this ring here is just isomorphic to see x x the minus one. Another very important example, which we will be using a lot later is let's take p to be a prime ideal. Let's take s to be the complement of s and we notice that s is multiplicative because if a and b are not in p and a b is not in p. We can form r s minus one and this is often denoted by r p and because it turns up so often so this is called the localization of r at the prime p. So what we're going to do next lecture is study the relation between r and the localization and particularly we'll study the relation between the spectrum of the ring r and the spectrum of its localization.