# Parseval's theorem

In mathematics, Parseval's theorem usually refers to the result that the Fourier transform is unitary; loosely, that the sum (or integral) of the square of a function is equal to the sum (or integral) of the square of its transform. It originates from a 1799 theorem about series by Marc-Antoine Parseval, which was later applied to the Fourier series. It is also known as Rayleigh's energy theorem, or Rayleigh's identity, after John William Strutt, Lord Rayleigh.
Although the term "Parseval's theorem" is often used to describe the unitarity of any Fourier transform, especially in physics, the most general form of this property is more properly called the Plancherel theorem.

## Statement of Parseval's theorem

Suppose that $A(x)$ and $B(x)$ are two complex-valued functions on $\mathbb {R}$ of period $2\pi$ that are square integrable (with respect to the Lebesgue measure) over intervals of period length, with Fourier series
    $A(x)=\sum _{n=-\infty }^{\infty }a_{n}e^{inx}$
and
    $B(x)=\sum _{n=-\infty }^{\infty }b_{n}e^{inx}$
respectively. Then
where $i$ is the imaginary unit and horizontal bars indicate complex conjugation. Substituting $A(x)$ and ${\overline {B(x)}}$:
    ${\begin{aligned}\sum _{n=-\infty }^{\infty }a_{n}{\overline {b_{n}}}&={\frac {1}{2\pi }}\int _{-\pi }^{\pi }{\biggl\sum _{n=-\infty }^{\infty }a_{n}e^{inx}{\biggr )}{\biggl\sum _{n=-\infty }^{\infty }{\overline {b_{n}}}e^{-inx}{\biggr )}\,\mathrm {d} x\\[6pt]&={\frac {1}{2\pi }}\int _{-\pi }^{\pi }{\Bigla_{1}e^{i1x}+a_{2}e^{i2x}+\cdots {\Bigr )}{\Bigl{\overline {b_{1}}}e^{-i1x}+{\overline {b_{2}}}e^{-i2x}+\cdots {\Bigr )}\,\mathrm {d} x\\[6pt]&={\frac {1}{2\pi }}\int _{-\pi }^{\pi }\left(a_{1}e^{i1x}{\overline {b_{1}}}e^{-i1x}+a_{1}e^{i1x}{\overline {b_{2}}}e^{-i2x}+a_{2}e^{i2x}{\overline {b_{1}}}e^{-i1x}+a_{2}e^{i2x}{\overline {b_{2}}}e^{-i2x}+\cdots \right)\mathrm {d} x\\[6pt]&={\frac {1}{2\pi }}\int _{-\pi }^{\pi }\left(a_{1}{\overline {b_{1}}}+a_{1}{\overline {b_{2}}}e^{-ix}+a_{2}{\overline {b_{1}}}e^{ix}+a_{2}{\overline {b_{2}}}+\cdots \right)\mathrm {d} x\end{aligned}}$
As is the case with the middle terms in this example, many terms will integrate to $0$ over a full period of length $2\pi$ (see harmonics):
    ${\begin{aligned}\sum _{n=-\infty }^{\infty }a_{n}{\overline {b_{n}}}&={\frac {1}{2\pi }}\left[a_{1}{\overline {b_{1}}}x+ia_{1}{\overline {b_{2}}}e^{-ix}-ia_{2}{\overline {b_{1}}}e^{ix}+a_{2}{\overline {b_{2}}}x+\cdots \right]_{-\pi }^{+\pi }\\[6pt]&={\frac {1}{2\pi }}\left(2\pi a_{1}{\overline {b_{1}}}+0+0+2\pi a_{2}{\overline {b_{2}}}+\cdots \right)\\[6pt]&=a_{1}{\overline {b_{1}}}+a_{2}{\overline {b_{2}}}+\cdots \\[6pt]\end{aligned}}$
More generally, if $A(x)$ and $B(x)$ are instead two complex-valued functions on $\mathbb {R}$ of period $P$ that are square integrable (with respect to the Lebesgue measure) over intervals of period length, with Fourier series
    $A(x)=\sum _{n=-\infty }^{\infty }a_{n}e^{2\pi ni\left({\frac {x}{P}}\right)}$
and
    $B(x)=\sum _{n=-\infty }^{\infty }b_{n}e^{2\pi ni\left({\frac {x}{P}}\right)}$
respectively. Then
Even more generally, given an abelian locally compact group G with Pontryagin dual G^, Parseval's theorem says the Pontryagin–Fourier transform is a unitary operator between Hilbert spaces L$^2$(G) and L$^2$(G^) (with integration being against the appropriately scaled Haar measures on the two groups.) When G is the unit circle T, G^ is the integers and this is the case discussed above. When G is the real line $\mathbb {R}$, G^ is also $\mathbb {R}$ and the unitary transform is the Fourier transform on the real line. When G is the cyclic group Z$_n$, again it is self-dual and the Pontryagin–Fourier transform is what is called discrete Fourier transform in applied contexts.
Parseval's theorem can also be expressed as follows:
Suppose $f(x)$ is a square-integrable function over $[-\pi ,\pi ]$ (i.e., $f(x)$ and $f^{2}(x)$ are integrable on that interval), with the Fourier series
    $f(x)\simeq {\tfrac {1}{2}}a_{0}+\sum _{n=1}^{\infty }{\bigla_{n}\cos(nx)+b_{n}\sin(nx){\bigr )}.$
Then
    ${\frac {1}{\pi }}\int _{-\pi }^{\pi }f^{2}(x)\,\mathrm {d} x={\tfrac {1}{2}}a_{0}^{2}+\sum _{n=1}^{\infty }\left(a_{n}^{2}+b_{n}^{2}\right).$

## Notation used in engineering

In electrical engineering, Parseval's theorem is often written as:
    $\int _{-\infty }^{\infty }{\bigl |}x(t){\bigr |}^{2}\,\mathrm {d} t={\frac {1}{2\pi }}\int _{-\infty }^{\infty }{\bigl |}X(\omega ){\bigr |}^{2}\,\mathrm {d} \omega =\int _{-\infty }^{\infty }{\bigl |}X(2\pi f){\bigr |}^{2}\,\mathrm {d} f$
where $X(\omega )={\mathcal {F}}_{\omega }\{x(t)\}$ represents the continuous Fourier transform (in non-unitary form) of $x(t)$, and $\omega =2\pi f$ is frequency in radians per second.
The interpretation of this form of the theorem is that the total energy of a signal can be calculated by summing power-per-sample across time or spectral power across frequency.
For discrete time signals, the theorem becomes:
    $\sum _{n=-\infty }^{\infty }{\bigl |}x[n]{\bigr |}^{2}={\frac {1}{2\pi }}\int _{-\pi }^{\pi }{\bigl |}X_{2\pi }({\phi }){\bigr |}^{2}\mathrm {d} \phi$
where $X_{2\pi }$ is the discrete-time Fourier transform (DTFT) of $x$ and $\phi$ represents the angular frequency (in radians per sample) of $x$.
Alternatively, for the discrete Fourier transform (DFT), the relation becomes:
    $\sum _{n=0}^{N-1}{\bigl |}x[n]{\bigr |}^{2}={\frac {1}{N}}\sum _{k=0}^{N-1}{\bigl |}X[k]{\bigr |}^{2}$
where $X[k]$ is the DFT of $x[n]$, both of length $N$.
We show the DFT case below. For the other cases, the proof is similar. By using the definition of inverse DFT of $X[k]$, we can derive
    ${\begin{aligned}{\frac {1}{N}}\sum _{k=0}^{N-1}{\bigl |}X[k]{\bigr |}^{2}&={\frac {1}{N}}\sum _{k=0}^{N-1}X[k]\cdot X^{*}[k]={\frac {1}{N}}\sum _{k=0}^{N-1}{\Biggl\sum _{n=0}^{N-1}x[n]\,\exp \left(-j{\frac {2\pi }{N}}k\,n\right){\Biggr )}\,X^{*}[k]\\[5mu]&={\frac {1}{N}}\sum _{n=0}^{N-1}x[n]{\Biggl\sum _{k=0}^{N-1}X^{*}[k]\,\exp \left(-j{\frac {2\pi }{N}}k\,n\right){\Biggr )}={\frac {1}{N}}\sum _{n=0}^{N-1}x[n]{\biglN\cdot x^{*}[n]{\bigr )}\\[5mu]&=\sum _{n=0}^{N-1}{\bigl |}x[n]{\bigr |}^{2},\end{aligned}}$
where $*$ represents complex conjugate.