Let $G$ be a finite cyclic group of order $n$ generated by an element $g$. I want to show that the order of $g$ is exactly the order of $G$.
My try:
We can write $G=\{g^i\;|\;i\in \mathbb Z\}$. Since $G$ is finite, we know that there will be identifications $g^i=g^j$ that will make $G$ finite. By the multiplication law on $G$ we must have $g^0=1$. Also if $i<j$ and if $g^i=g^j$ then $g^{j-i}=1$. I can see all these but not see why $g^n=1$ and not $g^k=1$ for all $0<k<n$? Thank your for your help!!
If $g\in G$ has order $k$ then set $\left\{ e,g,\ldots,g^{k-1}\right\} $ has distinct elements and $\left\{ g^{i}\mid i\in\mathbb{Z}\right\} =\left\{ e,g,\ldots,g^{k-1}\right\} $. Here $e$ stands for the identity of $G$.
If secondly $G$ is generated by $g$ then $G=\left\{ g^{i}\mid i\in\mathbb{Z}\right\} =\left\{ e,g,\ldots,g^{k-1}\right\} $ and consequently $\left|G\right|=k$, i.e., the order of $G$ is exactly the order of $g$.