TITLE: In a group $G$ where $\exists!$ nontrivial, proper subgroup, show that $G$ is cyclic and $\lvert G\rvert=p^2$, for $p$ prime.
QUESTION [5 upvotes]: Suppose that $G$ is a group that has exactly one nontrivial proper subgroup. Then we have to show that $G$ is cyclic and order of $G$ is $p^2$ where $p$ is prime.

I tried as, if $a$ and $b$ two element of $G$ of order $p$ and $q$ then $\langle a \rangle$ and $\langle b \rangle$ are two proper subgroups – a contradiction. Thus every element of $G$ have order some power of $p$. After this I am stuck. Thanks for help.

REPLY [4 votes]: The idea is to first show that $G$ is cyclic and then use this fact to deduce that $|G|=p^2$ where $p$ is prime.
To show that $G$ is cyclic let $G$ be a group with exactly one non trivial subgroup. Then $G$ contains at least two (different) non trivial elements $a,b \in G $. Certainly, $\langle a \rangle $ is a non trivial subgroup of $G$. If $\langle a \rangle = G$ we're done since $G$ is cyclic. 
Otherwise note that we must have $\langle a \rangle = \langle b \rangle$ since there is only one non trivial subgroup. Let $c$ be any element in $G \setminus \langle a \rangle $. Then $\langle c \rangle = G$ since we cannot have $\langle c \rangle = \langle a \rangle$. Hence $G$ is cyclic.
A cyclic group has a subgroup for every divisor of the order of the group. Hence we can only have one divisor of $|G|$, that is, $|G| = p^2$ or $|G| = p$ but the latter is not possible since there is one proper subgroup.