TITLE: If a group $G$ has odd order, then the square function is injective.
QUESTION [15 upvotes]: Suppose $G$ has odd order, show the function $f:G\rightarrow G$ defined by $f(x)=x^2$ is injective. This proposition is easily provable if we assume $G$ is Abelian, but I don't know how to start this without the assumption of being Abelian.

REPLY [11 votes]: In general, $m,n \in \mathbb{Z}_{>0}$ with $\gcd(m,n)=1$ and $G$ is a group of order $n$, then the function $f:G\rightarrow G$ defined by $f(x)=x^m$ is a bijection. Proof. By Bézout choose $k,l \in \mathbb{Z}$ with $km+ln=1$ and proceed in a similar way as in Hagen's proof.Following lhf's remark (thanks!), the converse is also true: assume that $f(x)=x^m$ is a bijective function. Let $p$ be a prime with $p|n$. We will show that $p$ does not divide $m$: by Cauchy's Theorem there exists an $x \in G$ with $ord(x)=p$. Since $f(1)=1^m=1$ and $x \neq 1$, $x^m$ must be a non-trivial power of $x$. Hence $ord(x^m)=p$ and this can only be the case if $p \nmid m$. It follows that $m$ and $n$ must be relatively prime $\square$.