Q:

Let $x$ be an element in a group $G$. Assume that the order of $x$ is $m$, and also that $x^n = e$. Prove that $m \mid n$.

Let x be an element in a group $G$. Assume that the order of x is m, and also that $x^n = e$ (identity element).  Prove that $m \mid n$.

So what I am thinking is that the order of an element is the smallest positive integer $m$ such that $x^m = e$.
There are other integers that satisfy this, but $m$ is the smallest.  So $n \geq m$ but also has to be a multiple of $m$. Thus $m \mid n$ in either case.   
Is there an intermediate step between this assertion?  I more or less just described the idea instead of a formal proof.  
Thank you for any and all help. 

A:

We combine the fact that $m$ is the order of $x \in G$ with the division algorithm to proceed as follows:
Since $m$ is the order of $x$, it is the smallest positive integer with
$x^m = e; \tag 1$
now use the division algorithm to write
$n = mq + r, \; 0 \le r < m; \tag 2$
then
$x^{mq} = (x^m)^q = e^q = e, \tag 3$
so
$x^r = ex^r = x^{mq}x^r = x^{mq + r} = x^n = e; \tag 4$
if $r \ne 0$, this contradicts the assumption that $m$ is the smallest positive integer such that (1) binds.   Thus $r = 0$, $n = mq$, and
$m \mid n. \tag 5$

