Suppose you are given a black box with some unknown periodic signal $x_{T_0}(t)$ in it, whose fundamental amplitude $a$, frequency $f_0 = 1/T_0$ and initial phase $\phi$ are unknown. Suppose the only thing you can do is to provide another signal $in(t)$ as input, in which case the black box will output the inner product between the two.
What kind of periodic signal should you use as input to get the frequency, amplitude and phase of the fundamental frequency component of $x_{T_0}(t)$?
Let us choose a phasor as ej2πft as input signal $in(t)$,
and vary its frequency $f$.
The first plot shows a periodic signal $x_{T_0}(t)$ with adjustable amplitude $a$, frequency $f_0$ and phase $\phi$. The two bottom plots show the product between this signal and a phasor with adjustable frequency $f$.
The bottom-left plot shows the product signal as a function of time, while the bottom-right plot shows a side view of the same product signal in the complex plane. The orange marker follows the selected time stamp. The green marker indicates the center of gravity, that is, the inner product average over time.
When the periodic signal is a cosine, the non-zero inner products occur at $f = \pm f_0$, which gives the phasor decomposition of the cosine.
As a result, the modulus and argument of the inner product obtained with $e^{j2\pi f_0 t}$ provide the amplitude and phase of the fundamental. More generally, the inner products of a periodic signal with phasors provide its frequency content.