Excerpt from Science & Mathematics nautil.us
From article by Aatish Bhatia is a recent physics Ph.D. working at Princeton University to bring science and engineering to a wider audience. He writes the award-winning science blog Empirical Zeal and is on Twitter as @aatishb.
What was Fourier’s discovery, and why is it useful? Imagine playing a note on a piano. When you press the piano key, a hammer strikes a string that vibrates to and fro at a certain fixed rate (440 times a second for the A note). As the string vibrates, the air molecules around it bounce to and fro, creating a wave of jiggling air molecules that we call sound. If you could watch the air carry out this periodic dance, you’d discover a smooth, undulating, endlessly repeating curve that’s called a sinusoid, or a sine wave. (Clarification: In the example of the piano key, there will really be more than one sine wave produced. The richness of a real piano note comes from the many softer overtones that are produced in addition to the primary sine wave. A piano note can be approximated as a sine wave, but a tuning fork is a more apt example of a sound that is well-approximated by a single sinusoid.)
From article by Aatish Bhatia is a recent physics Ph.D. working at Princeton University to bring science and engineering to a wider audience. He writes the award-winning science blog Empirical Zeal and is on Twitter as @aatishb.
What was Fourier’s discovery, and why is it useful? Imagine playing a note on a piano. When you press the piano key, a hammer strikes a string that vibrates to and fro at a certain fixed rate (440 times a second for the A note). As the string vibrates, the air molecules around it bounce to and fro, creating a wave of jiggling air molecules that we call sound. If you could watch the air carry out this periodic dance, you’d discover a smooth, undulating, endlessly repeating curve that’s called a sinusoid, or a sine wave. (Clarification: In the example of the piano key, there will really be more than one sine wave produced. The richness of a real piano note comes from the many softer overtones that are produced in addition to the primary sine wave. A piano note can be approximated as a sine wave, but a tuning fork is a more apt example of a sound that is well-approximated by a single sinusoid.)
Now, instead of single key, say you play three keys together to make a chord. The resulting sound wave isn’t as pretty—it looks like a complicated mess. But hidden in that messy sound wave is a simple pattern. After all, the chord was just three keys struck together, and so the messy sound wave that results is really just the sum of three notes (or sine waves).
Fourier’s insight was that this isn’t just a special property of
musical chords, but applies more generally to any kind of repeating
wave, be it square, round, squiggly, triangular, whatever.
The Fourier transform is like a mathematical prism—you feed in a
wave and it spits out the ingredients of that wave—the notes
(or sine waves) that when added together will reconstruct the wave.
If this sounds a little abstract, here are a few different ways of
visualizing Fourier’s trick. The first one comes to us from
Lucas V. Barbosa, a Brazilian physics student who volunteers
his time to make incredible math and science animations for
Wikipedia, where he goes by “LucasVB.”
the Fourier transform is a recipe—it tells you exactly how
much of each note you need to mix together to
reconstruct the original wave.
And this isn’t just some obscure mathematical trick. The
Fourier transform shows up nearly everywhere that waves do. The ubiquitous MP3 format uses a variant of Fourier’s trick to
achieve its tremendous compression over the WAV (pronounced
“wave”) files that preceded it. An MP3 splits a song into short
segments. For each audio segment, Fourier’s trick reduces the
audio wave down to its ingredient notes, which are then stored in
place of the original wave. The Fourier transform also tells you how
much of each note contributes to the song, so you know which
ones are essential. The really high notes aren’t so important
(our ears can barely hear them), so MP3s throw them out,
resulting in added data compression. Audiophiles don’t like MP3s
for this reason—it’s not a lossless audio format, and they claim
they can hear the difference.
This is also how the smartphone app Shazam can recognize a
song. It splits the music into chunks, then uses Fourier’s trick to
figure out the ingredient notes that make up each chunk. It then
searches a database to see if this “fingerprint” of notes matches
that of a song they have on file. Speech recognition uses the same
Fourier-fingerprinting idea to compare the notes in your speech
to that of a known list of words.
You can even use Fourier’s trick for images. Here’s a great
video that shows how you can use circles to draw Homer Simpson’s
face. The online encyclopedia Wolfram Alpha uses a similar idea
to draw famous people’s faces. This might seem like a trick you’d
reserve for a very nerdy cocktail party, but it’s also used to
compress images into JPEG files. In the old days of Microsoft
Paint, images were saved in bitmap (BMP) files which were a long
list of numbers encoding the color of every single pixel. JPEG is
the MP3 of images. To build a JPEG, you first chunk your image
into tiny squares of 8 by 8 pixels. For each chunk, you use the same
circle idea that reconstructs Homer Simpson’s face to
reconstruct this portion of the image. Just as MP3s throw out the
really high notes, JPEGs throw out the really tiny circles. The
result is a huge reduction in file size with only a small reduction in
quality, an insight that led to the visual online world that we all
love (and that eventually gave us cat GIFs).
How is Fourier’s trick used in science? I put out a call on
Twitter for scientists to describe how they used Fourier’s idea
in their work. The response astounded me. The scientists who
responded were using the Fourier transform to study the
vibrations of submersible structures interacting with fluids, to
try to predict upcoming earthquakes, to identify the ingredients
of very distant galaxies, to search for new physics in the heat
remnants of the Big Bang, to uncover the structure of proteins from
X-ray diffraction patterns, to analyze digital signals for NASA,
to study the acoustics of musical instruments, to refine models
of the water cycle, to search for pulsars (spinning neutron stars),
and to understand the structure of molecules using nuclear
magnetic resonance. The Fourier transform has even been used to
identify a counterfeit Jackson Pollock painting by
deciphering the chemicals in the paint.
Whew! That’s quite the legacy for one little math trick.