$|A|=|B|=n\in N$
Prove/Disprove that if $f:A \rightarrow B$ is 1-1 then $f:A \rightarrow B$ is onto.
The answer I saw used the Pigeonhole Principle, I am trying to prove it without the principle. But I do not manage to prove that if cardinality is a finite number then all 1-1 functions must be onto too.
I mean that in the infinite case when two sets are equinumerous a bijection is exist, but in the finite case all 1-1 functions are bijection
Suppose $\exists$ an element $b \in B$ which is not mapped to an element in $A$. We know that $f$ is one-to-one. That is $f$ maps $n$ elements in $A$ to $n$ elements in $B$. Including $b$ the cardinality of $B$ is $(n + 1)$ leading to a contradiction.
And one more thing. Had to add this. If two sets have the same cardinality a bijection between them exists - by definition regardless of whether the range/domain is finite or not. But you've been given the function and are asked to prove that it is a bijection. You cannot use that fact in this particular question.