prove that a function from a finite set S to itself is one-to-one if and onlyif it is onto. Is this true when S is infinite?
the foregoing question is from contemporary abst algebra by joseph gallian page $113$ question $12$.
I proved the first part which is for finite sets.
However,i could not do anything for the infinite case,can you help me for infinite case ? I think about some examples such as $f:R \rightarrow R$ such that $f(x)=x$,i.e, the identity.
here f is one-to-one if and onlyif it is onto
It is just example, but i want to see it using proof techniques in order to not missing counter examples.
can you please help me for its proof for infinite sets ? do you have any proof of counter example to disprove it ?
why did you downvote ?