Let $G$ be a group of order $4$. Prove that $G$ is cyclic or one has $g^2 = e$ $\forall g \in G$ I know that if $G$ is of order $4$ then $4$ is the smallest positive integer such that $g^4 = e$. Also, the cardinality of $G$ is $4$. Also, if $G$ is cyclic then there is some $g \in G$ such that all elements in $G$ can be generated by $g$. I.e: $g$ is a generator of $G$. I am having trouble piecing these elements together.
Apparently Lagrange's theorem tells us that the order of any subgroup of $G$ divides the order of the group $G$. So if we take $H = \langle a \rangle$ to be the cyclic subgroup generated by $a$, then the order of this subgroup must divide the order of $G$, which is $4$. Wikipedia says it follows that $a^n = e$, but I do not see how this works.
Any help is greatly appreciated.
 A: Let's take this in order, because there are some misconceptions:

I know that if $G$ is of order $4$ then $4$ is the smallest positive integer such that $g^4=e$.

No: That means that the element $g$ has order $4$ - and this cannot ever hold for all $g \in G$ because there's the identity element. To say that the group $G$ has order $4$ means that there are four elements; $G$ as a set has cardinality four.

So if we take $H=\langle a \rangle$ to be the cyclic subgroup generated by $a$, then the order of this subgroup must divide the order of $G$, which is $4$.

Yes, this is correct. In particular, if $a$ is not the identity and the group $G$ is not cyclic, $a$ has order $2$. This is because the divisors of $4$ are $1$, $2$ and $4$. Make sure that you see how the first and third cases correspond to having $a = e$ and $a$ generating $G$ respectively.

Wikipedia says it follows that $a^n=e$, but I do not see how this works.

You haven't defined $n$ yet, so this isn't clear. What is true is that if $n$ is the order of $H = \langle a \rangle$ then $n$ is also the order of $a$. 
