MIT 6.300 — Lecture 12
Discrete Fourier Transform I
§ Lecture: Discrete Fourier Transform
The problem with Fourier transforms is that, unlike Fourier series, they are not easily expressible in code: they're continuous data, not discrete. The discrete Fourier transform, as its name suggests, is the fix for this.
Definition. Given a possibly aperiodic DT signal and any positive integer , the discrete Fourier transform (DFT) of is the same as the Fourier series of the periodic signal .
Remark. Recall that this means the DFT of is an array , where denotes the coefficient of in the DT Fourier series of . Note that is an array of length .
Importantly, it does not make sense to ask for “the DFT of ”. One must always also specify a length .
In some ways, the DFT is the culmination of all of the Fourier analysis in 6.300 up to this point: it combines the signal-aperiodicity of the DTFT with the computational feasibility of the DTFS.

Example. The DFT of for is the same as the Fourier series of , plotted below.

Example. The DFT of for , plotted below, differs from the Fourier series of .

The reason why is that does not have period ; its period is . However, the DFT of for does match the Fourier series of the signal pictured below.

Unsurprisingly, here's what the analysis and synthesis equations for the DFT look like.
Theorem. (DFT Formulas) Given a DT signal and a positive integer , the DFT of is , which satisfies for all .
These formulas look exactly the same as the DT Fourier series formulas presented in Lecture 5, expectedly.
§ Lecture: DFT vs. DTFT and Windows
We know the relationship between the DFT and the DTFS: they're exactly the same. What about the DFT and the DTFT?
Theorem. (DFT vs. DTFT) Consider a DT signal and a positive integer . Define a new signal as follows:
Suppose is the DFT of , and is the DTFT of . Then .
In other words, is the result of taking samples from at an interval of and dividing all samples by .
Proof: Recall from Lecture 7 that the DTFT is defined via . Comparing with the formula for the DFT, the relationship is immediate.
The diagram below paraphrases the statement of the theorem above.

To summarize: the DFT of a DT signal can be thought of as either…
… the DTFS of a periodic extension of , or…
… a scaled, length- sampling of the DTFT of a windowed version of , using a window of length .
Note that the constant decides the size of the “window” that our DFT takes into account.
Problem. Compute the DFT of the pure-frequency DT signal for varying window sizes .
Solution: Equivalently, we compute the DTFT of , where is the signal given by:
Note that the DTFT of itself looks like the following:
Now we invoke a “dual” of one of the properties from Lecture 7: the DTFT of is just .
Thus, the DFT of is the result of sampling from at intervals of and dividing the samples by .

For and (shown above), the resulting DFT reads as strong evidence that the original DT frequency was .

For (shown above), the resulting DFT is less informative…
We can get more informative DFTs by increasing the window size . The larger the value of , the finer our frequency resolution, and the more samples we get to read.

§ Recitation: Spectral Analysis (Interpreting the DFT)
Problem. A DT signal is produced by sampling from a CT signal with sampling frequency , and its DFT is computed using a window length of . Assume is periodic modulo . What does say about the original CT signal?
Solution: Since is periodic modulo , the DFT of is very informative: it's exactly the same as the DTFS of .
The rest is dimensional analysis. Note that is the coefficient of in the DTFS, so it represents the strength of the discrete-time angular frequency .
In continuous-time, this translates to (recalling Lecture 4) a continuous-time angular frequency of .
More generally, we can say the following:
Theorem. (Spectral Analysis) The DFT measures the strength of the continuous-time cyclical frequency .
Problem. Suppose , and consider a DFT using window size . Given that and all other entries of are zero, what can we say about the original CT signal?
Solution: The original CT signal probably had a cyclical frequency of Hz.
Notably, the data provided by the DFT is discrete, so the set of CT frequencies it may tell us about is also discrete.
Definition. Two angular frequencies and are resolved (that is, distinguishable in the DFT) if , where is the frequency resolution. (For cyclical frequencies, it looks like .)