Let $G$ be a finite Abelian group and let $n \in \Bbb Z^+$ that is relatively prime to $|G|$. Show that $a \rightarrow a^n$ is automorphism.
The above question has been asked here link
All the answers for proving one-one make use of the fact $\gcd(n,|G|) = 1$. Can we not simply take log and solve this:
$$\begin{align} n \log a = n \log b &\implies \log a = \log b \\ &\implies a = b? \end{align}$$
What is the purpose of $\gcd(n,|G|) = 1$?
The logarithm is a function from real numbers to real numbers. You can't just feed it elements of some arbitrary group without doing some work to try to define what it means first.