Set of Functions is a Vector Space problem Let $F$ be a ﬁeld.
Consider the $F$-vector space $F(X, F)$ of all functions from $X = \{ 1, 2 \} \to F$. Deﬁne
$e_1, e_2 \in F(X, F)$ by $e_1 = \{ (1, 1),(2, 0) \}$ and $e_2 = \{ (1, 0),(2, 1) \}$. Let $f \in F(X, F)$, and
set $r_1 = f(1)$ and $r_2 = f(2)$, so $r_1, r2 \in F$. What is $r_1e_1 + r_2e_2$? Explain.
-->so far, my attempts:
$e_1 = { (1, f(1)),(2, f(2)) }$
$e_2 = { (1, f(1)),(2, f(2)) }$
-or-
$r_1e_1 + r_2e_2$ = ($r_1 + r_2$)$(e_1+e_2)$ = (f(1)+f(2))$(e_1+e_2)$ 
but I am really lost on this question. Please help me, any hints are very appreciated. Thank you!
 A: We have that $f=r_1e_1+r_2e_2$. To see this, if we let $F^n$ be the $F$-vector space of the $n$-tuples of members of $F$, then there's a natural isomorphism between the set of functions $\{f: f:\{1,\ldots, n\}\to F\}$ and the set $F^n$ (and actually, some authors define $F^n$ to be this set. I make a reference to Lynn H. Loomis Advanced Calculus). Hence, in this case, you're just taking the basis $\{(1,0),(0,1\}$ of $F^2$ and expressing $f$ in its "natural coordinates.
There's another approach: note that every function $f:A\to B$ is determined by its domain, it's codomain and the values that it assign to the points in the domain. Now, note that if $e_1$ and $e_2$ are as above, we have that
$$
r_1e_1(1)+r_2e_2(1)= r_1\cdot 1+r_2\cdot 0= r_1=f(1)\\
r_1e_1(2)+r_2e_2(2)= r_1\cdot 0+r_2\cdot 1= r_2=f(2)\
$$
Hence, the functions $r_1e_1+r_2e_2$ and $f$ are the same because they have the same domain, the same codomain and assign the same values.
And I have to point out that it is not true in general that $r_1e_1+r_2e_2=(r_1+r_2)(e_1+e_2)$.
