Finite subgroup proof

For an element g of a group G, show that the set {1, g, g^2, ....} is a subgroup of G if and only if g has finite order.

I know this is true since the subgroup generated by an element is the smallest subgroup containing that element of the group. I have a few ideas on how to approach writing this proof, but I'm really not sure how to prove the relationship with the subgroup to the element having finite order.

My only current thought here is using Lagrange and that the order of the subgroup must divide the order of the group, so if g has finite order n, G must have order zn, but I don't know how to relate that to the set being a group.

Pointers in the correct direction?

• Would the downvoter care to explain their downvote? – D_S Oct 20 '17 at 3:51

Hint: suppose $g$ does not have finite order. If $\{1, g, g^2, ... \}$ were a subgroup, then the inverse of $g$ would have to be in this set. Is it?
Hint: suppose $g$ does have finite order. Let's say the order of $g$ is $5$. Then $g^5 = 1, g^6 = g, g^7 = g^2$, and so on. So $\{1, g, g^2, ... \}$ is just the set
$$\{1, g, g^2, g^3, g^4\}$$ Then $g$ is $g^4$ are inverses of each other, as are $g^2$ and $g^3$.