If every proper subgroup of a nonabelian group is abelian, why must the group be generated by two elements?

In my group theory class our teacher gave us this statement but I don't understand exactly why it's true.

Let $$G$$ be a non-abelian group such that every proper subgroup of $$G$$ is abelian, we can find $$a$$, $$b\in G$$ that satisfy: $$G=\langle a,b \rangle$$

• I always find it odd when a question is interesting enough to admit a +14 answer, but not interesting enough to get many votes itself. – user1729 Oct 10 at 14:17
• @user1729 I agree. I think the question was on the hot question list, which might explain the upvotes. – Ethan Bolker Oct 15 at 2:52

1 Answer

Since $$G$$ is nonabelian you can find two elements $$a$$ and $$b$$ that don't commute. They generate some subgroup that's not abelian. If all the proper subgroups are abelian then that one must be the whole group.