Prove that if $G/Z(G)$ is cyclic then $G$ is abelian, where $Z(G)$ denotes the center (Zentrum) of the group $G$.
Comment:
I know this has been proven many times here and i'll post some related questions below.
My try:
We want to show that if $G/Z(G)=\langle\eta\rangle,\space \eta\in G$ is cyclic, then it follows that $G$ is abelian, i.e for every $x,y \in G$, $xy=yx$.
Let's take $a,b \in G$, both have left cosets in $G/Z(G)$, namely $aZ(G), bZ(G)$, but since $G/Z(G)$ is cyclic, there must $\exists \space i,j \in \mathbb{N} $ so that $(aZ(G))^i=e$ and $(bZ(G))^j=e$ . Further we have: $$(aZ)^i(bZ)^j=a^i b^j Z=e,$$ $$(bZ)^j(aZ)^i=b^ja^iZ=e$$ $$\text{and}$$ $$a^i b^jZ=b^j a^iZ.$$ For each element $z\in Z$ there exists an inverse $z^{-1}$, so that $zz^{-1}=e$. And we can multiply $a^i b^jZ=b^j a^iZ$, by the inverse of $z$ for each $z\in Z$ respectively, to get $a^ib^j=b^j a^i$, now if we choose $x,y$ so that: $a^i=x, b^j =y$ then we have: $xy=yx$ and we have proven that $G$ is abelian.
Question:
Is my logic here ok? I'm a bit concerned since I didn't use the fact that we have $Z(G)$ the center of the group, i.e. that elements in $Z(G)$ commute with every other element in $G$.
Alternatively: Since $G/Z(G)$ is cyclic this implies that it's also abelian and we would have for two different left cosets of elements $g_1,g_2 \in G$:
$$(g_1 Z)(g_2 Z)=g_1 g_2 Z$$
$$\text{and}$$
$$(g_2 Z)(g_1 Z)=g_2 g_1 Z.$$
Then since $G/Z(G)$ is abelian:
$$(g_1 Z)(g_2 Z)=(g_2 Z)(g_1 Z) \rightarrow g_1 g_2 Z = g_2 g_1 Z,$$
by the same argument as above we now multiply by the inverse $z^{-1}$ for every element $z \in Z$ respectively to get: $g_1 g_2 =g_2 g_1$, for $\forall g_1, g_2 \in G$.
Question:
Again I never used the fact that elements in $Z(G)$ commute with every other element of the group.
Related questions:
Proving that if $G/Z(G)$ is cyclic, then $G$ is abelian
Proving that if $G/Z(G)$ is cyclic, then $G$ is abelian
Proof that if group $G/Z(G)$ is cyclic, then $G$ is commutative