Let $A$ and $B$ be sets. Define $A = \{a, b\}$ and $B = \{x, y, z\}$.
According to my readings, the set of all functions from $A$ to $B$ can be defined by $|B|^{|A|}$. This would dictate that there are $3^2$ possible functions, or $9$ functions, from my example.
I do not understand why it would not instead be $|B| \cdot |A|$, or 6 functions. I do recognize that for a set $A$ of $n$ elements and a set $B$ of $m$ elements, each element from $A$ can be linked to $m$ elements from $B$.
For my above example, I am thinking the resultant functions would be defined by the following sequences:
$(a, x), (a, y), (a, z), (b, x), (b, y), (b, z)$
As I see it, there are $6$ possible sequences. Can someone explain to me what I am misunderstanding?
EDIT: beautiful, makes much more sense now. Thank you all.