Hi

I am trying to prove the following. Suppose A and B are finite sets

and $\displaystyle f:A\to B$

Prove that if $\displaystyle |A|=|B|$ then $\displaystyle f$ is one to one iff $\displaystyle f$

is onto.

I have proved one direction and I am trying to prove the other direction. i.e.

If $\displaystyle f$ is onto then its one to one. Here are few things which I have come up with. Since $\displaystyle f$ is onto

$\displaystyle Ran(f)=f(A)=B$

since A and B are finite with same size, $\displaystyle A\sim B \Rightarrow A\sim f(A)$

So to prove that f is one to one, should I just assume that there are two

values, $\displaystyle x_1,x_2$ such that $\displaystyle f(x_1)=f(x_2)$ and try to prove that

$\displaystyle x_1=x_2$. This is the standard approach to prove that the function is one to one but I am having difficulty with this route. Can people offer any hints ?

Thanks