An Interactive Guide To The Fourier Transform

Kalid, I love this, it’s brilliant. I’ve forwarded it to my nephew who is a non-verbal autistic 10-year-old with an IQ of 138, the ability to give you the day of the week for any date, and the ability to read a page of text if you just wave it at him. I feel we might hear more of him in the future.

I love this: “Wow, we’re finally seeing the source code (DNA) behind previously confusing ideas”. I’m applying your clear nuts-and-bolts approach to the atheist morality problem. I hope you will hear more of me in the future. I will keep this article as an example of how intellectual work should be done.

I can’t comment on the rigor or accuracy, but in my view this article is absolutely brilliant.
Please write some textbooks.

@Daniel
"What a shame" that the internet allows mediocre people to post any garbage as knowledge and pull it off! I repeat, this article is basically flawed because the analogy does not capture the true essence of the Fourier transform. I understand this article will provide some starting thought for beginners, but that’s pretty much all it should be used for. No doubt, the animations are nice and the article is well-written, but I have problem with the content, and anyone who understands Fourier transform well would have the same problem. It is unfortunate that some people are unable to accept healthy criticism without descending to provocative language.

I am a retired mathematics teacher and I have to say that one of the most inspired pieces of teaching that I have seen.

Wow, Thanks a lot, that was very informative and entertaining as well.

Hi Rick, for the yellow intervals, see my reply to Niko on July 7 2013.

0Hz is the speed of the cycle ingredient we’re considering, and the strength is how large it is. A strength of 0 means that cycle ingredient is not present in the signal.

[…] out this Interactive Guide to the Fourier Transform, which is essential for digital modulation onto radio […]

Question from a reader:

I was looking through your material on fourier transform and its by far the best explanation I have found anywhere. I spent a few days reading this and I understand everything except for one hiccup. Could u explain why there is the 1/N factor in the second equation? If you take a simple example, at t = 0, the formula should spit out the sum of strengths, but instead it spits out the average. Can you please lead me on the right track?

Thanks!
Abhi


Awesome, glad you enjoyed it! Great question about the 1/N term. There are several versions of the Fourier Transform, they key is realizing you need to average the strengths somewhere along the way when you apply the forward transform and then the reverse. If f(x) is the forward transform and F(x) is the reverse, then you can have:

f(x) = find the components
F(x) = average them, and recombine

or

f(x) = find the components, and average them
F(x) = recombine

or

f(x) = find the components, and apply a 1/sqrt(N) factor
F(x) = recombine, and apply a 1/sqrt(N) factor

Either way, after doing f(F(x)) or F(f(x)), i.e. apply the forward and reverse transforms, you need a 1/N term. Lots of books don’t explain this part!

Ah, reading again, your question is why is the average needed? Good question. If you have a single instant (a spike in time like (1 0 0 0 0 0 …)), then its magnitude should be shared among every possible frequency (which can claim it?). In other words, the frequency strengths would be (1/n 1/n 1/n 1/n 1/n…). A complete signal is just a series of instants, and its strength is averaged among every possbile frequency (however, each frequency has a phase shift, which increases for each instant, and may result in no “net” strength at a given frequency; still, having 0 because you had 1 and -1 constructively interfere is intuitively different from having 0 because there was no activity at all!).

Thanks Stephen, there’s been a lot of spammers lately (and getting through the anti-spam plugins on the site). They use “compliment spam” which sounds a lot like regular people, I’ll be updating the anti-spam plugins today.

[…] at Better Explained, Kalid also has a wonderful intro, with his own animated […]

I have read almost all ur posts and love it!

I dint know what Fourier transform is, one hour ago so this may be stupid question…
Fourier transform has all positive values then how can it give back a signal with negative values?? Similar question shateesh had asked about but ur answer dint satisfy me :frowning:
Can you add at least one graph of sample Fourier transform for people like me :stuck_out_tongue:
Also do you know about best algorithms to compare Fourier transform in order to compare two sound signal??

Your answer will really be appreciated.

Thanks Kalid. In a case like below where a DTFT pair exists for p_N[n] but you also have another term (constant a raised to power n) included, is there a simple method for finding the DTFT without doing crazy convolution integrals?

h[n] = a^n * p_N[n] where p_N[n] = u[n] - u[n-N] and 0 < a < 1

I am a junior in DFT, actually i just heard of fourier transformation for the first time (shame on me, i know), and tried the wikipedia explanation. and i was like ‘holy cow, am i dumb or is this thing too much for anyone’. Then i found your site… I <3ed it. I cant say i understand everything just yet, ill need to work a lot harder for that. But i did have a very clear theoretical and practical idea of what im about to study now.
Dnx a million, you make science sound like less science.
Nice job with the graphs, and good idea the challenge to try (0, 0, 4, 0). That was the point when i finally really understood

Ohh Thanks for your enlightening. Got the insight and felt happy. Love u man !

Hi
Great article, especially for somebody like me with no previous Fourier experience.
I have one question that is still confusing for me and it would be great if you could help:
on your animation for basic [0, 1] circles I get time points [1, -1]
When i calculate DFT(1,-1) (using the formula above or use calculator like this:http://calculator-fx.com/calculator/fast-fourier-transform-calculator-fft/1d-discrete-fourier-transform) I get amplitude of 2 for the 1Hz circle. I am expecting this value to be 1 (and not 2). What am I missing?

Thanks for your help!

Very helpful… Thank you.

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

@Pradip: Great question. The Fourier Transform is based on circular paths, which start at an angle of 0 [neutral], go positive [90 degrees], back to zero [180 degrees], negative [270 degrees], and back to neutral [360].

By aligning and delaying various circular paths, you can reach the negative numbers. In general, you can modify a positive signal by starting each cycle at the opposite side to make it negative. So, if a cycle would have started at 45 degrees, start it at 180 + 45 = 225 degrees instead.

Down the road I’d like to do a follow-up with more sample transforms and graphs, thanks for the suggestion.

@stmag: Great question. There are several variations of the FT and DFT equations, and one decision is where the “1/N” scaling factor is applied.

In the calculator linked, try entering [1 0 0 0 ]. The result is [1 1 1 1], which appears to have magnitude 4, even though the input signal had magnitude 1. It’s fine to list the frequency magnitudes as [1 1 1 1], if you remember you need to apply the 1/4 scaling factor when going back from frequency to time.

In my examples, I apply the scaling factor immediately, so [1 0 0 0] becomes [1/4 1/4 1/4 1/4]. For me, this makes it easier to see that the max magnitude of the [1/4 1/4 1/4 1/4] pattern will be 1, which is the time spike we have. Since the two sequences are shown side by side in the simulation, I think it’d be confusing to have the time segment [1 0 0 0] transform into the cycles [1 1 1 1].

Thanks for the question, it’s something to clarify in the post.

Thanks Pradip, glad it helped!

@eta: Awesome, glad it clicked for you. Wikipedia is a good reference to remember something you’ve forgotten, but it’s tough going to learn something new (in Math, anyway). I have to make sure I’m not fooling myself by trying simple examples and checking the intuitive result meets the actual one. Thanks for letting me know the examples helped.