Centralizer of a equal to generator of for a nonabelian group $G$ order $pq$ 
Let $p$ and $q$ be odd primes such that $p < q$. $G$ is nonabelian group of order $pq$.
Prove if $a \in G$ and isn't the identity, then $\langle a \rangle = C(a)$.

So I was able to prove $\langle a \rangle$ is contained in $C(a)$ but I'm stuck on proving $C(a)$ is in $\langle a \rangle$
What I started with is $C(a)$ is a subgroup of G so it has order $p$ or $q$ since it has prime order it is cyclic so there exists some $b$ in $C(a)$ such that
$\langle b \rangle = C(a)$
and I know $a$ is in $C(a)$. How would I go about proving $a = b$?
 A: The order of $a$ divides $pq$, since $G$ is not commutative, the order of $a$ is $p$ or $q$. Suppose it is $p$ Let $x\in C(a)$, the subgroup $H$ generated by $x$ and $a$ has an order which divides $pq$, it cannot be $pq$ since $G$ is not commutative thus it is $p$ and $x$ is an element of the subgroup generated by $a$, same proof if the order of $a$ is $q$
A: How do you know that $C(a)$ is cyclic? It's entirely possible that, even though the group isn't abelian, it has $\langle a \rangle$ as its center (this happens in occasionally in dihedral groups, for example, which sometimes have centers of size $2$). (Note also that further in your reasoning, you wouldn't need to show that $a = b$, only that $\langle a \rangle = \langle b \rangle$)
But if you do happen to know, somehow, that $C(a)$ has size either $p$ or $q$, you can conclude that $\langle a \rangle = C(a)$ rather quickly. It of course contains $\langle a \rangle$, and since neither $p$ nor $q$ divides the other, it couldn't be the case that $C(a)$ contains more than $\langle a \rangle$.

Assuming you don't have a good reason to believe that $C(a) \neq G$ initially, all you can say is that $\lvert C(a) \rvert \in \{p, q, pq\}$. 


*

*If the size is $p$, then $a$ must have order $p$, by Cauchy (since $q \not\mid p$). You correctly observe that $\langle a \rangle  \le C(a)$, from which it follows that $\langle a \rangle = C(a)$. 

*The above reasoning works equally well when $C(a)$ has size $q$. Here $a$ has order $q$, but the main conclusion is the same (given that $p \not\mid q$).

*Finally, we must show that $C(a)$ can't have size $pq$. Suppose, for contradiction, that $C(a)$ does indeed have size $pq$. Then the center $Z(G)$ of $G$ must be $\langle a \rangle$. The quotient $G / Z(G)$ has size $p$ or $q$, and hence must be cyclic. But it is a well-known theorem that $G/Z(G)$ is only cyclic when $Z(G) = G$, contradicting the assumption that $G$ is not abelian.
This theorem is still true when one of the primes is $2$.
