a surjection between finite sets of the same cardinality is bijective

Theorem.

Proof.

Let A and B be finite sets with |A|=|B|=n. Let C={f-1⁢({b})∣b∈B}. Then ⋃C⊆A, so |⋃C|≤n. Since f is a surjection,
|f-1⁢({b})|≥1 for each b∈B. The sets in
C are pairwise disjoint because f is a function; therefore, n≤|⋃C| and

|⋃C|=∑b∈B|f-1⁢({b})|.

In the last equation, n has been expressed as
the sum of npositive integers; thus |f-1⁢({b})|=1 for each b∈B, so f is injective.
∎