The Inverse Discrete Fourier Transform

Learn how to get back to the time domain from a frequency-domain signal.

Complex sinusoids act as building blocks for all signals. This is similar to the xx, yy, and zz dimensions that define any point in 3-D space and the red, green, and blue colors that combine to form any color.

The DFT

We derive the DFT that takes a time-domain signal into the frequency domain. For a signal of NN length, x[n]x[n], we have:

X[k]=n=0N1x[n]ej2πkNn,k=0,1,,N1X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi\frac{k}{N}n}, \qquad k =0,1,\cdots,N-1

In other words, a time-domain signal is correlated with NN complex sinusoids having frequencies as integer multiples of 1/N1/N. A larger correlation output implies that the contribution of that sinusoid to that signal formation is large.

Going back into the time domain

The inverse discrete Fourier transform (IDFT) is defined as:

x[n]=1Nn=0N1X[k]e+j2πkNn,n=0,1,,N1x[n]=\frac{1}{N}\sum_{n=0}^{N-1}X[k]e^{+j2\pi\frac{k}{N}n}, \qquad n =0,1,\cdots,N-1

Although the expression looks similar to the DFT, there are some fundamental differences.

  • The signal of interest on which the operations are performed is X[k]X[k].
  • The plus sign in e+j2πkNne^{+j2\pi\frac{k}{N}n} implies counterclockwise rotation. This is a beautiful mathematical expression for the idea that the signal x[n]x[n] on the left-hand side is made up of complex sinusoids, each of them with a complex contribution factor of X[k]X[k].
  • The scaling by 1/N1/N is due to the fact that a single complex sinusoid magnitude is scaled up by NN during a DFT operation. On the other hand, the correction by 1/N1/N produces the original amplitude.

Let’s run this code to see how the inverse DFT brings the frequency-domain signal back into the time domain.

Get hands-on with 1400+ tech skills courses.