How to find a basis for subspace of functions I am doing this exercise:

The cosine space $F_3$ contains all combinations $y(x) = A \cos x + B \cos 2x + C \cos 3x$. Find a basis for the subspace that has $y(0) = 0$.

I am unsure on how to proceed and how to understand functions as "vectors" of subspaces.
 A: Many people have problems understanding functions (among other things) as vectors. I believe this is caused by the fact that when introducing vectors one most frequently uses elements of $K^n$ where $K$ is a field such as $\mathbb{R}$, which easily leads to the wrong intuition that a vector must look like something such as $(x_1,\dots,x_n)$. But do not forget that a vector is simply an element of a vector space, and there are many examples besides $K^n$ for such spaces, you only need a field $K$, a set $V$ and two certain operations satisfying some basic properties.
For your case, I assume that the underlying field is $\mathbb{R}$. $F_3$ is $3$-dimensional, with $\{\cos x,\cos 2x,\cos 3x\}$ being a basis: These functions span $F_3$ by definition, and they are linearly independent because if $A\cos x + B\cos 2x + C\cos 3x = 0$ holds for all $x\in\mathbb{R}$, then it must be $A=B=C=0$ (check!). By this you know that any subspace of $F_3$ is at most 3-dimensional.
Now we should show that the functions that satisfy $y(0)=0$ actually form a subspace $W$, but this is clear since such functions are obviously closed under addition and scalar multiplication, and the zero function is contained in this subspace.
The functions $\cos x - \cos 2x$ and $cos x - \cos 3x$ (which are elements of $F_3$) clearly satisfy $y(0)=0$ and they are linearly independent, since $$A(\cos x - \cos 2x) + B(cos x - \cos 3x) = (A+B)\cos x - A\cos 2x - B\cos 3x = 0$$
implies $A+B=-A=-B=0$ and hence $A=B=0$. Thus, these two functions lie in (i.e. are vectors of) $W$, so $W$ must be at least 2-dimensional.
Now if $W$ was 3-dimensional, it would be $W=F_3$, but note that the function $\cos x$ does not satisfy $y(0)=0$ and hence is no element of $W$. 
Hence $\{\cos x - \cos 2x,  \cos x - \cos 3x\}$ is a basis of $W$.
