Find a basis of a subspace Let $X$ be a set with $X \neq \emptyset$ and $F$ a field. Let $V$ the vector space such $V=\{ f : X \rightarrow F \}$ with the usual operations. Find a basis for the subspace,
$$W= \{ f\in V \mid f(x) =0 \quad \text{for all} \quad x \in X \quad \text{except for a finite number of elements}\}$$
Can you hel me with this problem? I don't understand how to do it.
 A: For each $x\in X$, let $f_x$ be the function which is $1$ at $x$ and $0$ elsewhere. We will show that $B=\{f_x:x\in X\}$ forms a basis for $W$. For linear independence, assume that
$$\lambda_1f_{x_1}+\lambda_2 f_{x_2}+\ldots +\lambda_n f_{x_n}=0 \text{ (the function which sends every $x\in X$ to $0$)}$$
for some $\lambda_1,\ldots,\lambda_n\in F$ and some $x_1,\ldots,x_n\in X$. We may assume, without loss of generality, that $x_i\ne x_j$ if $i\ne j$ because otherwise we can combine like terms. Therefore, for each $i$, the value of the LHS at $x_i$ is $\lambda_i$ and the value of the RHS at $x_i$ is $0$, and hence $\lambda_i=0$. Now for spanning, let $f\in W$. There exist distinct $x_1,\ldots,x_n\in X$ such that $f(x_i)\ne 0$ for all $i$ and $f(x)=0$ for all $x\in X\backslash\{x_1,\ldots,x_n\}$. Therefore,
$$f=f(x_1)f_{x_1}+f(x_2)f_{x_2}+\ldots+f(x_n)f_{x_n},$$
completing our proof.
It is worth noting that the "finite" in "except for a finite number of elements" is crucial. Otherwise, we would not necessarily be able to express every element in $W$ as a finite linear combination of elements in $B$.
