Watching a square wave get built, one sine wave at a time — the visual proof that any repeating signal is really just a sum of simple sinusoids.
Fourier analysis is built on a striking claim: any repeating (periodic) signal, no matter how complex or sharp-edged, can be built by adding together simple sine waves of different frequencies, amplitudes, and phases. The interactive demo above builds a square wave this way — starting from just its fundamental frequency sine wave, then adding progressively higher odd harmonics — showing directly how the sum sharpens toward a true square wave as more terms are added.
A Fourier series decomposes a periodic signal into a sum of sine and cosine terms at integer multiples of the signal's fundamental frequency — these multiples are called harmonics. Each harmonic has its own amplitude and phase, determined by how much that particular frequency component contributes to the original signal. A square wave, mathematically, turns out to require only odd harmonics (1st, 3rd, 5th, and so on), each with a specific decreasing amplitude — which is exactly the pattern the interactive demo builds up.
A Fourier series applies to periodic (repeating) signals and produces a discrete set of harmonic amplitudes. The Fourier transform generalizes this to non-periodic signals, producing a continuous frequency spectrum instead of discrete harmonics — this is the tool actually used in most real signal-processing applications (audio analysis, vibration analysis, communications), since real-world signals are rarely perfectly periodic. The underlying idea — decomposing a signal into its frequency content — is the same in both cases.
Fourier analysis underlies an enormous range of practical engineering work: audio equalizers separate a signal by frequency band to boost or cut specific ranges; vibration analysis identifies which frequency components in a machine's vibration signature indicate a specific fault (bearing wear, imbalance, misalignment) by their characteristic frequency signature; communication systems modulate and demodulate signals by manipulating their frequency content; and digital filters are designed directly in the frequency domain because certain operations (like removing a specific noise frequency) are far easier to express there than in the time domain.
This falls out of the square wave's specific symmetry (it's an odd function with half-wave symmetry) — when you compute the Fourier series coefficients for a square wave mathematically, every even-numbered harmonic's coefficient comes out to exactly zero. Other periodic waveforms with different symmetry properties can include even harmonics, odd harmonics, or both, depending on their specific shape.
Only in the limit of infinitely many harmonics — with any finite number of harmonics, the composite signal always has some ripple, especially near the sharp edges (a persistent overshoot near discontinuities known as the Gibbs phenomenon, which doesn't disappear even as more harmonics are added, though it does get narrower).
A Fourier series applies to periodic signals and produces a discrete set of harmonic amplitudes at specific frequencies. A Fourier transform applies more generally (including to non-periodic signals) and produces a continuous frequency spectrum. Practically, the Fourier transform (and its discrete/fast computational forms, DFT/FFT) is what most real digital signal processing actually uses.
Try our STEM Learning Studio
More calculators, simulators, and guides for this discipline.