Group extension of $\mathbb Z_4$ by $\mathbb Z_2$ Let $f : G →\mathbb Z_2$ be an extension of $\mathbb Z_4$ by $\mathbb Z_2$. Suppose that the induced action $α_f :\mathbb Z_2 →\mathbb Z^{\times}_4$ carries the generator of $\mathbb Z_2$ to $−1$. Then $G$ is isomorphic to either $D_8$ or $Q_8$.

Proof
Let $\mathbb Z_4 = \langle b \rangle$ and $\mathbb Z_2 = \langle a \rangle$. For any $x ∈ G$ with $f(x) = a$, we have $xb^kx^{−1} = α_f (a)(b^k) = b^{−k}$ for all $k$. Also, $f(x^2) = a^2 = e$, so $x^2$ ∈ ker f = b. Thus, $x^2$ = $b^k$ for some k.
Note that x fails to commute with b and $b^{−1}$, so neither of these can equal $x^2$. Thus, either $x^2$ = e or $x^2$ = $b^2$.
If $x^2$ = e, then x has order 2, and hence there is a section of f, specified by s(a)= x. In this case, $G \cong\mathbb  Z_4 \rtimes_{α_f}\mathbb  Z_2$, which, for this value of $α_f$ , is isomorphic to the dihedral group $D_8$.

I'm a bit confused about how they got from $x^2=e$ to $G \cong Z_4 \rtimes_{\alpha_f} Z_2$.
If s(a) = x, then the section $s: Z_2 \rightarrow G$ sends 1 to e and -1 to x, right? So we must have an element of order 2 in G. Additionally, we know that we have a normal subgroup of order 4. However, if we want to construct a semidirect product, we need to make sure that $Z_2$ and $Z_4$ do not have any elements in common, except for the identity, right? But what if $x=b^2$?

The remaining case gives $x^2 = b^2$. But then there is a homomorphism $h : Q_8 → G$
with $h(a) = x$ and $h(b) = b$.

In my notes, it says that any group G is isomorphic to $Q_{2n}$ if the following conditions hold:
$\bullet$ $x^4=e$
$\bullet$ $b^{2n}=e$
$\bullet$ $x^{-1}bx=b^{-1}$
$\bullet$ $x^2 = b^n$
Of course, in this case, all of the first three conditions hold. But what about the 4th one? We know that $x^2 = b^2 \not= b^4$. Then how does that homomorphism exist?

As the image of h contains more than half the elements of G, h must be onto, and hence an isomorphism. (Alternatively, we could use the Five Lemma for Extensions to show that h is an isomorphism.)

I'm not sure if I understand this. The only thing we know about G is that it contains a normal subgroup of order 4, right? So what if we map the group of order 4 in $Q_8$ to the group of order 4 in G? Then we won't ahve mroe than half the elements of G in the image, right?
Also, for the Five Lemma for Extensions... in order to use that theorem, we need an extension for $Q_8$, right? But we're not given any. In other words, we have $\langle b \rangle \rightarrow G \rightarrow \mathbb Z_2$. But For $Q_8$, we have $\langle b' \rangle \rightarrow Q_8 \rightarrow ?$.

$Q_8$, of course, is not a split extension of b by $Z_2$, for two reasons. First, we know that every element of $Q_8$ which is not in b has order 4, and hence it is impossible to define a section from $Q_8/\langle b \rangle$ to Q8. Second, if it were a split extension, then it would be isomorphic to $D_8$, which we know is not so.

Why is it impossible to define a section? Is it not possible to say $s(a)=b^2$. I guess this is related to my previous question.

We have classified the extensions of Z4 by Z2 corresponding to the homomorphism
from $Z_2$ to $Z^{\times}_4$ that takes the generator of $Z_2$ to −1. Since $Z^{\times}_4$ is isomorphic to $Z_2$, there is only one other homomorphism from $Z_2$ to $Z^{\times}_4$ : the trivial homomorphism.

So if we look at all the possibilities of where the generator is being sent, then that would be like classifying all groups of order 8, right?
Thank you in advance
 A: 
But what if $x=b^2$? 

Then $b^x = b^{b^2} = b \neq b^{-1}$. In other words, $x$ and $b$ do not commute, but $b^2$ and $b$ do commute. Equality of $x=b^2$ implies $x$ commutes with $b$, despite our assumption that $x^{-1} b x = b^{-1}$.

In my notes, it says that any group G is isomorphic to $Q_{2n}$ if the following conditions hold:

This should say $Q_{4n}$ not $Q_{2n}$.

I'm not sure if I understand this.

The image of $h$ contains $x$ and $\langle b \rangle$, 5 elements out of 8, so it must contain all 8 by Lagrange's theorem. $x \notin \langle b \rangle$ because $x$ and $b$ do not commute.

…in order to use that theorem, we need an extension for $Q_8$, right?

Yes, we take $1 \to \langle i \rangle \to Q_8 \to C_2 \to 1$ where the surjection takes $\pm j, \pm k$ to the non-identity element of $C_2$ and $\pm1, \pm i$ to the identity of $C_2$. The five lemma probably also requires some homomorphisms from one exact sequence to the other. Map $i\mapsto b$ and $j\mapsto x$. This is basically the same as $h$, but I'm not positive of your notation for $Q_8$.

Why is it impossible to define a section?

$Q_8$ has only one element of order $2$, and that element is central, but the image of $a$ is not central.

So if we look at all the possibilities of where the generator is being sent, then that would be like classifying all groups of order 8, right? 

More or less, yes. A group of order 8 contains a group of order 4 and index 2. If that subgroup is cyclic, then the quoted argument classifies all non-abelian possibilities ($D_8$ and $Q_8$). It indicates one could also handle the abelian possibilities ($C_4 \times C_2$ and $C_8$). However, one also has to deal with the possibility that there is no cyclic subgroup of order 4 (then the group has exponent 2 and is a vector space over $\mathbb{Z}/2\mathbb{Z}$ so we get $E_8 = C_2 \times C_2 \times C_2$).  Be careful that if one tries to classify the extensions of $C_2 \times C_2$ by $C_2$ you'll get some repeats, $D_8$ and $C_4 \times C_2$, as well as the desired $E_8$.
