TITLE: An injection between finite sets of equal size must be a bijection
QUESTION [5 upvotes]: To me, it seems logical that if I have two finite sets of equal size, and there is an injection between them, then that injection must be a bijection. 
However, of course, we cannot just claim these things as various tricky counter examples have demonstrated in the past. 
However, I am unable to prove the above claim. What would a proof of such a claim look like? I can see that we now need to prove that the mapping is also surjective, but I am not completely sure how to go about doing this. 
Also, the condition above has that the sets are finite. What happens if we drop this condition? Does the claim no longer necessarily hold?

REPLY [2 votes]: The proof is essentially just an exercise in definition chasing, it is good to just do it for yourself. Write out the definition of surjectivity, think of what could go wrong, and show that that cannot happen because of injectivity. Maybe drawing some diagrams with two sets points and arrows between them describing a function will help you. It's a good exercise. An appropriate exercise that follows the same idea is that if $\phi: V \to V$ is an injective linear automorphism of a finite dimensional vector space.
Obviously this is not true if the sets are not finite, $f: \mathbb{Z} \to \mathbb{Z}$ given by $f(x) = 2x$ is a counterexample, and there are many more.
Edit: Really I guess I should point out that one of the definitions of an infinite set is a set $A$ such that there exists an injective $f: A \to A$ that is not surjective. So this definitively fails for infinite sets.