The DFT is trivial.
The DFT is trivial.
The manuals you cite cover several different transforms (not just the DFT) as well as the complexities of the FFT.
It doesn’t have to be a sine wave. You could correlate your signal to a fart sound (or a set of them). It’s a valid transform but it would not be invertible—given a vector of scalar values showing how much your signal resembled each type of fart, you could not reconstruct the original signal.
However you can do that with the FT. It’s invertible and you can recover the signal from the spectrum. So in some sense it doesn’t lose information. Energy in the signal is equal to energy in the Fourier spectrum.
Part of that complexity is because the FFT only works on power-of-2 length (e.g. 1024) input vectors so they have special tricks to work with arbitrary length data.
The DFT has no such restriction.
I’ve read somewhere that if you apply dynamic programming to the DFT (recursive sub problems, memoization) then you end up with the FFT. One of these days I’ll try to derive that.
The correlation of a signal s with a sine wave of frequency f just gives the signal power at that frequency.
Repeat for a set of regularly spaced of frequency values from 0 to Fs/2 (the maximum frequency you can work with with data sampled at Fs) and you have the DFT. You can even clump the sine waves into a matrix and your DFT gets reduced to a single matrix multiply.
This is much easier to reason about than worrying about how an FFT works which is just a speed optimization (which can be derived from dynamic programming applied to the DFT).
For someone doing signal processing the results are the same. Introducing the FFT without making reference to the DFT is wrapping the subject up in an air of mystery.