# Another interpretation of function space

let $X$ and $Y$ be sets and $Y^X$ the set of function $f:X\to Y$. How can we interpret $Y^X$ as the cartesian product $\prod_{x\in X}Y_x$ where $Y_x=Y$ for each $x\in X$?

-
They are the same. No interpretation is needed. –  André Nicolas Feb 23 '12 at 8:19
I’m not really sure what your question is: by definition that Cartesian product is the set of functions from $X$ to $Y$. –  Brian M. Scott Feb 23 '12 at 8:20
for example suppose $X$ is finite. then we have the bijection $$\prod_{x\in X}Y_x\to Y^X$$ defined by sending a tuple $$(y_1,y_2,...,y_n)$$ maps to the map $f$ that sends $f(x_1)=y_1,...,f(x_n)=y_n$ is that correct? –  palio Feb 23 '12 at 8:20
Yes, that is correct. –  Brian M. Scott Feb 23 '12 at 8:25

The elements in the Cartesian product $\prod_{x\in X}Y_x$ are sequences indexed by $X$ whose elements are members of $Y$, namely $\langle y_x\mid x\in X\rangle$.
Such sequence is naturally isomorphic to $\{\langle x,y_x\rangle\mid x\in X\}$, which is exactly a function from $X$ to $Y$.
This means that there is a very natural way to identify $\prod_{x\in X} Y_x$ with $Y^X$.
That natural isomorphism is the identity: a sequence indexed by $X$ whose elements are members of $Y$ is a function from $X$ to $Y$. –  Brian M. Scott Feb 23 '12 at 8:26
@Brian: But what if $X$ is finite? I do agree that in a context where products come up, it is a good idea to teach them as functions. Apparently not everyone do that (otherwise this question would not have come up...) :-) –  Asaf Karagila Feb 23 '12 at 8:46
Well, no matter how you teach products, sooner or later you'll be confronted with the question of why $(X \times Y) \times Z$ is "only" naturally isomorphic to $X \times (Y \times Z)$ and not actually equal... –  Zhen Lin Feb 23 '12 at 10:34