In this post we'll give formulas for the number of bijective, injective, and surjective functions from one finite set to another. Although it's not difficult, a formula for the number of surjective functions was one of the first problems I solved as an undergrad that got me interested in recurrence relations and combinatorics.

Let's use the notation $[n] = \{ 1,2,\dots,n\}$ for an $n$-element set.

More »