# Parseval's Theorem

Discover the relation between signal energy in the time and frequency domains.

We'll cover the following

The energy of a length-$N$ discrete-time signal is defined as:

$E_x = \sum_{n=0}^{N-1} |x[n]|^2$

Parseval’s relation links the energy of a signal in the time domain to its energy in the frequency domain. In the equation form, it is expressed as:

$\sum _{n=0} ^{N-1} |x[n]|^2 = \frac{1}{N} \sum _{k=0} ^{N-1} |X[k]|^2$

In other words, the energy of a signal in the time domain is equal to its energy in the transform domain after scaling by $1/N$.

## Derivation

From the definition of the inverse discrete Fourier transform, we have:

$x[n]=\frac{1}{N}\sum_{k=0}^{N-1}X[k]e^{+j2\pi\frac{k}{N}n}$

Using this in the expression for the energy of a signal:

\begin{align*} \sum _{n=0} ^{N-1} |x[n]|^2 &= \sum _{n=0} ^{N-1} x[n]\cdot x^*[n]\\ &= \sum _{n=0} ^{N-1} x[n]\cdot \left(\frac{1}{N}\sum_{k=0}^{N-1}X[k]e^{+j2\pi\frac{k}{N}n}\right)^* \end{align*}

From here, we can rearrange the terms after conjugation.

\begin{align*} \sum _{n=0} ^{N-1} |x[n]|^2 &= \sum _{n=0} ^{N-1} x[n]\cdot \frac{1}{N}\sum_{k=0}^{N-1}X^*[k]e^{-j2\pi\frac{k}{N}n}\\ &= \frac{1}{N}\sum_{k=0}^{N-1}X^*[k]\underbrace{\sum _{n=0} ^{N-1} x[n] e^{-j2\pi\frac{k}{N}n}}_{X[k]}\\ &= \frac{1}{N}\sum_{k=0}^{N-1}|X[k]|^2 \end{align*}

## Intuition

Intuitively, going into the frequency domain doesn’t alter the energy contents of the observed signal. In mathematics, this is known as a unitary transformation.

As far as the scaling factor of $1/N$ is concerned, recall that the DFT outputs a sum of complex sinusoids. For a constant input, this kind of sum magnifies the input by $N$. This is why a reduction by $1/N$ is necessary to balance the energy in the two domains. Due to this reason, many software routines define the DFT and inverse DFT with the same scaling factor of $1/\sqrt{N}$.

Get hands-on with 1200+ tech skills courses.