

An Interactive Guide To The Fourier Transform - lnmx
http://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/

======
haberman
I have desperately wanted to understand the Fourier Transform and signal
processing for a long time. In high school I read every tutorial or book I
could get my hands on, hoping that one would finally "click." The very first
thing I did when I got to college was approach the CS faculty and ask for
recommendations for literature that would help me understand it. My college
didn't have a signals and systems class, but a few years later I heard that
Richard Lyons's book "Understanding Digital Signal Processing" was supposed to
be the friendliest book on the subject so I bought and read it.

I say all of this just to impress upon you that I was _serious_ about wanting
to understand this stuff.

Despite all the effort, the FFT and DFT were never more than opaque blobs of
math to me, mysterious boxes that you put inputs into and could extract
outputs from (albeit in a very obscure format that seemed to involve complex
numbers for no apparent reason). I sort of gave up and forgot about it for
several years.

Recently I came upon Stuart Riffle's article
([http://www.altdevblogaday.com/2011/05/17/understanding-
the-f...](http://www.altdevblogaday.com/2011/05/17/understanding-the-fourier-
transform/)) which explained it in terms of the circular approach that this
article adopts. Rotate the waveform about the origin at the frequency of
interest and average the samples, simple as that.

I am not exaggerating when I say that after 10 minutes of reading that
article, I had an understanding that years of highly motivated knowledge-
seeking had not given me.

I take a few things from this story. One is that, given a specific learner
(ie. me), some ways of explaining things are infinitely better than others. I
mean that literally, because this new, circle-based explanation gave me an
understanding that I literally was not capable of achieving with all of the
symbolic and algebraic explanations I had studied previously. Judging from
other comments I've read, I'm not alone in this, which says to me that there
could be exciting advances ahead of us in the way we learn. Just as the Khan
Academy is making learning more accessible, I hope that it could also help
discover and widely disseminate the _best_ explanations for things. Sal Khan
is very good at explaining things but we can't expect him to think of
everything. This fantastic DFT explanation was created by a random
systems/graphics programmer; I hope it will percolate into DFT curricula until
everyone who is learning about the subject is at least exposed to it.

My other takeaway, though, is that hard-core math people really think in a
fundamentally different way than I do. I'm a highly intuitive thinker, and
formulas are a sea of meaningless symbols to me without an intuitive
understanding of what is going on. That someone could understand the DFT
_without_ thinking in terms of the circular interpretation is amazing to me. I
now know that I am indeed capable of understanding the concept, but only by
thinking about it in a different way than most math people do. I suspect,
however, that my intuitive way of thinking about it would be more difficult to
formalize and make rigorous, so in the end I am dependent on the
mathematicians and their way of thinking, even if I can't as easily understand
things in their terms.

(One other example of this: I think calculus is simpler to understand in terms
of infinitesimals rather than limits, but this is another example where the
infinitesimals are more difficult to make rigorous).

~~~
kalid
(Author here)

I totally agree. There are certain explanations out there which have orders-
of-magnitude differences in ease of understanding (seeing i as a rotation,
seeing radians as the "mover's perspective", seeing integrals as "better
multiplication"). My personal mission is finding these aha! moments which
unravel years of confusing symbol manipulation. Calculus is definitely more
easily understood with infinitesimals vs. limits (ask any physics major or
engineer).

Personally, I'm looking forward to a world where the very best explanations /
analogies can bubble to the top. It's ridiculous that 200+ years after
Calculus was invented, we still teach it poorly, and nearly everyone
struggles.

Rigor & Intuition have a delicate balance in math. I see it as language:
children can speak fluently, even if they don't know the "rigorous" rules of
grammar & spelling [which are left to linguists]. I suspect the reason most
adults have trouble learning languages is because they try to start from rigor
(vocab lists and grammar structure) vs. absorbing an intuitive notion of
what's going on (and later refining with rigor, "me want food" => "I want
food").

~~~
anonymous
>Personally, I'm looking forward to a world where the very best explanations /
analogies can bubble to the top.

Please do keep in mind that there isn't one best explanation per subject, just
a "local maximum" explanation that is best to a class of people sharing a
similar way of thinking. Personally, the normal explanation of "representing
(approximating) a complex cyclic function as a linear combination of complex
trigonometric functions" made the most sense, while your explanation reads
like a convoluted mess of analogies. Therefore, try to have a few completely
different explanations per topic, rather than just the one which makes most
intuitive sense to you.

~~~
kalid
Definitely, appreciate the feedback here. It's easiest to share the
explanations that come to me, but I love finding a few different ways to look
at things, and as they emerge I like to include them.

As a simple example, here's the formula for adding the numbers 1...n:

[http://betterexplained.com/articles/techniques-for-adding-
th...](http://betterexplained.com/articles/techniques-for-adding-the-
numbers-1-to-100/)

The explanation I was originally given (pair the first and last items, and
count the pairs) seems gnarly because you have even/odd issues, off-by-one
errors, etc. There are others which click better.

------
meaty
Great article. I did Fourier Transforms in EE maths and could apply them but
never properly understand them. Typical calculation versus understanding.

The greatest graphic in this entire article is if you ask me:

[http://betterexplained.com/wp-
content/uploads/images/Derived...](http://betterexplained.com/wp-
content/uploads/images/DerivedDFT.png)

If all mathematics was explained like this, many less eyeballs would have been
gouged out of sockets.

~~~
kalid
Thanks. I love the conversion of equations into "math English" (that
particular diagram is from Stuart Riffle).

------
Jun8
Very good explanation, the smoothie-recipe decomposition approach is the one I
used when I taught this to students (I used drinks, but well). However, this
example really works only for teaching Fourier Series, which should be the
first step to the FT anyway. If you want to understand this stuff, the order
you should approach, I think is the Fourier Series, the FT (ignoring many
mathematical difficulties), the discrete-time FT, which has its own quirks.

------
mark-r
This line towards the end has a wonderful meta cleverness about it:

"The analogy is flawed, and that's ok: it's a raft to use, and leave behind
once we cross the river."

------
iooi
Ended up playing with the animation for a while, this is probably nothing new
but just thought I'd share a funny quirk I discovered. If you plug in the
fibonacci sequence for the time, you get symmetrical strengths and phases
(except for the first term):

For (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610) you get:

99.74 77.77:51.4 53.46:82.8 39.97:104.3 32.41:121.8 27.98:137.3 25.39:152
24.03:166.2 23.62:180 24.03:-166.2 25.39:-152 27.98:-137.3 32.41:-121.8
39.97:-104.3 53.46:-82.8 77.77:-51.4

Formatting magic:

99.74

1 - 77.78 51.4

2 - 53.46 82.8

3 - 39.97 104.3

4 - 32.42 121.8

5 - 27.98 137.3

6 - 25.39 152

7 - 24.03 166.2

8 - 23.63 180

7 - 24.03 -166.2

6 - 25.39 -152

5 - 27.98 -137.3

4 - 32.42 -121.8

3 - 39.97 -104.3

2 - 53.46 -82.8

1 - 77.78 -51.4

It works for all sequence lengths I've tried, although the app starts rounding
off when you start getting in the hundreds.. not that it matters in this case.
Couldn't find any relationship between the first constant and the pairs, nor
any relationship between the ratio of the pairs. Just something interesting.

~~~
napoleond
Without wanting to quell any enthusiasm (or cause too much confusion), it's
probably worth pointing out that _any_ real-valued time-series input will
result in a similarly symmetric pattern. I can't explain why that's true in a
way that makes sense with the analogy used here, but it is.

------
wglb
I studied frequency domain/time domain when I was in eight grade and high
school learning the technical aspects of how radios work. An oscilloscope was
a big boost for developing this intuition, particularly if hooked to a
microphone where you could see how various sounds showed up, then how tones
from the speaker of a radio would look. And using radios day-in, day-out, and
understanding how the spectrum of an AM radio signal looked.

I am glad that this analogy works for many of you here, but I have always been
deeply suspicious of using analogies to teach concepts. For one thing, there
is always the part that "Ok, what I just told you and you learned is not true
in the following ways.." And the famous analogy between water in a pipe and
electricity being actually potentially dangerous to a new student. In fact, I
am sure that Fred remembers me railing "all analogies are False". And I have
had very little success teaching complex topics using analogies.

Incidentally, the AM radio spectrum is quite easy to understand. It wasn't
until an advanced signals course that I saw the math for the spectrum of an FM
signal. Much more complicated.

------
DoubleMalt
This is indeed an awesome explanation. And I'm regularly shocked when people
do not explain Fourier Transform as generalization of Fourier Series.

This makes it quite intuitive to me (well, at least as far as FT can be
intuitive ...)

------
philip1209
This amuses me. My friend and I spent part of our time at a bar trying to
explain Fourier transforms to her philosophy major boyfriend. My explanation
of how optical trapping using Snell's law and light momentum went much more
smoothly.

------
derleth
> music recognition services compare recipes, not individual drops

What does this mean? I understand 'recipes' here, but what's 'drop' in this
context? A continuation of the food metaphor?

~~~
kalid
I should probably change that. In this case, a "drop" would be something like
a single second of audio.

Instead of saying "Does this single second of audio show up in other songs?"
we should ask "Do the frequency components in this song show up in other
songs?" (similar ratios of bass, treble, etc.)

