
The Fourier Transform, explained in one sentence - ggonweb
http://blog.revolutionanalytics.com/2014/01/the-fourier-transform-explained-in-one-sentence.html
======
karpathy
Fourier Transform became trivial to me when I noticed that it's just a basis
transform, as you would do with ANY other basis. Except this basis happens to
be sine and cos waves of different frequencies.

i.e. you view the entire signal in the original domain as a single point in
space of dimensionality equal to number of measurements, and then you project
it onto the new (fourier) basis. For example, one of the new basis vectors
could be sine signal of some frequency k. You find the component of the
original signal along this new basis just as you would do for any other basis
vector, with a dot product. The only slight complication is that to get the
phase information you have to actually dot with a cosine at that frequency as
well. The confusing e^ix complex number multiply "hides" the fact that we are
actually doing two simultaneous dot products (since e^ix = sinx + icosx): one
with the sine and the other with the cos, to get both the frequency and phase.

this is the intuition for DFT but for FT you just have infinite-dimensional
vector space, done. This is much more intuitive to me than "spinning a signal
in circle", which I personally find very to be a very confusing statement.

EDIT: granted, basic linear algebra concepts (vectors, basis transform)
needed.

~~~
eridius
The isolated phrase "spinning a signal in a circle" is confusing, but the
accompanying visualization of tracking a point on a spinning speaker cone is
something that can be visualized.

More generally, your explanation may make sense to you, but it makes no sense
to a layperson (i.e. me). But the linked short description, along with the
speaker cone visualization, does make a reasonable amount of sense.

I've also seen a similar description in the past with accompanying animated
GIFs illustrating the point, instead of the prose about a spinning speaker
cone. I thought the animated GIFs made it even easier to understand. Sadly, I
don't remember where I saw that.

~~~
ggonweb
Is it this
[https://upload.wikimedia.org/wikipedia/commons/1/1a/Fourier_...](https://upload.wikimedia.org/wikipedia/commons/1/1a/Fourier_series_square_wave_circles_animation.gif)

~~~
eridius
I've seen that before, and it's neat, but I don't think that's what I'm
remembering.

------
ggonweb
[http://betterexplained.com/articles/an-interactive-guide-
to-...](http://betterexplained.com/articles/an-interactive-guide-to-the-
fourier-transform/)

The animations are here

------
Terr_
I like to think of it like a vertical line of individual LEDs that
sequentially shine to show current amplitude. (Like a Cylon visor or KITT the
car.)

Sweep it sideways across a dark area, and you will see the waveform as an
afterimage.

But start to _spin_ it around the center, and you get a blob of light, one
that becomes tighter and more symmetric whenever the spin-rate approaches the
rate of a repeating subpattern.

~~~
ams6110
THIS makes the most sense to me of any of the explanations on this page.

------
platz
i.e. color coding is necessary because math notation is typically expressed
with ambiguous assumptions in service to absolute terseness.

As far as I can tell the only time it's attempted to combat this is in proofs.

Note that in a real paper or textbook, such a detailed description explaining
each term would most definitely be absent, even without the color coding.

~~~
bkcooper
_Note that in a real paper or textbook, such a detailed description explaining
each term would most definitely be absent, even without the color coding._

I disagree. In a textbook, it is very unlikely (and would be a sign of a badly
written book) that there are terms in a displayed equation that are genuinely
undefined. The worst case scenario is that they are not defined immediately
next to the equation and presume that you have read the preceding material.

~~~
cjslep
> The worst case scenario is that they are not defined immediately next to the
> equation and presume that you have read the preceding material.

The textbooks I have used written by Russian mathematicians are almost
entirely equation after equation of "explanation", derived from previous
equations with the exact transformations in between left as an exercise for
the reader.

There's a very distinct cultural difference for sure, but that doesn't make
these textbooks less _real_.

Edit, to clarify: A lot of terms are not explained in natural language either
as their very definition is an equation of other terms (feel free to apply
recursively).

------
shubhamjain
One thing I don't fathom is why FT is always explained in terms of circles?
For me it was always confusing this way; the concept was much more graspable
when visualized in the terms superposition of sinusoidal waves.

~~~
waldir
Because those sinusoidal waves are merely projections (in the real and complex
plane) of the true elemental component of the FT, the complex exponential,
which is really a helix:
[http://m.eet.com/media/1068017/lyons_pt2_3.gif](http://m.eet.com/media/1068017/lyons_pt2_3.gif)

A while ago I made some drafts for a series of diagrams to help visualize this
([http://imgur.com/vEcnVdn](http://imgur.com/vEcnVdn)) but unfortunately never
got around to finish it
([https://en.wikipedia.org/wiki/Wikipedia:Graphics_Lab/Illustr...](https://en.wikipedia.org/wiki/Wikipedia:Graphics_Lab/Illustration_workshop/Archive/Sep_2013#RfC_-
_Visualization_of_exponential_function)).

Anyway, for those who find it easier to think of sinusoidal curves, the
animation in the Wikipedia article
([https://commons.wikimedia.org/wiki/File:Fourier_transform_ti...](https://commons.wikimedia.org/wiki/File:Fourier_transform_time_and_frequency_domains_\(small\).gif))
is a very good visualization (also, BetterExplained's rant on sines being
explained as circles may resonate:
[http://betterexplained.com/articles/intuitive-
understanding-...](http://betterexplained.com/articles/intuitive-
understanding-of-sine-waves/))

------
quarterwave
Think of FFT like music notation - a separation into notes, dynamics, and
tempo.

Alexander Graham Bell came up with the idea of increasing the capacity of
telegraph lines by combining several 'dit-da-dit' streams at different
pitches. He called it a 'harmonic telegraph'. The idea was that a mechanical
arrangement of reeds tuned to different pitches would pluck out each stream of
data. This insight eventually led to the invention of the telephone.

Finally, if 'orthogonal basis set' is difficult to understand, think of giving
someone 'left/right' driving directions. An FFT would then (roughly) be the
mathematical equivalent of 'driving directions' for a clip of music or speech.

------
ggonweb
Here is another visualized Fourier
[http://blog.matthen.com/post/42112703604/the-smooth-
motion-o...](http://blog.matthen.com/post/42112703604/the-smooth-motion-of-
rotating-circles-can-be-used)

------
j2kun
This is an extremely confusing sentence. My sentence would be:

> Every "nice" function can be uniquely decomposed into complex exponentials,
> which in some contexts represent physical frequencies.

~~~
fizx
It's confusing because it explains "how." Your sentence explains "what," which
misses the original point.

~~~
j2kun
If you understand the "what" deeply, then the "how" is trivial. The
decomposition is in the sense of an orthogonal basis, and so to compute the
transform you just do a dot product in the relevant vector space.

------
marmaduke
Neat idea but this is a discrete Fourier transform (the original is
continuous, with an integral), and it's only "explained" in the context of
signal processing. And even then, the explanation is imperative.

I agree with another commenter that the more useful explanation is in terms of
a change of basis.

~~~
lisper
And it also relies on the rather fuzzily defined concept of "a bunch of
points." Which bunch? Some particular bunch, or will any old bunch do?

~~~
dnautics
yeah, I don't like the idea of 'spin your signal around a circle', and prefer
'compare your signal to a perfect wave' (multiplication).

------
tylerneylon
The Fourier transform is the map between sound waves and music as written on a
staff.

That's an informal statement with some hand-waving since, for example, music
notation is discrete and sound waves aren't, but that's the main idea.

~~~
quarterwave
Saw this after posting my comment. I agree this is the simplest way to think
of an FFT.

------
vpeters25
I remember fondly a college lab experiment where we had to design a circuit
that modulated a signal on a carrier (basic FM modulator).

The prep for the lab included a paper running all the math predicting the
outcome, that included fourier transforms.

The moment we hooked the circuit's output to an spectral analyzer was the
first time I saw years of theoretical math resulting on something "tangible":
the carrier signal's peak and +/\- modulated peaks around it.

------
zwieback
I think all the efforts to make FT more intuitive are necessary because
representation of signals in terms of complex numbers is a tricky abstraction.
It's definitely worth taking the time to get comfortable with the idea of
representing a signal in the complex plane without trying to understand the FT
at the same time. Then all the spinning-around-a-pole verbiage makes a lot
more sense.

~~~
percentcer
I'm glad to hear that, as I didn't understand the pole analogy one bit.

------
ggonweb
Understanding the fourier transform (from archive)
[https://archive.today/ulPFk](https://archive.today/ulPFk)

(original link(dead) [http://www.altdev.co/2011/05/17/understanding-the-
fourier-tr...](http://www.altdev.co/2011/05/17/understanding-the-fourier-
transform/))

------
natch
>then there is frequency corresponding the pole's rotational frequency is
represented in the sound.

Parse error.

~~~
callum85
I can't actually work out what this was meant to say. Anyone?

------
Lambdanaut
For a `slightly` longer explanation: [http://betterexplained.com/articles/an-
interactive-guide-to-...](http://betterexplained.com/articles/an-interactive-
guide-to-the-fourier-transform/)

------
Adrock
Here's how to make this with MathJax:

[http://adereth.github.io/blog/2013/11/29/colorful-
equations/](http://adereth.github.io/blog/2013/11/29/colorful-equations/)

------
bbrennan
Felt inspired after reading this this morning and spent my Saturday hacking up
a little demo in d3:

[http://bbrennan.info/fourier-work.html](http://bbrennan.info/fourier-
work.html)

------
madengr
It just correlates a signal against harmonically related complex sinusoids.

~~~
cm127
Yeah, and don't forget to sum it all up and divide it by the number of
samples.

------
crimsonalucard
Maybe an animation would serve to be a better vehicle for understanding.

~~~
j_s
[https://en.wikipedia.org/wiki/File:Fourier_transform_time_an...](https://en.wikipedia.org/wiki/File:Fourier_transform_time_and_frequency_domains.gif)

~~~
Houshalter
All of these explanations remind me of this: [http://www.joe-
ks.com/archives_may2011/HowToDrawAnOwl.jpg](http://www.joe-
ks.com/archives_may2011/HowToDrawAnOwl.jpg)

------
dlwj
Would thinking of the fourier transform as breaking a signal down into basic
elements (like atoms) and figuring out how much of each atom is in the signal?
Each different value of "K" then is like using a Ph strip to measure
approximate energy b/c that particular strip reacts most strongly to a certain
k.

------
__m
What about phase?

~~~
dsego
The complex number contains both cos and sin components. Sine is the y axis,
cos is the x. From that you know the angle, i.e. phase, right?

------
jokoon
isn't this theorem used to transmit signals across DSL connexions ? isn't it
also used for wireless internet ?

------
bluecalm
As I switch off the moment I see "signal" or "wave" let alone spinning it
around the circle here is my take without any engineering intuitions:

-you can represent any (nice enough) function as sum of sines and cosines of given frequencies and amplitudes (frequency is how often the function hits the whole period, amplitude is by how much you multiple its value). The functions look this way: Amplitude* sine(x* freq)

-So you have your sines and cosines at various frequencies and you wonder what the amplitudes should be for every one o them so that if we add them all up we end up with the original function

-The idea to answer this question is to see how values of your sine or cosine correlate with values of original function. If it turns out that the original function is high in value when your sine/cosine is high in value then sine/cosine at this frequency needs to have higher weight than sine/cosine at other frequency where it doesn't correlate well with original function. Intuitively if you take functions which correlate well with original one with higher weight and those which doesn't with lower weight then you will have good approximation of the original function.

-Euler formula tells you what sine and cosine at given point are representing it as one complex number; to get value of sine/cosine at frequency different than 1 you need to multiple the argument by k*2PI (as frequency is given in beats/period and period is 2PI it's quite obvious why); So e^(xi) is value of cosx and sinx and e^(xik2PI) is value of those functions at frequencies different than 1.

So now let's see what this formula is:

-it's an average of things (1/N and a sum of N elements)

-those things are multplications of values of sine/cosine at given frequency at given point with value of original function at this point

-this average is going to be high if places where sine/cosine at given frequency is high and original function is high overlap (you multiple big number by big number) and low if described correlation is low; that's the concept of correlation

-the points are evenly spaced from 0 to n-1 (that's why n/N in the formula) and the sum goes over them.

That's it. No circles and spinning. The only trick is to realize that: e^(ix)
represent value of sine and cosine at x and e^(ixk2PI) represents value of
sine/cosine at frequency k (if k is 1, then it's standard sine/cosine as
everything simplifies).

One sentence explanation could be: the more sine/cosine at given frequency
correlates with original function the more that sine/cosine contribute to the
original function.

------
burtonator
you know, it should be possible to generate some of these sentences from the
mathematical notation directly to make concepts more understandable to the lay
person (and people in general).

