# Show if $a$ has infinite order, then $a^i = a^j$ if and only if $i = j$

My abstract algebra textbook as the following part of a theorem that it almost treats as trivial, and I want to prove this myself:

Theorem. Let $$G$$ be a group, $$a \in G$$ and $$i, j \in \mathbb{Z}$$. If $$a \in G$$ has infinite order, then $$a^i = a^j$$ if and only if $$i = j$$.

I tried to prove the first direction, but I run into a wall:

Proof. Suppose $$a^i = a^j$$. Then, $$a^{i - j} = \varepsilon$$, where $$\varepsilon \in G$$ is the identity in $$G$$. Because $$a$$ has infinite order, there is no $$n \in \mathbb{Z}^+$$ such that $$a^n = \varepsilon$$. So, that means $$i - j \leq 0$$, so $$i \leq j$$. Where should I go from here?

• And you can switch the roles of $i$ and $j$ to conclude. Feb 8 at 3:01
• @JyrkiLahtonen Changed "if" to "if and only if" in the title—does that fix it? Feb 8 at 3:07
• Yes :-) ${}{}{}$ Feb 8 at 3:29
• Surely there's a duplicate of this, yet the only one I've found here was answered in the comments. Feb 8 at 12:12
• @Shaun I expected there to be a duplicate as well, given how fundamental this property seems. Do you think this question is different enough from the one you linked to remain open? If not, I'll close the question myself. Feb 8 at 13:16

As per @JyrkiLahtonen's hint, the proof can be concluded by observing that $$a^{j - i} = \epsilon$$ as well, which implies that $$j \leq i$$ when using an argument to $$a^{i - j}$$.
Since we have $$i \leq j$$ and $$j \leq i$$, we have $$i \leq j \leq i$$. So, $$j = i$$.