Let
Y: 1 2 3 4 …. n
X: 1 2 3 4 …. n
One of the elements of set Y (say 1) may have any one of the pre-images 1, 2, 3, … n, i.e., in n ways.
The second element say 2 will have the pre-image in (n – 1) ways.
∴ The number of ways, we can have the pre-images
n x (n – 1)(n – 2) …. 3. 2. 1 = n!
Thus, there are nl possible onto functions.