3 ms·
In the beginning, the red graph f is a square wave. It's a little lumpy, because it was made by adding together a bunch of different sine waves of different fre
by jloughry 13y ago
In the beginning, the red graph f is a square wave. It's a little lumpy, because it was made by adding together a bunch of different sine waves of different frequencies and amplitudes (by the way, that slight overshoot/undershoot at the edges of the square wave? That's the Gibbs phenomenon). When we look at a square wave in this form, with time running along the x-axis (like the display of an oscilloscope), we call it the "time domain".
It's hard to visualize the individual sine waves when they all overlap like that, so let's spread them out. The logical "direction" in which to spread them is by frequency, so imagine spreading them out in the frequency dimension "behind" the square wave. When the graph rotates into three dimensions, we can see all the individual sine waves: in fact, there are six of them. (If we used more than six, the square wave would be less lumpy; fewer sine waves, more lumpy.)
Notice that the sine waves are different amplitudes, and discrete frequencies. We represent them by spikes on a graph where frequency runs along the x-axis (like the display of a frequency analyzer) and the height of each spike is the amplitude of the sine wave at that frequency.
We've transformed a square wave f in the time domain, into a spectrum f-hat with spikes of different positions and heights in the frequency domain. You can read the blue graph as "six equally spaced frequencies with decreasing amplitudes". That's the fourier transform of the original (red) signal. Because it's a transform, it works in the other direction, too: begin with half a dozen signal generators, set their frequencies and amplitudes according to the spikes on the blue graph, add them together, and the result will be a square wave (or a reasonable facsimile thereof).
It can be done on signals of more than one dimension, too: take a cat photo, transform it into something that looks a bit like a starburst, then transform the starburst back into a photo of a cat.
Note: interesting and oftentimes useful things happen when you transform a time-domain signal into the frequency domain, erase some of the spikes, and then transform back into the time domain.