When learning Fourier expansions, we learn that $\{\sin(mx), \cos(mx)\}_{m \in \Bbb N}$ is an orthonormal basis for our space and thus we can expand functions in it. My question is what space is this exactly?
Is it the space of all functions $f: \Bbb R \to \Bbb R$? I doubt it. There are some really weird functions. Or is it continuous functions? Or periodic functions? Or analytic functions? Or just some set of functions that can only be described as the span of the above basis functions?
It's the Hilbert space of $L^2$ functions on the circle. More explicitly, it's the space of Lebesgue measurable functions $f : \mathbb{R} \to \mathbb{R}$ which are periodic with period $2\pi$ and such that the integral
$$\int_0^{2\pi} |f(x)|^2\,dx$$
converges, modulo the equivalence relation where $f \sim g$ if $\int_0^{2\pi} |f(x) - g(x)|^2\,dx = 0$.