# Proving or Disproving a function that is onto itself is one to one.

I'm having some trouble formulating a proof for this following problem:

A is a finite set and f a function with f : X → X. Suppose that f is onto.

Now Prove or Disprove: f is one to one.

This makes sense to me logically, and I believe it to be true. I've been trying to directly prove it, but maybe proof by contradiction is better?

Thanks

Suppose $|Y| = n$. Let $F:Y \to Y$ be onto. Suppose that $F$ is not injective. Then, there exists some $t \in Y$ such that $a, b \in Y$, $a \neq b$ and $F(a) = F(b) = t$. Then, at most $n -1$ elements can be mapped to (Since $F$ is a function, at most $n$ elements can be mapped to. Since two elements are mapped to the same element, only $n -1$ can be mapped to) $\implies$ $F$ is not onto. Contradiction.