Math 2.0

Combinatorics Proof

Proof of the number of functions between finite sets

Builds on Cardinality of a finite setFunctionRestriction of a functionBijective functionRule of productBijection principleComposition of injections is injectiveComposition of surjections is surjective

Proof

Fix BB with ∣B∣=n|B| = n. We argue by induction on m=∣A∣m = |A| that BAB^A is finite with nmn^m elements.

  1. Let m=0m = 0. Then A=∅A = \varnothing. A function from ∅\varnothing to BB has the empty graph, so there is exactly one. Thus ∣BA∣=1=n0|B^A| = 1 = n^0.
  2. Suppose the claim holds for all sets with mm elements. Let ∣A∣=m+1|A| = m + 1, with a bijection f:{1,…,m+1}→Af : \set{1, \dots, m+1} \to A.
  3. Put a=f(m+1)a = f(m+1) and A′=A∖{a}A' = A \setminus \set{a}. The restriction of ff to {1,…,m}\set{1, \dots, m} is a bijection onto A′A'. So ∣A′∣=m|A'| = m.
  4. Define Φ:BA→BA′×B\Phi : B^A \to B^{A'} \times B by Φ(φ)=(φ∣A′,φ(a))\Phi(\varphi) = (\varphi|_{A'}, \varphi(a)), where φ∣A′\varphi|_{A'} is the restriction of φ\varphi to A′A'.
  5. Define Ψ:BA′×B→BA\Psi : B^{A'} \times B \to B^A as follows. For ψ:A′→B\psi : A' \to B and b∈Bb \in B, let Ψ(ψ,b)\Psi(\psi, b) send each x∈A′x \in A' to ψ(x)\psi(x) and send aa to bb.
  6. This defines a function on AA, because each element of AA is either in A′A' or equal to aa, and not both.
  7. The maps are mutually inverse. Indeed, Ψ(Φ(φ))\Psi(\Phi(\varphi)) agrees with φ\varphi on A′A' and at aa, and Φ(Ψ(ψ,b))=(ψ,b)\Phi(\Psi(\psi, b)) = (\psi, b).
  8. By the induction hypothesis, ∣BA′∣=nm|B^{A'}| = n^m. By the rule of product, BA′×BB^{A'} \times B is finite with nm⋅n=nm+1n^m \cdot n = n^{m+1} elements.
  9. The map Ψ\Psi is a bijection onto BAB^A. Composing it with a numbering of BA′×BB^{A'} \times B gives a bijection from {1,…,nm+1}\set{1, \dots, n^{m+1}} to BAB^A.
  10. A composite of bijections is a bijection, since injections compose and surjections compose. So ∣BA∣=nm+1|B^A| = n^{m+1}, as the bijection principle also states. This completes the induction.

Idea

A function on AA is the same as a function on AA minus one point, together with the value at that point. So adding one point to the domain multiplies the count by nn, the number of possible values. Starting from the single empty function, we get nmn^m.

Reading path

To understand this page from the ground up, read these 40 pages in order. The foundations come first. The path takes the proofs Proof that a composition of injections is injective, Proof that a function is bijective iff it has a two-sided inverse, Proof of the rule of product, Proof that a composition of surjections is surjective, Proof of the rule of sum, Proof of the bijection principle.

Show the path as a graph
Cardinality of a finite set, definition, no evidence levelCardinality of a fini…definitionElement, definition, no evidence levelElementdefinitionProposition, concept, no evidence levelPropositionconceptSet, definition, no evidence levelSetdefinitionConjunction, definition, no evidence levelConjunctiondefinitionImplication, definition, no evidence levelImplicationdefinitionPredicate, definition, no evidence levelPredicatedefinitionEmpty set, object, no evidence levelEmpty setobjectOrdered pair, definition, no evidence levelOrdered pairdefinitionIntersection, definition, no evidence levelIntersectiondefinitionExistential quantifier, definition, no evidence levelExistential quantifierdefinitionUniversal quantifier, definition, no evidence levelUniversal quantifierdefinitionCartesian product, definition, no evidence levelCartesian productdefinitionDisjoint sets, definition, no evidence levelDisjoint setsdefinitionSubset, definition, no evidence levelSubsetdefinitionUniqueness quantifier, definition, no evidence levelUniqueness quantifierdefinitionBinary relation, definition, no evidence levelBinary relationdefinitionFunction, definition, no evidence levelFunctiondefinitionCodomain, definition, no evidence levelCodomaindefinitionFunction composition, definition, no evidence levelFunction compositiondefinitionIdentity function, definition, no evidence levelIdentity functiondefinitionInjective function, definition, no evidence levelInjective functiondefinitionRestriction of a function, definition, no evidence levelRestriction of a func…definitionSurjective function, definition, no evidence levelSurjective functiondefinitionLeft inverse, definition, no evidence levelLeft inversedefinitionRight inverse, definition, no evidence levelRight inversedefinitionProof that a composition of injections is injective, proof, no evidence levelProof that a composit…proofProof that a composition of surjections is surjective, proof, no evidence levelProof that a composit…proofBijective function, definition, no evidence levelBijective functiondefinitionComposition of injections is injective, statement, no evidence levelComposition of inject…statementComposition of surjections is surjective, statement, no evidence levelComposition of surjec…statementProof of the rule of sum, proof, no evidence levelProof of the rule of …proofProof that a function is bijective iff it has a two-sided inverse, proof, no evidence levelProof that a function…proofRule of sum, statement, no evidence levelRule of sumstatementBijective iff it has a two-sided inverse, statement, no evidence levelBijective iff it has …statementProof of the rule of product, proof, no evidence levelProof of the rule of …proofProof of the bijection principle, proof, no evidence levelProof of the bijectio…proofRule of product, statement, no evidence levelRule of productstatementBijection principle, statement, no evidence levelBijection principlestatementProof of the number of functions between finite sets, proof, no evidence levelProof of the number o…proof
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Cardinality of a finite set definition
  2. Element definition
  3. Proposition concept
  4. Set definition
  5. Conjunction definition
  6. Implication definition
  7. Predicate definition
  8. Empty set object
  9. Ordered pair definition
  10. Intersection definition
  11. Existential quantifier definition
  12. Universal quantifier definition
  13. Cartesian product definition
  14. Disjoint sets definition
  15. Subset definition
  16. Uniqueness quantifier definition
  17. Binary relation definition
  18. Function definition
  19. Codomain definition
  20. Function composition definition
  21. Identity function definition
  22. Injective function definition
  23. Restriction of a function definition
  24. Surjective function definition
  25. Left inverse definition
  26. Right inverse definition
  27. Proof that a composition of injections is injective proof
  28. Proof that a composition of surjections is surjective proof
  29. Bijective function definition
  30. Composition of injections is injective statement
  31. Composition of surjections is surjective statement
  32. Proof of the rule of sum proof
  33. Proof that a function is bijective iff it has a two-sided inverse proof
  34. Rule of sum statement
  35. Bijective iff it has a two-sided inverse statement
  36. Proof of the rule of product proof
  37. Proof of the bijection principle proof
  38. Rule of product statement
  39. Bijection principle statement
  40. Proof of the number of functions between finite sets proof

Where this leads

8 pages build on this one.

Further reading

  1. Web https://proofwiki.org/wiki/Cardinality_of_Set_of_All_Mappings
About this page
TagCRRWPKG6KN
URIm2://CRRWPKG6KN
Kindproof
WritingW0 stub
MSC05A05
ProvesNumber of functions between finite sets
UsesCardinality of a finite set, Function, Restriction of a function, Bijective function, Rule of product, Bijection principle, Composition of injections is injective, Composition of surjections is surjective
MethodsMathematical induction
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.