TITLE: A one-to-one function from a finite set to itself is onto - how to prove by induction?
QUESTION [6 upvotes]: I'm not sure if I can do this without knowing what f actually is?

Let $X$ be a finite set with $n$ elements and $f: X \rightarrow X$ a one-to-one function. Prove by induction that $f$ is an onto function.

Any pointers? I don't even know how to make a base case for this.

REPLY [4 votes]: An alternative, non-inductive approach. Makes use of the definition of Dedekind-infinite/finite.
Suppose we have injective (1-1) function $f: X\rightarrow X$
Using proof by contrapositive, suppose that $f$ is not surjective (onto).
Let $X'=f(X)$. Show $X'$ is a proper subset of $X$.
Construct $f': X'\rightarrow X$, the inverse of $f$ on $X'$.
Show $f'$ is both injective and surjective. By definition, $X$ would then be infinite.
Taking the contrapositive, if $X$ is finite then $f$ is surjective (onto).