Intrepreting tuples as functions I have been mulling over this for a while now. I am told $\mathbb R^n$ can be interpreted as a set of functions.
Take $\mathbb R^2$, for example I can see how we might interpret it as a set containing all ordered pairs: $<x_1,x_2>$. However I do not understand the notation:
$  \{ f:\{1,2\} \longrightarrow \mathbb R \} = \mathbb R^2$
This would mean we have a domain with two elements and a codomain with $| \mathbb R|$ elements(which doesn't make sense to me). What would the values of $f(1)$ and $f(2)$ be by this definition?
Basically I'm asking what justification is there for the following:

$$  \{ f:\{1,2\} \longrightarrow \mathbb R \} = \{\langle x_1,x_2\rangle:x_1,x_2 \in \mathbb R^2\}$$

For instance it's easy to see why the R.H.S. can be interpreted as Cartesian plane but how does two-dimensional plane relate to the L.H.S in the above?

The left hand side is the set of all functions from $\{1,2\}$ to $\mathbb{R}$.  For instance one such function is given by $1\to \pi$, $2\to -7$.  This function corresponds to the point $(\pi, -7)$ in $\mathbb{R}^2$.  
More generally, the function that sends $1$ to $a$ and $2$ to $b$ (with $a,b\in\mathbb{R}$) corresponds to the point $(a,b)\in \mathbb{R}^2$.
