# Why is the set of cosines and sines a vector space?

1. Aug 18, 2015

### davidbenari

So when I took linear algebra I was asked to show the well-known properties of orthogonality in the functions cos(mx) and sin(mx)... With this I mean all the usual combinations which I don't see why I should point out explicitly.

The inner product in the vector space was defined $\int_{-\pi}^{\pi} \phi_n \phi_m dx$ as usual.

What I don't understand is why the space of functions ( cos(mx), sin(nx) ) (with this notation I'm pointing out all cosines and sines of integer angular frequency), is a vector space.

Namely, its not closed under addition! If I add whichever combination I won't get a function of the form cos(mx) or sin(mx) back. There'll always be a phase constant $\Phi$ or something along those lines.

Why are people so wishywashy with this? How can you define an inner product on a space of functions that doesnt form a vector space?

Thanks!

2. Aug 18, 2015

### Infrared

The set of just those trig functions is not a vector space. However, the space of their linear combinations is. It is on this space (or perhaps a larger one like square integrable functions) that the inner product you described is defined. Here that exercise shows that $1,\sin x,\cos x, \sin 2x,\cos 2x,...$ are orthogonal.

3. Aug 18, 2015

### davidbenari

Oh, that makes sense. I have one question though; when you have a set of functions like this one (infinite, orthogonal, not necessarily trigonometric) do they serve as a basis for all possible functions or not necessarily?

If not, then is the Fourier Series so useful because the basis (1 sinx, cosx,.....cosnx,sinnx) describes a vector space that is "very big" ?

4. Aug 18, 2015

### Infrared

Strictly speaking $\{1,\sin x, \cos x,...\}$ is only a basis for the space of their linear combinations. However, more functions are included in your space if you allow infinite sums of these trig functions. Not every function on $[-\pi,\pi]$can be written as a (even infinite) sum of trig functions and the question of exactly which functions have a convergent Fourier series is quite complicated.
Fortunately, 'nice' functions ($C^1$ is sufficient but not necessary) can be written as their Fourier series which is enough in many applications, the first historically being to the heat equation.