Find all the homomorphisms from $D_8 \to \mathbb{C}^\times$ 
Find all of the homomorphisms from $D_8$ to $\mathbb{C}^\times$.

So far I have:
$\phi : D_8 \rightarrow \mathbb{C}^\times$
$\phi(a)^4 = 1$ so $\phi(a) = \pm 1, \pm i$
$\phi(b)^2$ = 1 so $\phi(b) = \pm 1$
and $\phi(ab)^2 = 1$ so $\phi(ab) = \pm 1$
but $\phi(ab) = \phi(a)\phi(b)$ (as it is a homomorphism) 
and $\phi(a)\phi(b) \in \{1, -1, i, -i\}$
So does this mean that I have it wrong? And how do I actually write my answer?
 A: Here we realize $D_8$ in terms of its usual generators and relations:
$$D_8 = \langle a, b : a^4 = b^2 = (ab)^2 = 1 \rangle .$$
Note that by using the relations, we can write any element of $D_8$ as $a^l b^m$.
The conditions $\phi(a)^4 = 1$ and $\phi(b)^2 = 1$, which imply $\phi(a) = i^r$ for some $r$ and $\phi(b) = (-1)^s$ for some $s$ are consequences of the fact that the usual generators $a, b$ of $D_8$ respectively have orders $4$ and $2$. Since (1) a group homomorphism $\phi$ is characterized by its action on a set of generators, and (2) any homomorphism $\phi : D_8 \to \Bbb C^{\times}$ is given by $$\phi(a^l b^m) = \phi(a)^l \phi(b)^m = i^{rl} (-1)^{sm},$$ but not all such maps need be well-defined! To check which are, we must check which satisfy the remaining relation, that is, which satisfy $\phi((ab)^2) = \phi(e) = 1$. Expanding gives $$1 = \phi(abab) = \phi(a) \phi(b) \phi(a) \phi(b) = \phi(a)^2 \phi(b)^2 = \phi(a)^2,$$ so in fact, $\phi(a) = (-1)^t$ for some $t$.
Remark The second-to-last equality in the last display equation above uses that $\Bbb C$ is abelian; for the same reason, any homomorphism $G \to H$ into an abelian group $H$ must contain the commutator subgroup in its kernel. Indeed, the last display equation can be written as $1 = \phi(a^2)$, and the commutator subgroup of $D_8$ is $[D_8, D_8] = \langle e, a^2 \rangle \cong \Bbb Z_2$, so we could have used this fact earlier to deduce this tighter restriction on $\phi(a)$. We can conclude from this that all homomorphisms $G \to H$ into an abelian group $H$ are lifts of homomorphisms $G / [G, G] \to H$; in this case, $D_8 / [D_8, D_8] \cong \Bbb Z_2 \times \Bbb Z_2$.
A: You're almost there.
As you have noticed, you need to satisfy all relations that define $D_8$:


*

*$\phi(a)^4 = 1$ so $\phi(a) = \pm 1, \pm i$

*$\phi(b)^2$ = 1 so $\phi(b) = \pm 1$

*$\phi(ab)^2 = 1$ so $\phi(a)\phi(b)=\phi(ab) = \pm 1$
These imply that $\phi(a) \ne \pm i$ and so $\phi(a) = \pm 1$.
That's all. There are thus $4$ homomorphisms: $a,b \mapsto \pm 1$ independently.
