If the set has a finite number of elements, prove the following:
If $\sigma$ maps $S$ onto $S$, then $\sigma$ is one-to-one.
Proof: Suppose $\sigma$ is not 1-1, then $\exists x_1, x_2$ $(x_1\neq x_2)$ such that $\sigma(x_1)=\sigma(x_2)$. Thus $|\sigma(S)|\leqslant n-1$ and since $\sigma$ is onto, then $|S|\leqslant n-1$. This is a contradiction because $|S|=n$.
Is this proof correct?
However, this is false is set is infinite. Let's consider $\sigma: \mathbb{R}\to \mathbb{R}_{\geqslant 0}$ defining by $\sigma(x)=x^2$. It is onto but not 1-1.