How many one-to-one functions are there from a set A with n elements onto itself?
GATE 1987 · Discrete Mathematics · Functions · medium
Answer: There are n! one-to-one onto (bijective) functions from an n-element set to itself.
Identify one-to-one onto self-maps as permutations: Here the domain and codomain are the same n-element set, so m = n. A one-to-one function on a finite set is automatically onto, so we are counting permutations of n elements.
Multiply the decreasing choices: Setting m = n in the injective-count gives n(n-1)(n-2)...(n-n+1) = n(n-1)...(1) = n!. So there are exactly n! one-to-one onto functions from A to itself.