 So this lecture is part of an online mathematics course on group theory, and will mostly be about automorphisms of cyclic groups. So in previous lectures, we've classified the groups of order up to about 12, so we will continue. So order 13 is not very interesting because 13 is prime, so the only group we get is z over 13z. Order 14 is of the form 2 times a prime, so the only groups we get are the cyclic group of order 14 and the dihedral group of order 14. So the next interesting case is order 15, which is 3 times 5. And we've obviously got the cyclic group of order 15, and the question is, are there any others? Well, what we're going to do is look at order groups of order p, q, where p and q are primes. We've already done the case when p is equal to q, so we may as well assume p is less than q. And we notice that by the Silov theorems, or for that matter by Koshy's theorem, g has subgroups of orders p and q. So that helps us to get a start on the group. And the number of subgroups of order q is 1 mod q and divides pq, which is the order of g. Well, if it divides pq and is 1 mod q, it must divide p. And as q is less than p, the only possibility is 1. So there's only one subgroup of order q. So the subgroup of order q is normal. So g has a subgroup of order q that's normal, and a subgroup of order p. And it's fairly easy to see from this that g is a semi-direct product of the normal subgroup of order q by the subgroup of order p. I haven't got my p and q the right way round. It's easy to get them muddled up. And a semi-direct product of two groups is determined by the groups and how this group acts on that group. So we can ask, how can z over pz act on z over qz? And if we can figure this out, we will be able to find all groups of order p times q. Well, that action of c over pz on the group z over qz is just a homomorphism from this group to the group of automorphisms of this group. So we can ask, what are the automorphisms of z modulo qz? So this is a cyclic group. More generally, we can ask, what are the automorphisms of z modulo nz for any positive integer n, where n isn't necessarily prime? Well, this is quite easy to work out because all we have to do, the automorphisms, well, the homomorphisms are given by mapping 1 to any element g in z modulo nz. Because if we pick any element g, then there's a homomorphism mapping 1 to it and mapping any element n to n times g. These homomorphisms are automorphisms if g has an inverse. This just means g is invertible in z modulo nz times, where this is the multiplicative group of elements co-prime to n, which is just the units in the ring z modulo nz. In fact, the homomorphisms of an abelian group to itself always form a ring where the multiplication is composition and addition is addition of homomorphisms. And the ring happens to be z modulo nz. So we want the units in this ring. And let's start off by looking at the first few cases just to see what's going on. So let's take n equals 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, and just work out what the group z modulo nz star is. Well, here it just does one element 1. It's not terribly interesting. Mod 2, again, only has one element 1. Mod 3, there are two elements 1 and 2. And we now see it's cyclic with this as a generator. Remember, this group is written multiplicatively, not additively. 4, it is two elements. And again, there's a generator 3. 3 has ordered 2. 5, there are four elements. And this time, there are two generators because we can either take 2 or 3 as generators. The element 4 has ordered 2, so it's not a generator. For 6, there are only two elements. And again, we find 5 as a generator. 7, we get elements 1, 2, 3, 4, 5, 6. Now we want to find a generator. Let's try 2. Well, 2 squared is 4, and 2 cubed is 8, which is 1. So 2 isn't a generator. It only has ordered 3. But 3 is a generator because you take 3. 3 squared is 9, which is 2. 3 cubed gives us 6. 3 to the power of 4 gives us 4. 3 to the power of 5 gives us 5. And so all these elements of powers are 3. So 3 is a generation. In fact, 5 is also a generator. So we've figured out what the structure of this group is. Here it's C modulo 1z, Z modulo 2z, Z modulo 2z, Z modulo 4z, Z modulo 2z, Z modulo 6z. So it seems as if this group is always cyclic. Let's try this for 8, 1, 3, 5, 7. And now this group is not cyclic because any of these elements square to 1 modulo 8. So this group is not cyclic. So that rather ruins our nice hypothesis. 9 is again cyclic. So its elements are these six elements that are co-prime to 9. And you can check for yourself that it's cyclic. 10, the numbers co-prime to 10 are 1, 3, 7, 9. And again, this is now cyclic. So here are two generators. And 11, we get 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. And this is cyclic, although it's getting to be a little bit tedious to check this. In fact, the element 2 is a generator. This group is order 10. So any element is order 1, 2, 5, or 7. And you can easily check the element 2. Doesn't have ordered 2 or 5, so it must have ordered 10. There are also some other generators, which I'm feeling too lazy to write out. 12, we get 1, 5, 7, and 11. And this is not cyclic. All these elements have ordered 2. So the structure of this group seems to be a little bit complicated. Sometimes it's cyclic, and sometimes it's not cyclic. And we're now going to investigate when it's cyclic. And the main result that we want to do to discuss today is that if n is prime, then z over nz star is cyclic. And it is order n minus 1. When n is composite, we've seen that sometimes it's cyclic, and sometimes it isn't. And the exact case is when this arises will be. We'll see at the end of the lecture. And when n is prime, let's write it as p. So I remember it's prime. And we're looking at the ring, z modulo pz. Well, this is a field. That means it's a ring under addition and multiplication mod p. And every non-zero element has an inverse, as you recall from some undergraduate algebra course, or maybe not. Well, in a field, any polynomial of degree p, such as x to the p equals 1, has at most p roots. So z over nz star has at most n elements with x to the n equals 1. And now we're going to point out that z over pz star has at most phi of n elements of order exactly n. So what's this number here? Well, this is Euler's phi function, which is just the order of z over nz star. So it's the number of integers less than n, which are co-prime to n. So if we go back to the previous sheet, I can write down the values of phi of n. It's just the number of elements in this group here. So it looks like 1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4. So you see it jumps around quite a bit, but it's not very difficult to work out. So we found a group that has at most phi n elements of order n. Now we want to use another property of phi of n, which says that sum over all numbers d divides n of phi of d is equal to n. So this means sum over d dividing. And let's illustrate this by looking at the case n equals 12. So let's write out the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. So these are the elements of z modulo 12z. And what I want to do is to figure out what is the order of each element. So this is going to be the order of each element. So this element is order 1. And the element of order 2, there's only 6, because 2 times 6 is 0. Elements of order 3 are 4 and 8. Elements of order 4 are 3 and 9. There are no elements of order 5. Elements of order 6 are 2 and 10. And elements of order 12 are 1, 5, 7, and 11. So there I've written the order of each element here. And now you see the number of elements of order 2 is 5 of 2. And the number of elements of order 3 is 5 of 3. The number of elements of order 4 is 5 of 4. Number of elements of order 6 is 5 of 6. And the number of elements of order 12 is 5 of 12. And I guess there's 5 1 element of order 1. And the reason for this is, well, let's look at the case of elements of order 4. So the elements of order 4 are 3 and 9. And if you look at 0, 3, 6, and 9, these are the elements of the ring z modulo 4z times all multiplied by 3. And you can see the elements of order 4 in z modulo 12z are just the elements of order 1. So the elements of order 4 in z modulo 4z all multiplied by 3. So we're just taking 0, 1, 2, and 3 and multiplying these by 3. And z modulo 4z has 5 of 4 elements of order 4. So z modulo 12z also has 5 of 4 elements of order 4. So we see that 5 of 1 plus 5 of 2 plus 5 of 3 plus 5 of 4 plus 5 of 6 plus 5 of 12 is equal to 12. Because this is just the number of elements in the group z modulo 12z. And we've got one element of order 1, that number of elements of order 2, that number of order 3, 4, 6, and 12, and so on. So this formula for n equals 12 just follows by counting the number of elements of various orders. And now exactly the same argument works for any number other than 12. So we've sort of proved this by writing out the case n equals 12, and then hoping you can see that it works for all other n. This was an old style of proof that you will sometimes see used in Euclid's elements. Euclid would write out the first two or three cases of something and just assume that everyone could see it applied in general. So let's get back to our group. We know that g, so that g, which is going to be a group z modulo nz star, is abelian and has at most phi of n elements of order n for any n little n dividing bigger than n. Now we want to show that g is cyclic. Sorry, that's not n. That should be a p because we're doing the case of n prime. We want to show that any element that is in any abelian group that has at most phi of n elements of order n must be cyclic. Well, g has for all n dividing the order of g, g has at most phi of n elements of order exactly n. And we know that sum over n divides g of phi of n is equal to g. Well, this implies that g has exactly phi of n elements of order n. Because if it had less than phi of n elements of order n for sum of n, then the total number of elements of g would have to be less than the order of g, which is a contradiction. So g has some elements of order equal to the order of g. In fact, it has phi of g of them. So g is cyclic. So if p is a prime, we can find some number whose powers are all the non-zero integers, modulo p. So a generator of this cyclic group is sometimes called a primitive root for historical reasons and number theory that I must admit I'm not too well up on. Anyway, let's get back to our original problem of classifying groups of order p times q. So we saw that g is a cyclic group of order p sorry, I've got my p's and q's modeled up. Cyclic group of order q, semi-direct product with a cyclic group of order p. And we wanted to find out always that z modulo p could act on z modulo qz. So the group of automorphisms is z modulo qz star. And we've seen this as cyclic. So it's isomorphic to a cyclic group of order q minus one. So we want to find maps from z modulo pz to z modulo q minus one z star. So how many homomorphisms are there from this group, which is cyclic of order p to this group, which is cyclic of order q minus one. So there are no homomorphisms other than zero unless p divides q minus one because the order of any elements in this group must actually divide q minus one. If p does divide q minus one, we get some homomorphisms but they're all sort of equivalent under automorphisms of z modulo pz star because we're just picking an element of order p in here and all the elements of order p in this group are equivalent under automorphisms of this group because all the elements of order p in this group are equivalent. So we get a non-trivial semi-direct product z modulo qz semi-direct product z modulo pz and this is unique optoisomorphism. So to summarize groups of order pq with p less than q, we get exactly one if p does not divide q minus one and exactly two if p divides q minus one. So in the case of order 15, we see that three does not divide five minus one so groups of order 15 is always cyclic. Notice that in the case p equals two, we're looking at groups of order two q and two divides q minus one if q is odd so we get exactly one group of order two q other than the cyclic one and this is of course the dihedral group. I'll just finish by discussing the structure of the group z modulo nz star if n is not prime. Here I'm not going to prove everything. I'm just going to sort of state the main points and give the key steps of the proof. First of all, if n is equal to p1, the a1, p2 to the a2 and so on then z over nz star is isomorphic to z over p1 to the a1 star times z over p1 to the a2z star and so on. So we may as well assume that n is a prime power because we can, the general case is just a product of these groups and then what we find is z over p to the nz star is cyclic of order v of p to the n which is p to the n minus one times p minus one unless p equals two when z over p to the nz star is isomorphic to z over 2z times z over 2 to the n minus 2z sorry, it's isomorphic to this. So it's not quite cyclic. It's a cyclic group times a group of order two and this group of order two is the group generation by plus or minus one and we can take this to be the powers of the element of five. In the case of p to the n this is isomorphic to a group z over p to the n minus one z times z over p minus one z. So in this case it is cyclic and this group here can be taken as generated by the element p plus one and this illustrates the fact that the prime p equals two generally causes more trouble than all the other primes put together. Things always go wrong for the prime p equals two. So let me try and explain give a rough idea of the reason why things go wrong for the prime two. What you want to do is to show that the number one plus p has order p to the n minus one in z over p to the nz star. So let's see is this true and what you do is you want to show that one plus p to the p to the n minus two is not one in z over p to the nz star. And if you can show that then it's not too difficult to show that it has order p to the n minus one and from that it's not difficult to show that this group here is cyclic. I'm going to omit the details of this. I'm just showing the point at which the proof fails for p equals two and what you do is you expand one plus p power p to the n minus two by the binomial theorem. So it's one plus p to the n minus two times p plus p to the n minus two two p squared plus p to the n minus two choose three p cubed and so on. And now this bit here is p to the n minus one and this bit here is usually divisible by p to the n and this bit here is divisible by p to the n and so on. So this is one plus something divisible by p to the n plus something not divisible by p to the n. So this is not congruent to one mod p to the n and so this element does not have order p to the n minus two so you can show it as order p to the n minus one. Well, there's something that goes wrong here. I put usually divisible by p to the n. And the reason it's usually divisible by p to the n is this binomial coefficient is p to the n minus two times p to the n minus two minus one all divided by two times p squared. Here we've got a p squared and a p to the n minus two so that gives us p to the n unless p equals two. So there's this denominator in the binomial coefficient which messes everything up. So the reason why z modulo p to the n z star is not cyclic for p equals two is the result of this apparently trivial technical problem that goes wrong when you work out this power here and try and show it's not congruent to one mod p. Something goes wrong with this binomial coefficient. So let's just finish off with an example. Suppose I want to work out the structure of the group z modulo a million z star. So what's the structure of this group? Well, it splits as z over two to the six z star times z over five to the six z star by the Chinese remainder theorem. And we've worked out the structure of these groups. This is isomorphic to a group of order two generated by plus or minus one times a group of order two to the four and this is a cyclic group of order five to the five times five minus one. So we get times z over five to the five z times z over two squared z. So here is this group written as a product of cyclic groups or to isomorphism and it's fairly obvious how to do other numbers. So next lecture we will be discussing the structure of finite abelian groups.