How to prove for a finite group that $|\langle g \rangle|=o(g)$?
I really don't know how to show that this is true I tried to say let $o(g)=m$ and then show that $|\langle g \rangle|$ has exactly $m$ elements but I wasn't even sure it did because it would contain the elements $g^0,...g^{m-1}$ so that would mean it's true but what about $g^{-1}$ and the other elements with negative coefficients so it seems like it would actually be bigger than $m$?
Thanks.
Define $\varphi:\mathbb Z \to G$ $$\varphi(n)=g^n$$ then $$\langle g \rangle=im(\varphi)$$
By definition if $o(g)=m$, then $g^n=e$ and for every $1\leq k < m\quad g^n \neq e$.
So $$\ker\varphi=m\mathbb Z$$ Thus $$ \mathbb Z/m\mathbb Z\cong im(\varphi)= \langle g \rangle$$ and $$|\langle g \rangle| = |\mathbb Z/m\mathbb Z|=m=o(g)$$