Every Wave Is a Circle: Fourier Series as Epicycles
We are taught Fourier as an integral to memorise. The geometric truth is older and stranger: any periodic signal, however square or spiky, is drawn by a stack of spinning circles — the same epicycles Ptolemy used for the planets.
A square wave — that brutally flat-topped, vertical-edged shape with corners sharper than anything in nature — is drawn by nothing but spinning circles. Not approximated by circles in some loose hand-wavy sense. Drawn. Stack enough circles, each riding on the rim of the last, each turning at its own steady speed, and the tip of the final one traces a perfect square pulse, edges and all. The same machine that draws a square wave draws a violin's vibrato, a heartbeat, the profile of a mountain range repeated across a horizon. Every periodic signal you have ever met is the path of a pen bolted to a tower of rotating wheels.
This is the geometric truth that the integral formula hides. You learned Fourier as a recipe to memorise — an here, a there, an integral from to that you computed under exam pressure and never looked at again. But the picture came first by more than a millennium and a half, and it belonged to astronomers who were trying to predict where Mars would be on a Tuesday. They were called wrong. They had, by accident, stumbled onto one of the deepest facts in mathematics.
The spinning-circles picture came first
In the second century, Claudius Ptolemy faced a problem. The planets did not move in clean circles around the Earth. Mars, in particular, would sometimes slow, stop, and loop backwards against the stars before resuming — retrograde motion. Ptolemy's fix, inherited from Apollonius and Hipparchus, was to put a planet not on a circle but on a small circle (an epicycle) whose centre rode around a larger circle (the deferent). One wheel on another. When the predictions still drifted, medieval astronomers added more epicycles — a wheel on a wheel on a wheel — tuning each one's size and speed until the model matched the sky.
History remembers this as a cautionary tale: a baroque, wrong theory propped up with ever more epicycles until Kepler swept it away with ellipses. The lesson, supposedly, is that adding parameters to save a bad model is a sin. That lesson is real, but it buries something remarkable. The astronomers had discovered, empirically and centuries early, that a sum of circular motions can approximate any repeating path to arbitrary accuracy. They were not wrong about the mathematics. They were wrong about the physics. The wheels were never in the sky — but the wheels can draw the sky's apparent motion as precisely as you like, and that is a theorem, not a coincidence.
A wrong theory that was secretly a universal approximator
"Adding epicycles" became shorthand for desperate model-patching. But the underlying fact is one of the strongest in analysis: a stack of uniform circular motions — sinusoids of integer-related frequencies — is a universal approximator for periodic functions. From Ptolemy onward, astronomers were wielding an empirical version of the Fourier theorem more than sixteen centuries before Joseph Fourier wrote it down in 1822. They lost the scientific argument and won, unknowingly, a mathematical one.
From circles to the series
Translate the picture into algebra and the Fourier series falls out. A single circle of radius , turning at frequency with a head start , projects onto your screen as horizontally and vertically. Stack circles whose frequencies are all integer multiples of one fundamental — the only way to guarantee the whole pattern repeats with period — and the vertical position of the pen, as a function of time, is a sum of sines and cosines. That sum is the Fourier series.
The term is the DC offset — the centre of the whole stack, the average value of the signal. Each contributes one harmonic: a cosine and a sine at frequency , which together are just one circle of some radius and some starting phase. The real form splits each circle into its cosine and sine shadows, which is convenient for hand computation but obscures the geometry. To see the circles directly, pair each positive frequency with its negative twin and use Euler's formula, . A point spinning on a circle in the complex plane is literally — a vector of length , rotating at angular speed .
This is the equation the lab is drawing. Each is a complex number, and a complex number is a circle waiting to spin: its magnitude is the radius, its argument is the starting angle. The signal is the tip of the last circle when you chain them tip-to-tail, biggest first. Negative are circles spinning the other way; pairing and recovers the real cosine of equation (1). The whole of Fourier analysis is this sentence: give me the radii and starting angles of the circles, and I will give you the wave.
A complex number is a circle waiting to spin — its magnitude is the radius, its argument is where the spin begins.
Computing the coefficients by projection
So how do you find the radii? Here is where the integral you memorised finally earns its place — not as a formula handed down, but as a measurement. The circles' frequencies are all distinct integer multiples of , and sinusoids of different integer frequencies are orthogonal over one period: multiply two of them, integrate over , and you get zero unless they are the same frequency. They do not interfere with each other's bookkeeping. That orthogonality is what lets you pull out one coefficient at a time.
To find — the radius and phase of the th circle — you project the signal onto that circle's motion. Multiply by (a probe circle spinning at exactly , which cancels the th term's spin and leaves it standing still) and average over one period. Every other term, still spinning, averages to zero. Only the th term survives.
That is the whole "memorise this integral" — and it is not a recipe, it is a question. It asks: how much of the signal points in the direction of a circle spinning at ? The integral is a correlation, a dot product between your signal and a pure rotation. Big answer, big circle. Zero answer, no circle at that frequency. The real coefficients of equation (1) are just and — the cosine and sine shadows of the same complex circle.
Orthogonality is what makes the whole thing work
The reason you can compute each coefficient independently — without solving a giant simultaneous system — is that the basis functions are mutually orthogonal. Each circle lives in its own dimension. This is the exact same structure as decomposing a 3D vector into its , , components: you project onto each axis separately because the axes are perpendicular. Fourier analysis is geometry in an infinite-dimensional space, and the harmonics are the coordinate axes.
Watching the circles interfere
Before we attack the square wave, look at what summing just two sinusoids actually does, because all the richness of Fourier hides in the interference between circles.
And that conspiracy at the edge is exactly where the trouble starts.
The square wave and why corners are hard
A square wave is the natural enemy of a smooth circle. Sinusoids are infinitely differentiable — buttery smooth, no corners anywhere. A square wave is the opposite: flat, then a vertical cliff, then flat again. Asking smooth circles to build a corner is asking the impossible, and they pay for the attempt at the edges.
Run the numbers. For an odd square wave the coefficients are clean: only the odd harmonics survive, and each one's amplitude falls off as . The first three nonzero terms have amplitudes , , — the fundamental, then a third the size at triple the frequency, then a fifth the size at five times. Slow decay. The high harmonics matter, because the corner is made of high frequency: an instantaneous jump needs arbitrarily fast wiggles to build. A signal with a discontinuity has a Fourier spectrum that dies only as , and that slow death is the corner's signature.
Smoothness is encoded in how fast the harmonics decay
The rate at which a signal's Fourier coefficients shrink tells you exactly how smooth it is. A jump discontinuity (square wave): coefficients decay as — slow. A corner with no jump but a kink (triangle wave): — faster. Infinitely smooth: faster than any power of . You can hear the discontinuity in the spectrum's tail. This is why compressing a sharp-edged image is harder than a blurry one — sharp edges spray energy across every harmonic.
Switch the Shape control in the lab at the top between square, sawtooth, and triangle and watch the convergence speed change. The triangle, with its gentler kinks ( decay), snaps to its target with far fewer terms. The square and sawtooth, carrying true jumps, crawl — and they crawl with a defect that never heals.
Gibbs: the 9% that never goes away
Here is the part that should bother you. Drag Terms all the way to 30 on the square-wave lab. The flat sections are now nearly perfect. The edges are nearly vertical. But at the top and bottom of each jump there is still a little spike — an overshoot ear — that pokes past the true square's level. Add more terms and the ear gets narrower, sliding closer to the edge. But it does not get shorter. It plateaus at a fixed height and stays there forever.
This is the Gibbs phenomenon, and its height is a specific, computable constant. As you add harmonics, the overshoot at a jump discontinuity converges not to zero but to a fixed fraction of the jump — the partial sum overshoots by about 8.95% of the gap, on each side, no matter how many terms you take.
That number — , about one part in eleven — comes from the sine integral . The partial sum near the jump behaves like that integral, which climbs to before settling back to its limit of . The overshoot is about of the full jump on each side: for a square wave running from to (a jump of ), the peak of the partial sum sits near rather than . It is baked into the geometry of summing finitely many circles across a discontinuity, and it is scale-invariant: it does not care about the size of the jump, only that there is one.
Why more circles never fix the ears
Adding harmonics makes the overshoot region narrower — it squeezes toward the discontinuity — but never shorter. In the limit the spike has zero width but the same finite height, contributing nothing to the energy of the error (which does go to zero), yet always visibly there. The pointwise sum at any fixed point near the edge does converge; it is the peak of the partial sum, a moving target that slides toward the edge, that stays stuck at . Convergence in energy is not convergence in shape. That distinction is the whole subtlety of Fourier analysis in one picture.
- Square-wave decay
- 1 / n
- amplitude of the nth harmonic — slow, because of the jump
- Gibbs overshoot
- ≈ 8.95%
- of the jump, permanent, on every edge no matter the term count
- Epicycles needed
- ∞
- for a true square — but a handful gets you visually close
The Gibbs ringing is not a mathematical curiosity locked in a textbook. It is why a sharply equalised audio track can "pre-echo" before a drum hit, why a JPEG with hard edges shows faint ripples beside high-contrast borders (ringing artifacts), and why filter designers taper their coefficients with windows to tame the overshoot. The medieval astronomers' wheels have a permanent quiver at every cliff, and that quiver leaks into every device that reconstructs a signal from a finite set of frequencies.
Why JPEG and MP3 work — and the bridge to the FFT
Step back and the cross-field payoff is enormous. Equation (2) says any signal is a stack of circles with radii . Most real signals — a photo, a song, a voice — are dominated by a few big circles and a long tail of tiny ones. The big circles carry the gist; the small ones carry detail your eye and ear barely register. Throw the small circles away and the wave stays almost intact. That is the entire idea behind lossy compression.
JPEG chops an image into 8×8 blocks and runs a cosine transform (a real-valued cousin of equation (2)) on each. It keeps the low-frequency circles — the big blobs of brightness and colour — and aggressively discards the high-frequency ones, because human vision is poor at fine spatial detail. MP3 does the same in time: it transforms short windows of audio into their frequency circles and drops the ones a psychoacoustic model says you cannot hear. Both are equation (2) with a budget: keep the big radii, drop the small ones, reconstruct from what is left. The Gibbs ringing is the price — discard the high circles near a sharp edge and you get visible ripples (JPEG) or audible pre-echo (MP3).
The continuous integral of equation (3) is beautiful but uncomputable on a machine — you cannot integrate over a continuum of points. Sample the signal at discrete instants and the integral becomes a finite sum: the Discrete Fourier Transform (DFT). Computed naively the DFT costs multiplications, which is ruinous for a song with millions of samples. The breakthrough — the Cooley–Tukey Fast Fourier Transform (FFT) of 1965, foreshadowed by Gauss himself in 1805 — exploits the symmetry of the circles to compute the same answer in operations. That single algorithmic trick is what makes the spectrum lab above run in real time, what makes your phone decode audio, what makes a software-defined radio possible. The FFT is the engine; the epicycle picture is the soul. They are the same circles, counted cleverly.
So the next time you meet the Fourier integral, do not reach for the formula. Reach for the wheels. Every periodic signal in the universe is a tower of spinning circles, biggest first, each one a complex number waiting to turn — and the only thing the integral does is measure their radii.
Reading further
- Fourier, Théorie analytique de la chaleur (1822) — the founding text, where Fourier claimed (to the disbelief of Lagrange and Laplace) that any function could be written as a trigonometric series; the audacity is what made it revolutionary.
- Körner, Fourier Analysis (Cambridge, 1988) — the canonical modern textbook: rigorous on convergence and the Gibbs phenomenon, but written with wit and a historian's eye for where the ideas came from.
- 3Blue1Brown, But what is a Fourier series? From heat flow to drawing with circles — the definitive visual teaching case for the epicycle picture; if equation (2) still feels abstract, this animation makes the spinning circles undeniable.
- Gibbs, Fourier's Series (Nature, 1899) — the terse letter where Gibbs corrected the record on the overshoot at a discontinuity, settling a debate Michelson had stumbled into with a mechanical harmonic analyser.
Try it in the lab
All effects →Fourier Series
mathsEpicycles tracing waveforms — Gibbs phenomenon, harmonic decomposition.
analysisfourierConformal Grid
mathsComplex mappings deforming a Cartesian grid — Joukowski, power maps, inversion.
complex analysisdifferential geometryAM Modulation
engineeringCarrier, message, modulated signal, and spectrum — envelope, sidebands, overmodulation.
communicationsmodulationrf
More from the blog
The Lorenz Attractor and the Limits of Prediction
Determinism does not imply predictability. Lorenz's three-equation toy weather model is fully deterministic yet unknowable past a horizon you can compute — a geometric fact, not an engineering failure.
Phase Portraits: See a Differential Equation Before You Solve It
Most differential equations have no closed-form solution — we treat that as a dead end. But the qualitative behaviour is fully visible in the vector field before you solve anything. Poincare's trick: stop chasing solutions, draw the flow.
PLL Design from First Principles
A phase-locked loop is a control system with a phase detector instead of a summing junction. The intuition you can build with the lab above is more durable than the textbook derivations.