Show that if $\vert G\vert = pq$, then either $G$ is abelian or $Z(G) = \{ e\}$. The center of a group $G$ is defined as $Z(G):=\{ z\in G : gz = zg, \; \forall g \in G\}$.
The goal is to show that if $\vert G\vert = pq$, where $p$ and $q$ are not necessarily distinct primes then either $G$ is abelian or $Z(G) = \{ e\}$.
I want to suppose that $Z(G) \neq \{ e\}$ and then use the fact that $G/Z(G)$ is cyclic to imply that $G$ is abelian, which is something I have already proven. But how do I show that $G/Z(G)$ is cyclic when I am not certain what exactly $Z(G)$ looks like. I only know that it has at least one non-identity element in it, which will be of order $p$ WLOG, (the case where it is of order $pq$ is trivial).
Any help is appreciated. Thank you.
 A: Hint: assume $Z(G) \neq \{1\}$. Then look at $|G:Z(G)| \in \{1,p,q\}$
A: You already suppose that $Z(G)\neq 1$. Then the order of the quotient group $G/Z(G)$ is one of 1,p,q. 
You can follow this question to see that all group of prime order is cyclic. So, the group $G/Z(G)$ is a cyclic group. 
A: This argument admittedly doesn't use the result $G/Z(G) \space\text{cyclic}\Rightarrow G\space\text{abelian}$.
If $q=p$, it is well known that $G$ of order $p^2$ is abelian. Next, let's take $p,q$ distinct primes. By contradiction, let's assume $|Z(G)|=q$; therefore, the noncentral elements $g\in G$ have centralizer of order $q$, whence $\frac{|G|}{|C_G(g)|}=\frac{pq}{q}=p$ for every noncentral $g\in G$, and finally (take the noncentral part of the Class Equation) $q(p-1)=kp$, where $k$ is the number of noncentral conjugacy classes of $G$: contradiction, since $p\nmid q(p-1)$. Thus, $|Z(G)|\ne q$. The same argument works by swapping $p$ and $q$, whence  $|Z(G)|\ne p$ as well. Therefore, either $|Z(G)|=pq$ and $G$ is abelian, or $Z(G)=\{e\}$.
