Rayleigh's Theorem is derived from the equation for Energy

- $W=\int _{-\infty }^{\infty }p(t)\,dt$

If we assume that the circuit is a Voltage applied over a load then $p(t)={\frac {x^{2}(t)}{R_{L}}}$
for matters of simplicity we can assume $R_{L}=1\,\Omega$

This leaves us with

- $W=\int _{-\infty }^{\infty }|x|^{2}(t)\,dt$

This is the same as the dot product so to satisfy the condition for complex numbers it becomes

- $W=\int _{-\infty }^{\infty }x(t)\,x^{*}(t)\,dt$

If we substitute $x(t)=\int _{-\infty }^{\infty }X(f)\,e^{j2\pi ft}\,df$ and $x^{*}(t)=\int _{-\infty }^{\infty }X(f')\,e^{-j2\pi f't}\,df'$

Substituting this back into the original equation makes it

- $W=\int _{-\infty }^{\infty }\left(\int _{-\infty }^{\infty }X(f)\,e^{j2\pi ft}\,df\right)\,\left(\int _{-\infty }^{\infty }X^{*}(f')\,e^{-j2\pi f't}\,df'\right)\,dt$
- $W=\int _{-\infty }^{\infty }X(f)\,\int _{-\infty }^{\infty }X^{*}(f')\left(\int _{-\infty }^{\infty }e^{j2\pi (f-f')t}\,dt\right)\,df'\,df$

The time integral becomes $\delta (f-f')\,which\ is\ 0\ except\ for\ when\ f'=f$
This simplifies the above equation such that

- $W=\int _{-\infty }^{\infty }X(f)\,\int _{-\infty }^{\infty }X^{*}(f')\left(\delta (f-f')\right)\,df'\,df$
- $W=\int _{-\infty }^{\infty }X(f)\,X^{*}(f)\,df$

Proving that the energy in the time domain is the same as that in the frequency domain

- $W=\int _{-\infty }^{\infty }X(f)\,X^{*}(f)\,df=\int _{-\infty }^{\infty }x(t)\,x^{*}(t)\,dt$