A finite group with exactly $2$ conjugacy classes isomorphic to $\mathbb{Z}_2$

Prove or contradict: A finite group with exactly $$2$$ conjugacy classes always isomorphic to $$\mathbb{Z}_2$$.

At first I was trying to work with familiar groups to contradict it(permutations, cyclic, dihedral and general linear) but I could not find any counter example.

So I was trying to prove it.Let $$G$$ be a group that has exactly $$2$$ conjugacy classes, obviously one of those classes is $$e$$, and the other class is the rest of the elements.

So I'll define $$f:G \rightarrow \mathbb{Z}_2$$ as follows - $$f(e) = 0$$, and $$f(g) = 1$$ for every other $$g \in G$$. It is easy to see that $$f$$ is homomorphism, and also that $$\ker (f) = e$$, and by the first isomorphism theorem, we get that $$G \cong \mathbb{Z}_2$$.

Is it correct?

• I don't think it's at all obvious that $f$ is a homomorphism. Can you expand on that? – Christopher Sep 5 '18 at 16:09
• $Z_2$ is the only finite group with exactly two conjugacy classes, but there are other infinite examples. – Derek Holt Sep 5 '18 at 16:35
• @Christopher Rethinking about it, I guess that it isn't homomorphism. How else can I prove it? – ChikChak Sep 5 '18 at 17:22
• @Derek Holt do you mean there are groups of inifinte order with two conjuacy classes, or that there are inifinte finite such groups? – ChikChak Sep 5 '18 at 17:23
• "Infinite finite group"??? See here – Derek Holt Sep 5 '18 at 17:51

Hint: use the Orbit-Stabiliser Theorem, with $G$ acting on itself by conjugation. (So the orbits are the conjugacy classes of $G$).
• So we got $2$ classes, one is $e$, and the other one is $G \setminus \{e\}$. Since conjugacy classes are subgroups, their order must divide $|G|$, and we get from it that $|G|-1$ divides $|G|$, so $|G|=2$(?) – ChikChak Sep 5 '18 at 17:45
• This assumes that $G$ is finite and, as I said in my previous comment, there are infinite groups with exactly two conjugacy classes. – Derek Holt Sep 5 '18 at 17:50
• @ChikChak: Is a conjugacy class really a subgroup? Is $a$ always conjugate to $a^{-1}$? – Robert Lewis Sep 5 '18 at 18:22
• @Robert Lewis No, not always. So maybe a different approach - $|G|$ should be equal to the sum of the sizes of the orbits( which are the conjugacy classes in our case). We got $2$ classes and therefore $2$ orbits. One orbit of size $1$, so the other must be of size $|G|-1$. And orbits are indeed subgroups, so $|G|=2$. Is it correct now? – ChikChak Sep 5 '18 at 20:09