Consider a non-trivial element $x$ of a group $G$, and let $Z(x)$ be the centralizer of $x$. Suppose that $|Z(x)|=pq$, where $p$ and $q$ are prime. Show that $Z(x)$ is abelian.
The centralizer of an element $x \in G$ is defined as $Z(x)=${$g\in G | gx=xg$}.
My idea is to do a proof by contradiction. Suppose that $Z(x)$ is not abelian. Then, there exists some $a,b \in Z(x)$ such that $ab\neq ba$. Since $a \in Z(x)$, $axa^{-1}=x$ by definition, and similarly, $bxb^{-1}=x$. Hence, $axa^{-1}=bxb^{-1}$. Some algebraic manipulation yields that $x(a^{-1}b)=(a^{-1}b)x$.
I don't seem to be getting to a point where I would need to use the fact that $|Z(x)|=pq$, so I'm assuming that I am on the wrong track. I also have the counting formula, which says that $|G|=|Z(x)||C(x)|$, where $C(x)$ is the conjugacy class of $x$, which could possibly be useful. A push in the right direction would be appreciated.
If $p=q$, then $|Z(x)|=p^2$, and any group of order $p^2$ (where $p$ is prime) is abelian.
Next, suppose $p\ne q$.
Note that $x\in Z(x)$.
Since $x$ is non-trivial, we have $|x| > 1$.
If $|x| = pq$, then $Z(x) = \langle x \rangle$, so $Z(x)$ is abelian.
Then suppose $|x|= p\;$or$\;|x|=q$.
Without loss of generality, suppose $|x| = p$.
Then $Z(x)$ must contain an element $y$ of order $q$.
Since $y$ commutes with $x$, it follows that $xy$ has order $pq$.
But $xy\in Z(x)$, so $Z(x)$ is cyclic, hence abelian.