# 3.3 Counting with Bijections

## Counting Functions

How many total functions are there from set $$A$$ to set $$B$$ if $$|A|=3$$ and $$|B|=7$$? Please enter your answer in the form x^y.

Exercise 1

Say $$A = \{a_1, a_2, a_3 \}$$. There is a bijection between total functions from $$A$$ to $$B$$ and length-3 vectors of elements of $$B$$. In this bijection, a given total function $$f$$ corresponds to the vector $$(f(a_1), f(a_2), f(a_3)) \in B^3$$. Hence, by the product rule, $$|B^3| = 7^3$$.