How can we have a complex basis for a real-valued space?

42 Views Asked by At

I have started studied functional analysis few times ago and now I am stuck in a doubt which I think is really trivial, but I cannot still find an answer.

Consider the Hilbert Space $X = L^2[-\pi,\pi]$, with the inner product $\langle f,g\rangle = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(t)\overline{g(t)}dt$.

Then an orthonormal basis is $\big\{\sqrt{2}coskt,\sqrt{2}sinkt \text{ }|\text{ } k \in \mathbb{N} \big\} \text{ } \cup \big\{1\big\} $.

However, also the following is an orthonormal basis which is made of complex functions $\big\{e^{int}\text{ }|\text{ } n \in \mathbb{N}\big\}$. But isn't X a real-valued space? How can it have a complex orthonormal basis?