Contents

Deep Dive / /6 min

Every Wave Is a Sum of Circles

Contents
  1. A periodic function as a tower of wheels
  2. The coefficients are projections
  3. Building a square wave from odd harmonics
  4. Gibbs: the overshoot that never goes away
  5. Why split a signal into circles at all
  6. Further reading
Plate VII Fourier Series Drive the instrument →

Pin a pen to the rim of a spinning wheel, then mount the axle of that wheel on the rim of a second, larger, slower wheel. Mount that one on a third. As the whole machine turns, the pen traces a curve. With the right radii and speeds, a clockwork of nested wheels — epicycles — can draw a square, a portrait, the silhouette of a treble clef. The astonishing claim of Fourier analysis is that this is not a parlor trick but a theorem: every reasonable periodic signal is the trace of such a machine, and there is an exact recipe for the radius and starting angle of each wheel.

This essay unpacks that claim. The companion Plate VII — Fourier Series animates the wheels directly — watch the rotating vectors stack tip-to-tail and sweep out a square wave — and what follows is the mathematics of why it works.

A periodic function as a tower of wheels

Fix a period TT and a base (or fundamental) angular frequency ω0=2π/T\omega_0 = 2\pi / T. A single wheel of radius AA spinning at frequency kω0k\omega_0, started at angle ϕ\phi, contributes a sinusoid Acos(kω0t+ϕ)A\cos(k\omega_0 t + \phi) to whatever the pen is doing along one axis. Allowing k=0,1,2,k = 0, 1, 2, \dots — a stationary offset wheel, the fundamental, then harmonics spinning at integer multiples — the Fourier claim is that a periodic f(t)f(t) can be written

f(t)=a02+k=1(akcos(kω0t)+bksin(kω0t)).f(t) = \frac{a_0}{2} + \sum_{k=1}^{\infty} \big( a_k \cos(k\omega_0 t) + b_k \sin(k\omega_0 t) \big).

Each term is one wheel resolved into its horizontal and vertical parts.In complex form the bookkeeping collapses: f(t)=k=ckeikω0tf(t) = \sum_{k=-\infty}^{\infty} c_k e^{ik\omega_0 t}, where ckeikω0tc_k e^{ik\omega_0 t} is literally a vector of length ck|c_k| rotating in the plane. The epicycle picture is the complex series read out loud. The only freedoms are the radii. So the entire content of the theorem is a procedure for reading off aka_k and bkb_k from ff.

The coefficients are projections

The recipe is an inner product, and the reason it works is orthogonality. Think of functions on one period as vectors, with the inner product

g,h=0Tg(t)h(t)dt.\langle g, h \rangle = \int_0^T g(t)\, h(t)\, dt.

The miracle is that the sinusoids {cos(kω0t),sin(kω0t)}\{\cos(k\omega_0 t),\, \sin(k\omega_0 t)\} are mutually orthogonal under this product: integrate cos(kω0t)cos(mω0t)\cos(k\omega_0 t)\cos(m\omega_0 t) over a full period and you get zero unless k=mk = m, in which case you get T/2T/2. The cross terms between a sine and a cosine vanish too. They form an orthogonal basis, the function-space analogue of perpendicular coordinate axes.

Once you have an orthogonal basis, extracting a component is the same operation as in ordinary geometry: to find how much of ff points along cos(kω0t)\cos(k\omega_0 t), project onto it. This is exactly the move behind the dot product and behind every eigen-decomposition — express a vector in a basis and read off coordinates one at a time. Concretely,

ak=2T0Tf(t)cos(kω0t)dt,bk=2T0Tf(t)sin(kω0t)dt.a_k = \frac{2}{T}\int_0^T f(t)\cos(k\omega_0 t)\, dt, \qquad b_k = \frac{2}{T}\int_0^T f(t)\sin(k\omega_0 t)\, dt.

Each integral asks a single question: how much does ff resonate with this particular pure tone? Multiply ff by the test sinusoid and average. If they rise and fall together, the integral is large; if they are out of step, the contributions cancel and the integral is small. The coefficient is the strength of that resonance — the radius of that wheel.

Building a square wave from odd harmonics

Take the canonical hard case: a square wave that sits at +1+1 for half the period and 1-1 for the other half. It is odd, so every cosine coefficient aka_k vanishes by symmetry; only sines survive. Computing the integral for bkb_k, the even harmonics cancel and the odd ones come out as 4/(πk)4/(\pi k). The series is

f(t)=4π(sinω0t+13sin3ω0t+15sin5ω0t+)=4πkoddsin(kω0t)k.f(t) = \frac{4}{\pi}\left( \sin\omega_0 t + \frac{1}{3}\sin 3\omega_0 t + \frac{1}{5}\sin 5\omega_0 t + \cdots \right) = \frac{4}{\pi}\sum_{k\,\text{odd}} \frac{\sin(k\omega_0 t)}{k}.

Read this as a stack of wheels. The fundamental, radius 4/π4/\pi, does most of the work. The third harmonic, spinning three times as fast at a third the radius, sharpens the corners. The fifth sharpens them further. Each odd harmonic flattens the plateaus and steepens the edges a little more, and the 1/k1/k decay means the corrections shrink — but only slowly. A flat top with vertical sides, built entirely out of round, smooth sines.

Gibbs: the overshoot that never goes away

Truncate the square-wave series at a finite number of terms and something stubborn appears at each jump: a little spike that overshoots the true value, followed by a ringing that decays into the flat region. Add more terms and the spike gets narrower — it crowds closer to the discontinuity — but it does not get shorter. The overshoot stabilizes at about 9% of the jump height and stays there no matter how many harmonics you keep.

This is the Gibbs phenomenon, and it is not a numerical accident. A finite sum of continuous sinusoids can squeeze the transition region as tight as you like but cannot reproduce a true vertical jump; the best it can do near a discontinuity leaves a fixed-height ear.The series still converges to ff in the mean-square (energy) sense, and at the jump it converges to the midpoint of the two one-sided values — convergence in energy coexisting with a pointwise spike that refuses to die. It is the price of demanding sharp edges from smooth building blocks, and it has practical teeth: ringing artifacts near sharp transitions in audio, in JPEG blocks, in any system that band-limits a signal with hard edges.

Why split a signal into circles at all

The deep payoff is a change of address. A signal can be described in the time domain — its value at each instant — or in the frequency domain — the list of coefficients {ak,bk}\{a_k, b_k\}. These hold the same information, but operations that are awkward in one are trivial in the other. Convolution, the smearing operation at the heart of filtering and of the convolutional networks in modern vision, becomes plain multiplication in the frequency domain. To remove hiss from a recording, transform to frequencies, zero out the offending band, transform back. Differentiation becomes multiplication by ikω0ik\omega_0. Solving certain differential equations turns into algebra.

This is why the frequency view runs through nearly all of signal processing: compression keeps the large coefficients and discards the small ones (MP3, JPEG), communications assign different users different frequency bands, and physics reads spectral lines straight off the coefficients of light. The one engine that made all of this computationally routine is the Fast Fourier Transform: a way to compute the discrete coefficients of NN samples in O(NlogN)O(N\log N) operations instead of the naive O(N2)O(N^2), by recursively reusing the symmetries of the rotating roots of unity. A square wave is a sum of circles; the FFT is what lets a computer find those circles fast enough to matter.

Further reading

  • The Library — annotated primary sources across the atlas.
  • Notation — conventions for inner products, transforms, and indices used here.
  • E. M. Stein and R. Shakarchi, Fourier Analysis: An Introduction (Princeton, 2003) — a rigorous, readable development of series, convergence, and the Gibbs phenomenon.