[Math] If $f^n$ is the identity map then prove that $f$ is bijection

elementary-set-theoryfunctions

Let $f:A\rightarrow A$ and $f^n=1_A$ where $f^n=\underbrace{f\circ f\circ\cdots\circ f}_\text{n times}$. Prove that $f$ is bijection.

I found some type of proof and it's a contradiction proof but don't quite understand the surjectivity.

If f is not injection then there exist $x_1,x_2\in A$ such that $f(x_1)=f(x_2)$ and $x_1\neq x_2$. Then $f^{n-1}(f(x_1))=f^{n-1}(f(x_2)) \iff f^n(x_1)=f^n(x_2)$. But then $x_1=x_2$ therefore a contradiction.

If f is not surjection then there exist $y\in A$ such that for every $x\in A$ $f(x) \neq y$. This somehow implies that $f(f^{n-1}(z))\neq y$ for every $z\in X$.

There are some steps skipped in the surjectivity proof and honestly not sure how we get contradiction here or how we even got that $f(x) \neq y \implies f(f^{n-1}(z))\neq y$. Any help is appreciated.

Also is the injectivity proof reasonable?

Best Answer

Note that $f^{n-1}$ is the inverse of $f$. It follows that $f$ is a bijection.