The space of functions whose domain is $S$ and their values lie in $F$ (a field) is shown by:
$$\mathbf{Func}(S,F) = \{f: S \to F\} (1)$$
In linear algebra by Peter Petersen on page 11 example 1.4.6 is written that if $S = \{1,2,...,n\}$ then:
$$\mathbf{Func}(\{1,2,...,n\},F) = F^n (2)$$
The book continues that the vectors in $F^n$ can be also thought of functions. I cannot understand equation 2 and the statement mentioned above. Why is the space of functions equal to the vector space $F^n$? For example, if $n = 1$, then we have:
$$\mathbf{Func}(\{1\},F) = F$$
How does the space of all functions which their input is 1 equal to the field F?
There is a natural bijection $$\mathbf{Func}(\{1,2,...,n\},F) \xrightarrow{\sim} F^n$$
given by sending an element $f\in \mathbf{Func}(\{1,2,...,n\},F)$ to the $n$-uple $(f(1),f(2),\ldots ,f(n))$. This function is bijective. To see this, you can either show that it is both injective and surjective, either exhibit its inverse. To me, the latter is the most direct way here.
The inverse is clearly given by the map that sends an $n$-uple $(y_1,\ldots ,y_n)\in F^n$ to the function $f\in \mathbf{Func}(\{1,2,...,n\},F)$ defined by the relations $\forall i\in\{1,2,...,n\}, f(i)=y_i$.
NB: Note that when writes $\mathbf{Func}(\{1,2,...,n\},F) = F^n$ with an equal sign, this is actually a usual abuse of notation. Both sets clearly are not equal. Their respective objects are of different nature. However, this equal sign is meant to signify "both objects can be identified in a natural manner". The good notion of "to be identified" depends on the respective algebraic structure of both sets. Actually, here we may also see both sets as $F$-vector spaces. It happens that not only we have a natural bijection between them as sets, but this bijection turns out to be a natural isomorphism between them as $F$-vector spaces. That is, it respects the sum and the extern product by elements of $F$, as it can be easily checked.