An Interactive Guide To The Fourier Transform

@Murugesh: Thanks for the note! Wavelets would be a good follow-up. I need to learn more about them.

@Roman: Really appreciate the kind words. Interesting, I don’t know much about probability distribution functions and their relationship to the Fourier Transform, but something to study!

Hello Khalid,

All I have to say is that you have put together a wonderful article. Your style of writing immensely helps in removing the apprehension in the mind of the reader of having to deal with a complex topic.

I am an Image Processing/Computer Vision enthusiast. I plan to write articles in this domain the help students and professionals maneuver complex topics in these subjects by presenting them in a easy to grasp manner

My article on Fourier Transforms @ http://jasexplains.blogspot.in/ is the first write-up. Would be very thankful if you can provide your feedback.

JAS

Hi Thomas, no problem! I should probably clarify that point. In the article, correct, I do the averaging (1/N) in the forward step.

I think there is a mistake where you introduce the formulas in the end. The formula for timepoint and frequency are swapped. The frequency one should contain the 1/N factor, like in the appendix.
Anyhow, thank you so much for this!

Sorry, I didn’t read the part where you said you preferred to move the factor to the inverse. I was just trying to produce the same results as in the article

@JAS: Glad you’re enjoying it! Yep, part of writing is getting in the head of the reader and gently going down the path, vs. blasting people with all the details up front :). I’ll check out your article later today.

@Hugo: Thanks for the note! I love hearing about other people doing their explanations. Everyone has a different style, so looking forward to checking out yours.

@zenbowman: More than welcome.

@Burke: Thanks! Hoping to do some more material on Calculus, Trig, etc. organized into a book. Stay tuned…

@Tim: Thanks so much – exactly, why can’t we be human beings when talking about math? Sure, math can be written down in a way that can be used by machines, but it doesn’t mean we have to think and talk like them. Let’s use metaphors/visualizations to make the rigorous proofs more palatable.

@andeww, Erti-Chris: Thanks!

Not good at all. I was confused and you added spices into it.
The animation controller are the worst. I didn’t get what the those number were.
sorry.

Cool! Thanks!

I’m nodding a paragraph in, this is already very exciting and well written.

Heh – can’t please everyone, and you’ll go crazy trying.

You got it: if you’re trying to compute the Fourier Transform for every frequency (i.e., to get the strength of every ingredient) then you need to generate every possible candidate and loop through (if on a computer, for example).

In the real world, there are tricks to avoid this manual iteration. For example:


From http://www.math.hmc.edu/funfacts/ffiles/20003.3.shtml
In fact, your ears do Fourier series automatically! There are little hairs (cilia) in you ears which vibrate at specific (and different) frequencies. When a wave enters your ear, the cilia will vibrate if the wavefunction “contains” any component of the correponding frequency! Because of this, you can distinguish sounds of various pitches!


So, our ear is setup in a way that each hair is tuned to react at different frequencies. As sound comes in, different hairs vibrate (extracting the strength of the pitch it’s detecting). Nature usually has ways to do everything in parallel, while our computers manually crunch through.

Hi Kalid,

I am myself writing my own website with math/signal processing/electronics content and, although I am probably not doing it as well as you are, I do believe these complex subjects can be explained in a simple way. This explanation of the Fourier Transform is an excellent example of it. Thanks.

[…] it, you think you see valuable information.  But what exactly is a Fourier Transform?  Check out the interactive guide to Fourier Transform so you can learn […]

Amit, your feedback would carry more weight if 1) I claimed this were a math-first encyclopedic article (re-read the intro) and 2) you didn’t purport to be the arbiter of what could or could not be written on the matter.

I don’t know of any factual errors, but am happy to correct them. Stylistically, it’s your opinion that the ideal introduction to the transform lies in the mechanics (changing variables) not the “ingredient-first” viewpoint it enables. Let’s agree to differ here.

Thanks Will! Isolating the individual frequencies is tricky. Let me expand on the analogy in the post.

Imagine you have a bunch of toy cars, racing around a circular track. Some are going fast, some are going slow, and our “function” is the total position of all these cars. (Just add up the coordinates for all the cars – that’s our function. We could have an East-West position and North-South position over time.)

Now, how can we find out how many cars are going at, say, 10mph exactly?

We can put a conveyer belt around the track, and run it like a treadmill (against the car’s direction). If this treadmill is going 10mph, then cars going exactly that speed will stay still. The other cars are going either faster or slower, and will continue to circle around the track (over time, their average contribution will be nothing).

Only cars matching the speed of 10mph will stick around, and can be measured. Maybe we see 3 cars going that speed. We might write “The strength of the 10mph speed is 3 cars”.

The Fourier Transform takes the notion that any signal really has a bunch of spinning circular paths inside. If we can take our signal and “run it on a treadmill”, then we can extract the contribution, if any, at every speed (frequency).

The fancy equation e^{i2pix} is a way to create a circular path of frequency “x”, and we put in a negative sign because it is running backwards, getting e^{-i2pix}. That is just the treadmill: we multiply in our signal, and the overall result (if anything) is how many cars were at that speed, so to speak.

Hope that helps!

(Btw, appreciate the support. Writing online, you quickly realize you’ll get feedback from all types. I feel no strong obligation to help people who can’t enjoy a freely-provided resource, especially with feedback is as inactionable as “I didn’t get it”).

Thanks Kalid!

So any circuit / algorithm that wanted to do a Fourier transform effectively has to generate its own set of frequencies and test the signal against those? Or do something equivalent, but probably a bit more efficient maybe.

Perhaps you should offer the whining bores their money back! :wink:

Great article Kalid. Thanks!

However, while it explains how the signal components are put together, it doesn’t really seem to explain how they can be extracted. I don’t understand the process of isolating the individual frequencies from the mix.

I’m amazed at the number of bored and boring people who think it’s ok to criticise your explanation. They clearly all think they’re very clever, but none of them mention where we can find their superior explanation. This is the internet people, if you don’t like what you see, move on - don’t bore the rest of us with your smug whining!

[…] Interactive guide to the Fourier Transform. Fourier toy. Mathematica: Sound and […]

[…] Understanding the Fourier Transform [video] Fourier Transform is “a unitary transformation between two different Hilbert spaces” [stack exchange] Fourier Transform [Better Explained] […]

This is golden. Thank you.

Hey Kalid great work on this one. I started learning about EEG signal analysis and the Fourier tranformation comes up constantly. I never heard of it before and for such a beginner this is a great, very helpful, article.
However to better understand everything about what you said I have a couple questions which I hope you can answer:

  1. Why is the strenght (amplitude) in every example 1? In reality, is the signal not comprised of waves of varying amplitude?

  2. In the interactive graphs, why does the time slot change its value when the amplitude (strenght) of the wave is changed from 1 to a bigger number? As I can tell the values “time” slot is giving us are saying at which point in time we do the measurement, but why does it change?

3)Does the Fourier transformation get the number of frequencies that is equal to the number of samples taken in a given time period that is being analyised?

4)Can we get a frequency from a Fourier Transformation that is a decimal number for example a frequency of 4.5 Hz?

Thanks, and I hope you keep making these!! :slight_smile: