TITLE: Proving that a set over a field is a vector space
QUESTION [5 upvotes]: Given: S is a nonempty set, K is a field. Let C(S, K) denote the set of all functions ${f}\in\ C(S,K)$ such that ${f}(s) = 0 $ for all but a finite number of elements of S. Prove that C(S, K) is a vector space. 

OK. I was thinking about using the simple additive axioms that define vector spaces. One of those is that there exist two elements such that $x$ (which is some vector) added to zero equals $x$, or $x + 0 = x$. 
Let $g(s)$ be an arbitrary function. $f + g = g$ when $f(s) = 0$. In addition, if we assume $g(s)$ to be in the space $C(S,K)$ and $f + g = g$ then both vectors are in the space $C(S,K)$ and are closed under addition.
Am I on the right track here? I feel like there's another step I need to have.

REPLY [2 votes]: This is a very important construction in linear algebra. Given a set $S$ and a field $\Bbb F$ we can consider all functions $f : S \to \Bbb F$ such that $f(x) = 0$ unless on finetely many points of $S$. A function like that is said to have finite support. If we define addition and multiplication by scalar pointwise, then the set of all such functions form a vector space. All the axioms are trivially satisfied, the only one that may be tricky is the axiom of closure. Let us denote this set $F(S)$ (I'll change the notation for the set) and let's try to show that with these operations $F(S)$ is closed under linear combinations.
For that matter, consider $f_1, f_2 \in F(S)$ and $\lambda_1, \lambda_2 \in \Bbb F$. Then we want to show that we have  $\lambda_1 f_1 + \lambda_2 f_2 \in F(S)$. The idea is: there is a finite subset $S_1 \subset S$ such that $f_1$ is nonzero only there, and there is a finite set $S_2 \subset S$ such that $f_2$ is nonzero only there. The only place in $S$ where $\lambda_1 f_1 + \lambda_2 f_2$ can be nonzero is inside $S_1 \cup S_2$, because outside of it both functions are both zero. But this is a union of two finite sets, hence finite, and so the linear combination is also in $F(S)$.
Now, just to give you the notion of the importance of that, consider $\delta_a \in F(S)$ the function defined by:
$$\delta_a(x) = \begin{cases}1, & x=a \\ 0, & x\neq a\end{cases}$$
This function indicates wether the point $x$ is $a$ or not. If we consider $i : S \to F(S)$ given by $i(a) = \delta_a$ the set $i(S)$ will be a basis for $F(S)$ (try proving this). Since $\delta_a$ indicates wether a point is or not $a$, we may say that $\delta_a$ represents $a$ inside of $F(S)$. In that case, we will have a basis that intuitively we can think of as formed by the elements of $S$. So, when we have some arbitrary set, we can always construct a vector space from it that intuitively has the set $S$ as a basis, and we call this vector space the free vector space in terms of $S$ and denote it $F(S)$. 
Edit: I've to define addition and multiplication by scalar pointwise. Well, this is a term used for the most common definition of these operations. We simply set:
$$(f+g)(x)=f(x)+g(x) \quad \forall x \in S$$
$$(\lambda f)(x) = \lambda f(x) \quad \forall x \in S$$
Whenever some operation is defined like that we say that it is defined pointwise.