Prove that for any set A and B, the cardinality of the set of all functions mapping A to B is $\vert B \vert ^ {\vert A \vert}$

545 Views Asked by At

What I do is for finite sets A, B, let $A={a_1, a_2, ...a_n}$ and $B={b_1, b_2, ...b_m}$

A function f assigns each element $a_i$ of $A$ to an element $b_j = f (a_i)$ of $B$; there are $m$ possibilities for each element of $A$, we have $m, m, ...m=m^n= \vert B \vert ^ {\vert A \vert}$ possible functions.

Since A and B are any sets, how can we extend above to an infinite countable or uncountable sets?