Joseph Fourier was a fairly prolific mathematician and scientist. He get credit for figuring out that our atmosphere helps keep in heat somehow (the greenhouse effect). But, for us, it’s this gem below that we are interested in.
This is the Fourier Transform. To be fair, that GIF of a dancing dog uses different technology that doesn’t depend on Fourier’s discovery. But, that JPEG you took of your cat does. And that MPEG of that cute baby video. Oh, and that MP3 or AAC file of your favorite songs as well.
If we used a naïve way of storing picture information, we likely store 24 bits of information for each dot on a picture (or, if we are really fancy, 32 bits). For good quality pictures, that adds up. Quickly. To be fair, this naïve way is still used all the time. So called RAW images from a good camera basically do exactly that (they use some of those same tricks that GIF uses to make it smaller). Professional photographers uses gigabytes of storage for photo shoots. Making movies digitally? Terabytes a day. Thankfully, flash is cheap. And hard drives are too, by movie standards. But moving that stuff much around is still a problem. If that lolcat took up megabytes of space, the internet would be crushed under the weight of the laughs. Video? Forget it. What is needed is a trick to reduce the size of the image or images.
And Fourier Transforms hold the key. Basically, Fourier figured out that you can take any function and represent it as a infinite series of sine waves. This helped with some interesting math problems, but it turned out to be super useful in the age of electronics, as creating and adding up sine waves is something circuits are really good at doing. Any radio transmission is essentially just sine waves in the air. So, we can thank Fourier for WiFi (and a ground breaking actress as well of course. More later).
The trick is that at a certain point, adding more sine waves doesn’t make an noticeable difference to the signal. So, you just store the parameters for those waves, and store those instead. Sum them back up and you get the approximation of the signal.
As it turns out, you can treat a picture as if it was a mathematical function, apply these techniques and bam, pictures are 1/10 the size they would be. If you can tolerate some loss of quality, you get them 1/20 of the size. So, pictures can now be kilobytes big.
You can do the same with music and movies. As it turns out, not everything is amendable to Fourier transformation, but stunningly, a mathematical discovery 300+ years old drives the web of pictures, movies and music. And lest you despair on the trivia of all, the same technology is at the heart of MRIs and CAT scans.