TITLE: Proof that if group $G/Z(G)$ is cyclic, then $G$ is commutative
QUESTION [6 upvotes]: I am looking for a correct proof of this statement: If $G$ is a group such that $G/Z(G)$ is cyclic, then $G$ is commutative.
Proof: $G/Z(G)$ is isomorphic to $\operatorname{Inn}(G)$ and is cyclic, and then for every $a$ and $b$ in $G$ the inner isomorphisms $\gamma_a$ and $\gamma_b$ satisfy $\gamma_a \gamma_b = \gamma_{ab} = \gamma_{ba} = \gamma_b \gamma_a$, and therefore for every $a,b \in G$, $ab = ba$.
Is that proof complete, or am I missing something? Thanks a lot for the help.

REPLY [3 votes]: A problem with your attempt is that you seem to want to use only the fact that the inner automorphism group is abelian, but this does not suffice.  There are nonabelian groups $G$ such that $G/Z(G)$ is abelian, like the group of symmetries of the square.  Thus, it does not follow from $\gamma_{ab}=\gamma_{ba}$ that $ab=ba$.
So you need to use the hypothesis that $G/Z(G)$ has a single generator.  Robin Chapman pointed out to you here what you can conclude from this, so I might as well quote him: 

Each element of $G$ has the form $a^nz$ where $a$ is fixed and $z\in Z(G)$...