# DFT Definition

Learn the intuition behind the DFT equation.

## We'll cover the following

Using our knowledge of complex signals and correlation, we can understand how the DFT helps us observe the spectrum of any signal.

## Complex signals

Let’s start with a discrete-time complex sinusoid $e^{j2\pi \frac{k}{N}n}$ that has a discrete frequency of $k/N$. For a time domain signal $x[n]$, the DFT is defined as follows:

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

While this might look intimidating, the process becomes easier to understand if the following conventions with regard to the variables are kept in mind:

- $X[k]$ is the $k$-th DFT output.
- $k$ is the DFT output index in frequency domain, and it ranges from $0$ to $N-1$ or $-N/2$ to $N/2-1$. Both are appropriate ranges since the frequency samples after $N/2$ are simply repeated on the left side too.
- The time domain index is represented, as before, by $n$, which ranges from $0$ to $N-1$.
- $N$ is the number of frequency bins. It can be the same as the number of input data samples, but usually, the next larger power of 2 is preferred.

As we can see from the equation above, the signal is being multiplied with our complex sinusoid. What is the result of an operation like this? This is what we’ll discuss after covering the real version of the DFT.

Get hands-on with 1200+ tech skills courses.