 This lecture is part of an online algebraic geometry course about schemes and we'll be covering the operation of gluing schemes together. So, for smooth manifolds, a smooth manifold can be thought of as obtained by gluing together number of copies of open subsets of Rn. So, for example, you can make a sphere by gluing together an open disk covering a bit more than the top half of the sphere and another open disk covering a bit more than the bottom half of the sphere. So, you'd have an open set here and an open set here and you sort of glue them together along this cylinder bit. And schemes are rather similar, they're obtained by gluing copies of open affine schemes. So, we covered affine schemes in previous lecture and an affine scheme is in some sense more or less the same as a commutative ring. So, we'll see some examples of how to do this. So, the example we're going to take is we're going to glue two copies of say the affine line over field K. So, this is the affine scheme with coordinate ring, the ring of polynomials over X. Well, in fact, we don't really need to use the fact this is over a field K, so we can do it over any ring R. So, this is, we're going to glue two copies of the spectrum of R of X, although it will turn out that the case of a field is actually somewhat simpler. And we can take an open subset. So, you can think of the affine line over a field K, if you ignore the generic point, it's just the points of K. And we're going to throw away the origin, so discard the origin. So, this means we're looking at the affine scheme of K X X the minus one. So, if we invert X, that more or less corresponds to discarding the origin. So, what we're going to do is this open subset is contained in the affine line, and we're going to glue together. So, we're going to take this open subset K spectrum of K X X minus one. And this is contained in spectrum of K X, which is the affine line. And it's contained in spectrum of K X, which is the affine line. And we want to sort of glue these two things together. So, the picture is, we have two schemes here. So, I mentioned all that one orange. And we're going to try and form a new scheme by kind of joining them together over that intersection. So, in terms of rings, what we're doing is we're taking K X, mapping it to K X X minus one, taking K X, mapping it to K X X minus one. Well, there are actually two ways, two natural ways of doing this, because we can map X to X, but we could also map X to X, or X to minus one. And similarly, we could change, we can map this X to X to minus one, but that's, if we do two of those, that's just the same as swapping X with X to minus one. So, there are essentially two interesting things we can try doing. So, let's see what happens. So, first of all, let's do the case where we map X to X here. So, the picture we've got is we've got a sort of affine line. And it's got an open subset, the affine line minus the origin. And we've got another affine line, and it's open subset. And we're gluing these two open subsets together by the identity map. And if you try picture doing that, you see what we're getting is one copy of each point, except we sort of get two copies of the origin. So, this is going to be giving us a line with two origins. So, to make it clear, what we're doing is we're taking these maps here. So, we're mapping KX to KX to minus one. We're mapping KX to here by the identity map. The other thing we can do is twiddle by mapping X to X to minus one. So, we may as well call this KX to minus one. So, this time we take KX, KX to minus one and map these both to KX, X to minus one. And what's going on here is now a little bit different because we're taking two copies of the affine line. And we're taking these two open subsets. But now we're identifying these open subsets by changing X to one over X. So, we sort of glue them like this. So, point five might be glued to a fifth and so on. So, what we find is that these two points are no longer near each other. What we're doing is we're getting an affine line together with a point at infinity. So, you can think of this point as sort of being infinity in some sense. And this is the point zero if we identify things like that. So, what we get here is a scheme called the projective line over K. Or the projective line over R if we work with a ring instead of a field K. So, now we want to ask some questions like what are the morphisms of these schemes to some other scheme? And what are the morphisms of some other scheme to these schemes? So, we're just going to do the case of morphisms of affine schemes from these. So, suppose we want to ask what are the morphisms to K of X say? So, this is the coordinate ring of the, this corresponds to the affine line. Now, if you want to look at morphisms of the affine line to itself, what you don't want to do is to look at all ring homomorphisms from KX to KX because this includes several rather strange morphisms where you map K non-trivial to K. So, what you really want are morphisms that commute with the embedding of K into these. In terms of schemes, what this means is you're looking at spec K of X mapping to spectrum of K, mapping to spectrum of K of X. So, we're looking at more, we're interested in morphisms from this scheme to this scheme that commute with the maps to here. What we say is we're working over the spectrum of K. Every scheme we have is provided with a map to the spectrum of K and we only want diagrams that commute with this. This is sort of like working with algebras over a fixed field K. Well, so, if we've got a field K and we're working over spectrum of K and we want to know what are the morphisms of any scheme S over spectrum of K. So, I'm sorry, that spectrum of some ring R to the spectrum of K of X. This just means we're looking at maps from K of X to R that commute with the action of K. And this is just the same as choosing elements of R, which is global sections of the spectrum of R. So, for affine rings, for affine algebras over K, the morphisms to this scheme here just correspond to functions on R. And that's sort of reasonable because you can think of this as being a sort of affine line. So, we're saying functions to an affine line are just regular functions on an affine scheme, which is what we expect. And the same actually holds for any scheme S, that's a scheme over spectrum of K, that morphisms like this are just going to be regular functions on S because they're regular functions on all the open affine subsets of this and these cover S. So, by the scheme property, these morphisms are just the same as regular functions. So, let's work out the regular functions or equivalently morphisms to this scheme here with the two examples we had earlier. So, first, for the line with two origins, so here we're looking at maps to the affine line over K. Well, what we have to look at, we know the scheme is covered by two copies of the affine line. So, we take the coordinate ring of one affine line, which says this one, and we take the coordinate ring of the other affine line. And we've got to take an element of this and an element of this that coincide on their intersections. So, what we're going to do is we're going to take an element of this ring and an element of this ring for the same image in here. And that's obviously just going to be K of X. So, this is the coordinate ring of the line with two origins. Incidentally, this shows the line with two origins can't be an affine scheme because if it was, it would have to be the spectrum of this ring here. And the map from this to K of X would have to be an isomorphism, but it's not an isomorphism because it maps two points here to one point in the spectrum of this. So, if we try and do the same thing for P1 over K, we get a slightly different answer. So, this time we look at K of X, mapping to K of X, X to minus one. And this time, however, we're really looking at the map from K of X to minus one to here. This is, of course, isomorphic to K of X. I'm just writing to K of X to minus one to indicate what this mapping is. So, now we need to take an element here and an element here that are the same image in this ring here. And obviously, the only way to do this is to take an element of K. So, this is the coordinate ring of P1 of K. And again, you see this can't be an affine scheme because it was an affine scheme. It would just have to be the spectrum of K, which is just a point, and this obviously has more than one point. So, this shows that by viewing affine schemes, we can get non-affine schemes. Now, I want to discuss a slightly more tricky question. What are the morphisms to, say, the scheme P1 of K? And let's just take, let's do the simplest case. What are the morphisms? Let's just look at morphisms from the spectrum of K to P1 of K. And these are going to be morphisms over K, over the spectrum of K, as usual, because we don't want to worry about automorphisms of the field K. Now, the spectrum of K is just really just a point. So, morphisms to here should just correspond to points of the projective line over K as for classical varieties. And we can check that this does hold because P1 of K is the union of the affine line over K and the affine line over K, which are glued along. This isn't a district, you're only going to be glued along open subset. So, this is just a point. So, its image must be in one of these two. So, the points of, so morphisms from spectrum of K to P1 of K, which are usually denoted by P1 of K of K, these are the sort of K-valued points of P1 over K, is a union of the affine line with values in K and the affine line with values in K, modulo sum equivalence relation. So, we take K union K and what we have to do is we have to identify A with A to minus one whenever A is not equal to zero. So, we can think of these as just being K union appointed to infinity as we're getting the classical case. So, the morphisms from the spectrum of K to the projective line over K just correspond to the points of the classical projective line. By morphism, we mean morphisms over the spectrum of K. So, this diagram has to commute. Well, now let's look at a slightly more interesting case. What about P1 over R, where R is some ring? Let's take R to be the integers. Let's try and do a reasonably simple case that isn't a field. So, again, what we're doing is we're looking at the spectrum of Z and we're trying to map it to P1 of Z over the spectrum of Z. So, here's an obvious wrong guess. So, P1 of Z is the union of A1 of Z, the affine line over Z. Sorry, union of A1 of Z and A1 of Z. Identified along some subset. So, maybe P1 of Z with values in Z is the union of A1 of Z with values in Z and A1 of Z with values in Z again identified. So, this would just be equal to Z and this would just be equal to Z. And we're identifying A with A to minus one whenever A has an inverse. So, that would say that elements of the projective line over, the integer value points to the projective line over Z or either integers or inverses of integers. And this is just wrong. So, it looks plausible that the scheme is the union of these two open sub-schemes of the values of the scheme with values in Z should be the union and this just works for fields, but it fails for the integers. And the reason why it fails is as follows. So, let's right think of P1 of Z as being these two open, union of two open subsets. And we're looking at maps of another scheme to this. Now, if the other scheme just has one point, then its image must line one of these two open subsets. So, the values would be that. However, if we look at something like spec of Z, which isn't a point, the image of spec of Z might sort of look like this. It might not line either of these two open subsets. So, it might not be in either of these sets. So, how do we find morphisms from spec of Z to P1 of Z? Well, you notice that if we take the inverse images of these two open subsets in spec of Z, we get a cover of spec of Z by two open sets. And we get a map of the first open set into the first A1 of Z and a map of the second open set into the second A1 of Z and we have to glue these together. So, let's sort of see what's going on. Well, we need to know what are open subsets of spec of Z consist of primes and nought and open subsets, either the empty set or you remove a finite number of points. And they're all of the form spec of Z, m to the minus one, where you invert some integer m, which means you kill off all the primes dividing m. If m is zero, this is the zero ring and corresponds to the empty set. So, what's going on is we've sort of got spectrum of Z of X. So, this is the affine line over Z and spectrum of Z of X to minus one. There's another copy of the affine line and we're gluing them together along spec of Z X X to minus one. I'm not going to try and draw these. You remember we actually did draw spectrum of Z of X a few lectures ago and it was really quite complicated. So, we now want an open cover of spec of Z, which is spec of Z m to the minus one and spec of Z n to the minus one and these should also be glued together over the spectrum of Z mn to minus one. So, we've got a picture like this. And now we want the union of these two over this is just spec of Z and the union of all these is just P one over Z. And now we want to define a map from spec of Z to P one of Z, which will take this open set of spec Z to this open set and this open set to this open set and of course it will take that one to that one because that's just the intersection. Well, amorphism from this spectrum to this space here is just a map of rings taking, oops, taking Z of X to Z of m to the minus one which is obviously determined by the image of X. So, it's just going to be something of the form a over m to the k. In other words, you take X to a over m to the k and similarly, this blue morphism here will be a map of the corresponding rings taking X to minus one to b over n to the l for some n and l. And these two morphisms have to be the same on here. So, that shows that a b over m to the k over m to the k n to the l is equal to zero in spectrum of Z mn for minus one. So, we can figure out what the points are from this. First of all, if mn is not equal to zero, then all you're doing is saying that a over m to the k is the inverse of b over n to the l. So, if we put q equals a over m to the k, we can see that q can be pretty much any non-zero rational number. So, this means the points correspond to non-zero rationals. On the other hand, we also have the possibilities where m is equal to zero or n is equal to zero. So, if m equals zero, this sort of corresponds to the point nought and infinity of the projective plane. So, if we put everything together, we find that homomorphisms from spec of Z to p1 of Z correspond to pairs of integers let's say i colon j with i and j co-prime and where these are equivalent if i. So, this is equivalent to lambda i, lambda j for lambda a unit where i over j would just be this integer q here. So, the integer-valued points of the projective line over the integers are slightly more complicated than you might guess, but then you notice that this looks very much like the definition of projective line over a field. So, you remember that for a field, elements of the projective line were pairs of elements of the field that's what we're looking for. So, we're going to ask, is this true for all rings? So, are the maps from the spectrum of r to p1 over p1 of r? These are going to be maps from the spectrum of r given by the p1 over p1 of r. So, we're going to ask, is this true for all rings? So, we're looking at the spectrum of r given by pairs m, n with m, n in the ring and m, n being co-prime up to this equivalence that this is regarded as the same as lambda m, lambda n for lambda a unit. So, this is true for fields and we've checked it's true for the integers. It turns out that it fails for general rings for rather subtle and interesting reason. And easy way to show that it fails is to give an example where it fails. So, what we're going to do is to take r to be the ring z root minus five. And this is a rather famous example that is not a unique factorization domain because two times three is one plus root minus five times one minus root minus five. And this will turn out to be closely related to the fact that this has more points in the projective line than you might expect. So, we're looking at maps from spectrum of r over spectrum of r to p1 of r. So, we want to find some elements of this map here. And you can find maps by covering r by two open sets. So, we notice that two and three are code prime. So, r is, so spectrum of r is covered by the spectrum of r with two inverted and the spectrum of r with three inverted. So, we can now look at the following picture. We take r with two inverted and r with three inverted and they're both embedded in r with six inverted. And now, here we can take the element one plus root five over two and here we can take the element one minus root five over three. And we notice the product, the product of the images of these is just one. So, these are sort of inverses in r with six inverted. So, what we can do is we can define a map of the projective line over r by taking this element in this copy in this open subset of the f1 line and this element in this open subset of the f1 line and gluing them together. But the trouble is this isn't giving you an element of the form m colon n with mn equals one because if you try doing this you're looking at the element one plus root five two. So, this actually represents an element of the projective line over r and the trouble is one plus root five two is not r and it's not even a principal ideal. If it was a principal ideal you could just divide by some common factor and make this equal to r. So, this is an example of the fact this ring r has non-principle ideals. This is closely related to the fact that it's not a unique factorization domain and these non-principle ideals give you sort of unexpected extra elements of the projective line over the reals. What's going on in general is that non-principle ideals are examples of things called invertible modules. Well, in general they're not. For this particular ring, non-principle ideals happen to be invertible modules. Invertible modules over rings kind of correspond to line bundles over schemes and classifying points of a projective line over the spectrum of a ring or even a more general scheme turns out to involve classifying invertible modules. The earlier cases we had for fields and the integers the only invertible module is isomorphic to the field or the integer so we don't get this complication and the projective line is what you expect it to be but for more general rings and schemes the classification of points over a projective line or projective space is more complicated as you need to use line bundles since we haven't covered these yet we will just postpone that till later. So the next lecture we will be generalising the construction of the one-dimensional projective line over a ring to n-dimensional projective space over a ring.