Why does the integral for determining the coefficients of a complex fourier series contain a negative sign in the exponent:
$$c_n = \int_{-a}^{a} f(x)e^{-in\pi x/a} \,dx$$
scouring the internet for an answer, I stumbled upon a proof, and it looks good. However, to my intuition it would make sense to define the $c_n$ as the inner product of $f(x)$ and choice of basis $e^{in\pi x/a}$. Like this:
$$c_n = \frac{\langle f(x),e^{in\pi x/a} \rangle}{\langle e^{in\pi x/a},e^{in\pi x/a} \rangle}$$ But this of course does not have the negative sign in the exponent. Why is this a case, is there something wrong in my reasoning?