Show that for any there are exactly 4 distinct homomorphisms from into . Prove that the resulting semidirect products are nonisomorphic groups of order . (These four groups, with the cyclic group and the generalized quaternion group, are all the groups of order which have a cyclic subgroup of index 2.)

We begin with two lemmas.

Lemma 1: Let be an integer. Suppose and are integers such that, for all integers and , mod . Then mod 2. Proof: Note that mod . Suppose mod 2. Let . Then we have mod , a contradiction when is odd. Thus mod . Now choosing odd, we have mod ; thus mod 2.

Lemma 2: Let be an integer. Suppose and are integers such that, for all integers and , mod . Then mod and mod 2. Proof: Note that mod . Suppose mod 2. Let . Then we have mod . Since is odd, we have mod for all , which is absurd. Thus mod 2. Now let be odd; we have mod ; again since is odd we have mod , so that mod .

We found that there are 4 distinct homomorphisms in two lemmas to the previous exercise. Moreover, writing and , these are given as follows. , , , and .

Let . We will now show that these are distinct.

Note that is trivial, so that is abelian. However, the remaining groups are not abelian, so is distinct from the remaining three.

Note that . By this previous exercise, .

Now is generated by and , and we have . Thus this group has the presentation . Similarly, has the presentation .

We now compute the centers of and .

Every element of can be written as where and , and there are such expressions. Since we know by other means that , every element of can be written in this form uniquely. Let and let . Then is equal to . Comparing exponents and using Lemma 1, we have mod 2. Thus . Now note that and , so that ; thus .

Performing the same analysis on reveals that .

Thus is distinct from and .

We know that has elements of order 2. Suppose has order 2; then . If , then , so that . If , then mod , so that mod 2. There are such numbers between 0 and . Thus has elements of order 2, and .