Let $f \in L^2[0,1]^n$. The Fourier inversion theorem for Fourier series states
$$f: [ 0,1 ] ^ { n } \rightarrow \mathbb { C } , \quad \hat { f }: \mathbb { Z } ^ { n } \rightarrow \mathbb { C }$$ $$\hat { f } ( k ): = \int _ { [ 0,1 ] ^ { n } } e ^ { - 2 \pi i y \cdot k } f ( y ) d y$$ $$f ( x ) = \sum _ { k \in \mathbb { Z } ^ { n } } e ^ { 2 \pi i x \cdot k } \hat { f } ( k )$$
Here we can take $n=1$ for simplicity. My question is about changing the basis $e ^ { - 2 \pi i yk }$ by another orthonormal complete basis of $L^2[0,1]$ denoted $e_k$, for example the shifted Legendre polynomials. Then the Fourier coefficients become
$$\hat { f } ( k ): = \int _ { [ 0,1 ]} e_k(y) f ( y ) d y$$
What becomes of the inversion formula for that basis (or in general) ? Is there always an inversion formula ?
Given a Hilbert space $H$ with inner product $(\cdot,\cdot)$ and an orthonormal basis $\{e_\alpha\}_{\alpha\in A}$ of $H$, we always have that for $f\in H$, $$f=\sum\limits_{\alpha\in A}(f,e_\alpha)e_\alpha.$$ Fourier series on e.g. $[0,1]$ just comes from a particular choice of basis when $H=L^2([0,1])$, which is furnished with the inner product $$(f,g)=\int\limits_{0}^1 f(x)\overline{g(x)}\, dx.$$