[Math] If every element has prime power order and $Z(G) \neq 1$ then $G$ is a $p$-group.

abstract-algebrafinite-groupsgroup-theoryp-groups

In a finite group $G$ if every element is of some prime power order (prime may vary with element) and if $G$ has non trivial center then prove that $G$ is actually of prime power order.
Deduce that any group G of order pq (where p and q are distinct primes) with non trivial center is cyclic.

Best Answer

Hint. If an element $x$ of order $p$ exists in $Z(G)$, it commutes with any other element $y$ of order $q$ in $G$. What's that say about the order of $xy$?