Show that $g$ is one-one if and only if $g$ is onto.

Original problem

A function $g$ from a set $X$ to itself satisfies $g^m=g^n$ for positive $m$ and $n$ with $m>n$. Here $g^n$ stands for $g\circ g\circ \dots g$(n times). Show that $g$ is one-one if and only if $g$ is onto.

My work

Let $h=g^m$ and $f=g^n$.

Therefore $h=f$ and also $h=h=f=f\circ g^{m-n}$

Therefore we have $g^{m-n}(x)=x$

Is my work correct? If yes then how to proceed further.

• Yes, it is correct. Now read below. May 2 '15 at 13:45

As done in the question we have $g^{m-n}(x)=x=Id_X$ $$g^{m-n}(x)=(g\circ g^{m-n-1})(x)=x$$ And $$g^{m-n}(x)=(g^{m-n-1}\circ g)(x)=x$$

Therefore $g$ is invertible and hence bijective.

Since we were required to prove that $g$ is one-one if and only if $g$ is onto, i.e. $g$ is one-one $\Longleftrightarrow$ $g$ is onto.

Therefore showing that $g$ is bijective completes our proof.

$$g^m=g^n\implies g^{m-n}=Id_X$$

And now use that $\;h\circ f\;$ is 1-1$\;\implies f\;$ is 1-1, and $\;h\circ f\;$ is onto $\;\implies h\;$ is onto.

• Sir can you please explain it little more. And we are required to show that g is 1-1 if and only if g is onto. May 2 '15 at 14:03
• @Singh Then I'm getting something else: I'm getting $\;g\;$ is both injective and surjective. May 2 '15 at 15:05
• Sir "if and only if" stands for double implication. So if you are getting $g$ as both injective and surjective then please provide the explanation in your answer. May 2 '15 at 16:30
• @Singh The explanation is in my answer and in my comments. Either I'm wrong or else what you're trying to prove is. May 2 '15 at 18:37