# Finding a basis in a Hilbert space

I'm having trouble with the Hilbert spaces.

I have a Hilbert space span by the set $$\{1, \sin(x), \cos(x), \sin^2(x), \cos^2(x), \sin(2x), \cos(2x)\}$$

Now I'm trying to find a basis and the dimension of this space. To find the dimension I have first to find a basis, right?

So for a basis: am I just looking for the functions that can build up any function by addition or multiplication with a constant?

Thank you in advance! -Alex

• Your Hilbert space is spanned by your functions, hence its dimension is at most the number of functions that you have. Now some of your functions are linear combinations of others, so you need to remove them - they don't add anything new to your space. – TZakrevskiy Oct 15 '15 at 15:41
• Thank you! So I guess I have to remove the 1 as it is a combination of ${sin}^2(x)$ + ${cos}^2(x)$, but all other functions still should remain? – Darius Oct 15 '15 at 15:44
• Yes, you can remove either $1$ or $\cos^2x$, or $\sin^2x$ - this would not affect the spanned space. However, there remain other function(s) that you can get rid of. – TZakrevskiy Oct 15 '15 at 15:47
• Yes, just got it :-) So I can also remove cos(2x) as it can be written as ${cos}^2(x) - {sin}^2(x)$. But I guess that should be all then? – Darius Oct 15 '15 at 15:50
• Now, in order to convert your guess into a rigorous statement, you need to prove that the remaining functions are linearly independent. You can do that by definition, for example. – TZakrevskiy Oct 15 '15 at 15:53