# Let $G$ be finite and every nonidentity element have prime order. If $Z(G)\neq\{e\}$, prove that every nonidentity element of $G$ has the same order.

This question appears to be new here.

I'm reading "Contemporary Abstract Algebra," by Gallian.

This is Exercise 4.51.$$^\dagger$$

Suppose that $$G$$ is a finite group with the property that every nonidentity element has prime order (e.g., $$D_3$$). If $$Z(G)$$ is not trivial, prove that every nonidentity element of $$G$$ has the same order.

Thoughts:

Lemma: If $$G$$ is abelian with the property that every nonidentity element has prime order, then every nonidentity element has the same prime order.

Proof: If $$G$$ is abelian (i.e., $$G=Z(G)$$), then consider $$g,h\in G$$ such that $$\lvert g\rvert=p$$ and $$\lvert h\rvert=q$$ for distinct primes $$p$$ and $$q$$. We have

\begin{align} (gh)^{pq}&=(g^p)^q(h^q)^p\\ &=e, \end{align}

so that $$\lvert gh\rvert$$ divides $$pq$$.

If $$\lvert gh\rvert=pq$$, then it is composite, a contradiction; thus without loss of generality $$\lvert gh\rvert=p$$. Now we have

\begin{align} e&=(gh)^p\\ &=g^ph^p\\ &=eh^p \\ &=h^p, \end{align}

but now $$q\mid p$$, which is a contradiction since $$p\neq q$$ and $$p$$ is prime.

Thus all nonidentity elements of $$G$$ have the same prime order.$$\square$$

That's all I have so far.

I've considered proving some version of the contrapositive but nothing springs to mind other than, "yeah . . . contrapositive might work" followed by a shrug.

Edit:

This comment gives me some idea of how to finish; however, I'm not sure where the finiteness of $$G$$ comes into play.

$$\dagger$$ I've just noticed that this exercise has a solution in the book. It makes sense to me. If anyone would like to answer it here anyway, go ahead! I might post an answer later summarising the proof in the text.

• How about mimicking the abelian proof with one general element of the group and one nontrivial element of the center? – Mindlack Jan 16 at 11:55
• I see what you mean, @Mindlack! That's a fun little trick! Thank you. – Shaun Jan 16 at 11:57
• But . . . Why is finiteness necessary, then, in the original exercise? @Mindlack. – Shaun Jan 16 at 11:58
• @Shaun They might just be trying to avoid awkward questions like "is infinity prime". – user3482749 Jan 16 at 12:17
• @Shaun They don't. The problem is that it's kind of an awkward edge-case definition thing, and I wouldn't be surprised if someone just ruled out the infinite case to avoid having to think about it. – user3482749 Jan 16 at 12:24

Let $$z\in Z(G)$$ such that $$\lvert z\rvert=p$$ for a prime $$p$$. Consider $$g\in G$$. We have $$\lvert g\rvert=q$$ is prime. Then
\begin{align} (zg)^{pq}&=(z^p)^q(g^q)^p \\ &=e^qe^p \\ &=e \end{align}
and thus $$\lvert zg\rvert\in\{p, q\}$$ (since it has to be prime). Assume without loss of generality that $$\lvert zg\rvert=p$$. Then
\begin{align} e&=(zg)^p \\ &=z^pg^p \\ &=eg^p \\ &=g^p, \end{align}
so $$q\mid p$$. Hence $$p=q$$.