24 comments

[ 3.7 ms ] story [ 46.7 ms ] thread
My only quibble is that the article is about the discrete Fourier transform.
>The Fourier Transform is one of deepest insights ever made.

No, it is not. In fact it is quite a superficial example of a much deeper theory, behind functions, their approximations and their representations.

It is more about the duality between the amplitude and frequency spaces and conversion between them. A bit similar to Hadamard gate for transforming a quantum state from computational basis to diagonal basis.
If you're dealing with computer graphics, audio, or data analysis, I highly recommend learning Fourier transforms, because they explain a whole lot of things that are otherwise mysterious.
My favorite application of the Fourier transform is converting convolution into pointwise multiplication. This is used to speed up multiple sequence alignment in bioinformatics.
What is the bioinformatic application? Could you point me towards some programs that use this?
If anyone wants to learn about the 2D DFT, the best explanation I've ever read was the relevant chapter in Digital Image Processing by Nick Efford.

If anyone wants to see my favorite application of the 2D DFT, I made a video of how the DFT is used to remove rainbows in manga on Kaleido 3 color eink on Kobo Colour:

https://youtu.be/Dw2HTJCGMhw?si=J6dUYOj2IRX1nPRF

The absolute best teaching of the Fourier transform I've ever encountered is the extremely bizarre book "Who is Fourier?"

https://www.amazon.com/Who-Fourier-Mathematical-Transnationa...

This was my first exposure to the Fourier transfer. I also highly recommend this book. It was recommended to me by the head of the math department at university.
Brilliant!

I would just suggest the author to replace the sentence “99% of the time, it refers to motion in one dimension” with “most of the time” since this is a mathematical article and there’s no need to use specific numbers when they don’t reflect actual data.

On thing that is often overlooked but should be emphasized is that the considered frequencies are fixed values while the phase shifts are continuous values. This creates tons of downstream problems

If your underlying signal is at frequency that is not a harmonic of the sampling length, then you get "ringing" and it's completely unclear how to deal with it (something something Bessel functions)

Actually using DFTs is a nightmare ..

- If I have several dominant frequencies (not multiples of the sampling rate) and I want to know them precisely, it's unclear how I can do that with an FFT

- If I know the frequency a priori and just want to know the phase shift.. also unclear

- If I have missing values.. how do i fill the gaps to distort the resulting spectrum as little as possible?

- If I have samples that are not equally spaced, how am I supposed to deal with that?

- If my measurements have errors, how do I propagate errors through the FFT to my results?

So outside of audio where you control the fixed sample rate and the frequencies are all much lower than the sample rate... it's really hard to use. I tried to use it for a research project and while the results looked cool.. I just wasn't able to backup my math in a convincing way (though it's been a few years so I should try again with ChatGPT's hand-holding)

I recommend people poke around this webpage to get a taste of what a complicated scary monster you're dealing with

https://ccrma.stanford.edu/~jos/sasp/sasp.html

You can use single bin DFTs and not FFTs? Basically use precomputed twiddles for a specific frequency. FFT is only fast because it reuses operation across multiple frequencies, but if you need a specific frequency instead of the whole spectrum, then a single-bin DFT makese sense, right?

https://github.com/dsego/strobe-tuner/blob/main/core/dft.odi...

I've decided math isn't my thing. The first part of the article I couldn't stop thinking "how the hell would you construct a banana filter?" And the entire smoothie metaphor seemed to describe nothing at all.

Then there was something about circles and why do some people call them some other silly thing?

So far, so utterly meaningless, as far as I could tell. just seemed like meaningless babble to make even a kindergartner feel comfortable with the article, but it didn't seem to have communicated much of anything, really.

Then there were circles. Some of them were moving, one of them had a sinus wave next to it and some balls were tracing both in sync, indicating which part of the sinus wave equalled which part of the circle I guess?

I understood none of it.

I asked chat gpt to explain to me, i think it has read this article cause it used the smoothie analogy as well. I still don't understand what that analogy is meant to mean.

Then finally I found this: If someone plays a piano chord, you hear one sound. But that sound is actually made of multiple notes (multiple frequencies).

The Fourier Transform is the tool that figures out:

which notes (frequencies) are present, and how loud each one is

That, finally, makes sense.

The piano analogy is incomplete. First, of all, a piano constructs sounds by combining multiple string sounds in a unique manner. But the idea behind transforms (Fourier being a particular case) is that you can take a function (“sound”) that isn’t necessarily produced by combining components and you can still decompose it into a sum of components. This decomposition is not unique in the general case as there are many different transforms yielding different results. However, from the mathematical (and i believe, quantum mechanical) standpoint, there is full equivalence between the original function and its transforms.

The other important point is that Fourier doesn’t really give you frequency and loudness. It gives you complex numbers that can be used to estimate the loudness of different frequencies. But the complex nature of the transform is somewhat more complex than that (accidental pun).

A fun fact. The Heisenberg uncertainty principle can be viewed as the direct consequence of the nature of the Fourier transform. In other words, it is not an unexplained natural wonder but rather a mathematical inevitability. I only wish we could say the same about the rest of quantum theory!

I have not read the whole article. But, what is shown at the beginning is not the Fourier Transform, it is the Discrete Fourier Transform (DFT).

Though the DFT can be implemented efficiently using the Fast Fourier Transform (FFT) algorithm, the DFT is far from being the best estimator for frequencies contained in a signal. Other estimators (like Maximum Likelihood [ML], [Root-]MUSIC, or ESPRIT) are in general far more accurate - at the cost of higher computational effort.

Will I ever be able to learn the Fourier transform?
I'd never thought about it in this way before but the idea of writing a number as a decimal (or other) string of numerals, bears some resemblance to a Fourier transform.

Think of the components of a written number: ones, tens, hundreds etc which have a repeating pattern. Digits are inherently periodic. Not too far from periodic basis functions.

Both involve breaking something down into periodic components, and reversing the process by adding up the components.

Clever, but only really appropriate for the most significant digit.

The one's digit gives info about parity (odd/even), but nothing else.

This is great! I would love to see this method extended to the full Pasterski–Strominger–Zhiboedov (PSZ) triangle, where Fourier transforms are the binding relationships tying together soft theorems and memory effects. Such an extended guide would be a powerful interaction encompassing also vacuum transitions and Ward's identities. A "smoothie" combining the theory of relativity, quantum field theory and quantum gravity might make those subjects more accessible.