I have a small question. In the (real) space $L_{2}[-\pi, \pi]$ with its usual norm, we have the orthonormal system given by $$\{\frac{1}{\sqrt{2 \pi}}, \frac{1}{\sqrt{\pi}}cos(nx), \frac{1}{\sqrt{\pi}}sin(nx)\}_{n \ge 1}$$
So the $a_k$ Fourier coefficients for $f \in L_{2}[-\pi, \pi]$ should be given by $$ a_k = (f, \frac{1}{\sqrt{\pi}}cos(kx))_{L_{2}[-\pi,\pi]} = \frac{1}{\sqrt{\pi}}\int_{-\pi}^{\pi} f(x)cos(kx)dx$$ But apparently the factor outside the integral should be $1/\pi$ and not $1/{\sqrt{\pi}}$. Why is this?
According to your mentioned orthonormal system, you are implicitly assuming that the inner product on $L_2([-\pi,\pi])$ is defined as $$ (f,g):=\int_{-\pi}^\pi f(x)g(x)\;dx\;. $$ So the Fourier coefficient $a_k$ as you write is correct: you indeed have the factor $1/\sqrt{\pi}$ in front of the integral.
If one defines the inner product differently as $$ (f,g):=\frac{1}{\pi}\int_{-\pi}^\pi f(x)g(x)\;dx $$ then the orthonormal basis would be $$ \{\frac12, \cos(nx),\sin(nx): n=1,2,3,\cdots\} $$ and the Fourier coefficient $a_k$ for $f$ would be $$ (f, a_k)=\frac1\pi\int_{-\pi}^\pi f(x)\cos(kx)\;dx $$ which has an extra factor of $1/\pi$ in front of the integral.