Let $G$ be a group with identity element $e$, let $a \in G$ have order $n$. Let $m$ be an integer then prove that $a^m =e$ iff $n$ divides $m$ I have encountered this question in a book. I have no clue how to approach the question. How should I go about it? I was thinking of maybe writing m in terms of n, since we have m ≡ 0(mod n).
I tried to contradict it by taking some n which does not divide m. I am not sure if that is the correct procedure
 A: Hint $\ H := \{m\in\Bbb Z\ :\ a^m = 1\}\,$ is closed under subtraction, so is a subgroup $\,\{0\}\subsetneq H\subseteq \Bbb Z.\,$ Therefore $\,H = n\Bbb Z\,$ where $\,n = $ least element $>0\,$  of $\,H.\,$ So $\,a^m = 1\!\iff\! m\in n\Bbb Z\!\iff\! n\mid m$
Remark $ $ Though it is easy to verify the set forms a subgroup by said subgroup test, it is more conceptual to do so by viewing $H$ as the kernel of the group hom: $\, m\mapsto a^m\,$ from $\,\Bbb Z\to G,\,$ presuming that viewpoint is already known.
A: $\impliedby:\;$  If $n|m,$ then $m=nk,$ so $a^m=a^{(nk)}={(a^n)}^k=e^k=e$.
$\implies:\;$  If $a^m=e$ and $n\nmid m$, then $0<\gcd(n,m)<n$ but $a^{\gcd(n,m)}=e,$ (*) 
contradicting the assumption that $a$ has order $n$.

Addendum (from my comments, as suggested by Bill Dubuque) 
to justify the inequalities and equality on the line marked (*) above:
$0<\gcd(n,m)<n,$ because $n\ne0$ so $0<\gcd(n,m),$ and if $\gcd(n,m)=n$ then we'd have $n|m$.
By Bezout's identity, $\gcd(n,m)=nx+my$, so $a^{\gcd(n,m)}=a^{nx+my}=(a^n)^x(a^m)^y=e^xe^y=e$.
