# Gaining understanding and intuition on the set of all functions from $A$ to $B$, $B^A$

The text I'm using defines the set of all functions from one set $$A$$ to another set $$B$$ by:

$$B^A = \{ \sigma : A \rightarrow B \mid \sigma \text{ is a function} \}$$

The text then goes on to say that the next example will clarify the notation. The next example is as follows:

Consider the case that $$A = \{1,...,n\}$$ is the set of natural number between $$1$$ and $$n \in \mathbb{N}$$, and $$B$$ is any set. Then we define a function $$f: B^{\{1,...,n\}} \rightarrow B^n = B \times \dotsm \times B$$ by the equation $$f(\sigma) = ( \sigma(1),...,\sigma(n))$$

I'm having a bit of trouble seeing exactly what's going on here. Specifically, I'm having trouble understanding the domain of $$f$$. So, I know that $$B^n$$ is the set of $$n$$-tuples of elements of $$B$$, where the elements of $$B$$, based on the definition would be $$\sigma(a)$$ for $$a \in A$$. But understanding $$f(\sigma)$$ and how that connects to the way the domain ($$B^{\{1,...,n\}}$$) is depicted is giving me some trouble.

• So, regarding $$f(\sigma)$$: $$\sigma$$ is just a stand in for any function one can think of that would take the elements of $$A$$ i.e., a finite subset of the natural numbers to whatever $$B$$ ends up being? So that as we change the specific function $$\sigma$$ that we are dealing with the $$n$$-tuple necessarily changes as it takes the elements of $$A$$ to (potentially - depending on in/surjectivity, though the text claims $$f$$ is a bijection) different elements of $$B$$. So that our different elements of $$B^n$$ (our individual $$n$$-tuples) would be generated by changing the function $$\sigma$$?
• If this is indeed the case, I'm still having trouble interpreting the way the domain ($$B^{\{1,...,n\}}$$) is written. The domain of $$f$$ would be, it seems, the set of all the functions $$\sigma$$ since it is taking each one and applying it to the set of the elements of $$A$$ to form an $$n$$-tuple of elements of $$B$$. Is this correct? And if so, how can I see that from the depiction of the domain in the definition of $$f$$?
• I think you're overcomplicating things. The idea is just that $f$ turns a function $\sigma:\{1,...,n\}\rightarrow B$ into the tuple in $B^n$ whose $i$th term is the value of $\sigma$ on input $i$. For instance, take $B=\mathbb{N}$ and $n=2$. Then if we feed $f$ the function "$1\mapsto 3, 2\mapsto 17$," we get out the tuple $(3,17)$. Does this make sense? Commented Apr 7, 2022 at 2:58
• @NoahSchweber Yes that does make sense. So then, the domain of $f$ being written as it is, is just saying to us that the function we are using as an input for $f$ (I.e., $\sigma$) is a function from $\{1,...,n\}$ to $B$? Commented Apr 7, 2022 at 3:11
• Exactly: $f$ is a function from a set of functions to a set of tuples. Commented Apr 7, 2022 at 3:13
• Okay this is going to take some time to assimilate and become clear but you've gone a long way in clarifying my main issues with it. I thank you for that @NoahSchweber. I hate to ask but do you know of any other examples I could look up to help coalesce this information? Commented Apr 7, 2022 at 3:21

$$f$$ could be rewritten as follows:
$$$$f:\sigma\mapsto (\sigma(1),\cdots,\sigma(n)).$$$$
So clearly $$f$$ maps the function $$\sigma$$ from $$B^{\{1,\cdots,n\}}$$, to the $$n$$-tuples from $$B^n$$ which is equal to $$(\sigma(1),\cdots,\sigma(n))$$.
By the way, you can also prove that $$f$$ is a bijection, and so tuples could be regarded as functions.