Intuition behind Fourier coefficients Actually I'm trying to dive into Fourier series and have some trouble understanding the idea behind the Fourier coefficients.

Let's have a Fourier series $$f(x) = a_0 + \sum_{n=1}^{\infty}[a_n\cos(\omega_nx) + b_n\sin(\omega_nx)]$$ where $x \in \langle-\frac{T}{2}, \frac{T}{2}\rangle$, $n \in \mathbb{N}$, $\omega_n = \frac{2\pi}{T}n$ is angular frequency, $T$ is the period of function $f$.

If I understand it correctly I would say that $a_n$/$b_n$ is the amplitude of cosine/sine functions with frequency $n$ Hz (harmonic, since $n \in \mathbb{N}$). And by combining these (potentially infinite) number of functions I get function $f$ (visualization, animation).

Now comes the interesting part - amplitudes/coefficients $a_0$, $a_n$, $b_n$. I understand the calculations... multiplying the equation by $\cos(\omega_kx)$/$\sin(\omega_kx)$, $k \in \mathbb{N}$ and integrating over $\langle-\frac{T}{2}, \frac{T}{2}\rangle$ results in:
$$a_0=\frac{1}{T}\int\limits_{-T/2}^{T/2}f(x)\mathrm{d}x,$$
$$a_k=\frac{2}{T}\int\limits_{-T/2}^{T/2}f(x)\cos(\omega_kx)\mathrm{d}x,$$
$$b_k=\frac{2}{T}\int\limits_{-T/2}^{T/2}f(x)\sin(\omega_kx)\mathrm{d}x.$$

Since $\int_{-T/2}^{T/2}f(x)\mathrm{d}x$ is area beneath function $f$ on interval $\langle-\frac{T}{2}, \frac{T}{2}\rangle$, $a_0$ can be geometrically interpreted as the average value of function $f$ on interval $\langle-\frac{T}{2}, \frac{T}{2}\rangle$ or as the new center of oscillation instead of zero.

What I do not understand is that how $a_k$/$b_k$ can be geometrically interpreted. In particular, I can imagine how $f(x)\cos(\omega_kx)$ look like but I can't wrap my head around the fact that the area beneath $f(x)\cos(\omega_kx)$ on interval $\langle-\frac{T}{2}, \frac{T}{2}\rangle$ divided by $\frac{2}{T}$ is the correct amplitude for function $cos(\omega_kx)$ to be the proper function to be added to others to build up function $f$ (the same for sine function too). Why is there a $2$? And how is it possible that $\int_{-T/2}^{T/2}f(x)\cos(\omega_kx)\mathrm{d}x$ is the right number to determine the correct amplitude for the Fourier series? What is the connection between the area beneath the function and the amplitude? I can't see it geometrically so I think that I miss some very important idea. Or some property of sine/cosine maybe...

Can someone explain the idea behind Fourier coefficients or paste a link where this is explained, please? I've read/watched couple of materials covering this topic but didn't find the answers :( Usually calculations of Fourier coefficient where presented but never the explanation of what does it actually in "human language" means. I consider it to be very important in understanding the essence of Fourier series.

Thanks in advance for any advice.
I'm glad you reposted this here; I saw it on MathOverflow earlier and wanted to answer, but it was closed (and it really is more appropriate here.)

As the answer there suggested, perhaps the best way to think about this is in terms of linear algebra.

Your sines and cosines form a complete orthonormal basis for your space of functions. The inner product on this space is $&lt;f,g&gt; = \int f(x)\bar{g(x)}dx$, and this gives a direct geometric interpretation of the integrals involved in calculating $a_n$ and $b_n$: you are simply projecting your function down onto a given basis vector to see "how much" of it is in "that direction." The $2/T$ factor out front comes from normalizing the basis vectors.

(For more details, see Bessel's inequality and Parseval's identity, or a good book like Stein and Shakarchi's 'Fourier Analysis: An introduction.' They have a wonderfully explicit visualization of this type on page 78, where they prove that partial sums $S_N(x)$ of Fourier series of a function f(x) are the best approximation possible with a trigonometric polynomial of order at most $N$.)

Your Fourier series, then, is equivalent to 'building up' f(x) from (an infinite linear combination of) basis vectors in the space, and the coefficients $a_n$ and $b_n$ tell you how much of each you need. The fact that you can do this at all is the content of Parseval's identity.
The undestanding of intuition behind coefficients of the Fourier transform may be simplified as follows. The imaginary exponential runs from minus infinity to positive infinity. As a result, all imaginary parts (the sine functions) form the negative and positive sides cancel out. What is left is the cosine part. The coefficients are then calculated as an integral of the product of $ f(x)$ and $\cos (\omega x)$. To satisfy the conditions for a Fourier transform, f(x) has to be sum of cosine functions. As the cosine funcions are orthonormal, each integral extracts the correct cosine function from $f(x)$. Thus, $f(x)$ is transformed to a sum of cosine functions.