Everything Is a Sum of Circles
In the Euler & Gauss guide you watched eiθ trace a circle. That one picture is the seed of all of signal processing. The claim, outrageous when Joseph Fourier made it in 1807, is that any repeating shape — a square wave, a sawtooth, the pressure wave of a spoken vowel — is nothing but circles of different sizes spinning at different speeds, added together.
The French Academy's referees — Lagrange among them — refused to believe it, and held up Fourier's memoir on the theory of heat for years. Fourier published the full theory anyway in his 1822 Théorie analytique de la chaleur, and Dirichlet supplied the rigorous convergence proof in 1829. The atoms of the theory are exactly Euler's exponentials:
Why did this need Euler first? Because the formula for the coefficients works only if the atoms don't interfere with each other — and they don't: distinct exponentials are orthogonal, their products averaging to zero over a period. Each circle can be measured independently of all the others. Fourier analysis is the art of asking a signal, one frequency at a time, how much of you is this circle?
Build a square wave out of circles
A square wave — the most un-circular shape imaginable — needs only the odd harmonics, with amplitudes falling off as 1/k:
% --- Synthesize a square wave from its Fourier recipe --------- t = linspace(-pi, 3*pi, 4000); target = sign(sin(t)); % the ideal square wave for N = [1 3 9 41] % highest odd harmonic used f = zeros(size(t)); for k = 1:2:N f = f + (4/pi) * sin(k*t) / k; endfor overshoot = (max(f) - 1) * 100; % percent above the top rail printf('N = %2d harmonics: overshoot %.2f%%\n', N, overshoot); endfor % Gibbs: overshoot -> (2/pi)*Si(pi) - 1 = 8.949%% -- it never dies % --- Plot the last partial sum against the target ------------- plot(t, target, 'linewidth', 1); hold on; plot(t, f, 'linewidth', 1.5); title('41 circles pretending to be a square'); legend('square', 'partial sum');
Impedance: Euler's Formula Runs Your Circuits
Here is the engineering payoff, and it lands directly in the circuit fundamentals guide on your shelf. Feed any linear circuit a single spinning circle eiωt, and the circuit cannot change its frequency — only its size and its phase. Differentiation becomes multiplication by iω, calculus collapses into complex arithmetic, and every capacitor and inductor becomes just a frequency-dependent resistor:
When the two imaginary parts cancel — ωL = 1/ωC — the circuit is purely resistive and current surges: resonance, at ω₀ = 1/√(LC). Every radio tuner ever built is this one line of Euler-powered algebra. And because Fourier says every real signal is a sum of circles, solving the circuit for one frequency solves it for all signals at once.
From series to transform — and Gauss's secret algorithm
Let the period grow to infinity and the Fourier series becomes the Fourier transform; sample it and it becomes the DFT. The Euler & Gauss guide told the punchline: Gauss had the fast algorithm for the DFT — the FFT — in an unpublished 1805 notebook, working out asteroid orbits, 160 years before Cooley and Tukey. The FFT is the single most-executed nontrivial algorithm on Earth, and it is nothing but a clever regrouping of Euler's exponentials.
% --- A series RLC driven across a band of frequencies --------- R = 25; L = 50e-3; C = 2e-6; % ohms, henries, farads f0 = 1 / (2*pi*sqrt(L*C)); % predicted resonance printf('resonance predicted at %.1f Hz\n', f0); f = logspace(1, 4, 400); % 10 Hz .. 10 kHz w = 2*pi*f; Z = R + 1i*(w*L - 1 ./ (w*C)); % Euler does the calculus I = 1 ./ abs(Z); % current for a 1 V drive [~, ix] = max(I); printf('peak current found at %.1f Hz\n', f(ix)); printf('Q factor = %.1f\n', (1/R)*sqrt(L/C)); semilogx(f, I, 'linewidth', 1.5); hold on; semilogx([f0 f0], [0 max(I)], '--'); xlabel('frequency (Hz)'); ylabel('|I| for 1 V drive'); title('Series RLC: the resonant spike'); % --- Phase flips 180 degrees through resonance ----------------- phase = angle(Z) * 180/pi; printf('phase at f0/10: %+.0f deg at 10*f0: %+.0f deg\n', ... interp1(f, phase, f0/10), interp1(f, phase, 10*f0));
% --- A two-note chord buried in noise -------------------------- Fs = 8192; T = 1; % sample rate, duration t = (0:1/Fs:T-1/Fs); clean = sin(2*pi*440*t) + 0.8*sin(2*pi*659.3*t); % A4 + E5 x = clean + 1.2*randn(size(t)); % drown it in hiss X = fft(x); % Gauss's 1805 trick P = abs(X(1:Fs/2)) / (Fs/2); % one-sided amplitude fr = (0:Fs/2-1); % frequency axis (Hz) [pk, loc] = sort(P, 'descend'); printf('strongest bins: %.1f Hz and %.1f Hz\n', ... fr(loc(1)), fr(loc(2))); % -> 440 and 659 % --- Brutal denoise: keep only bins above a threshold ---------- Y = X .* (abs(X) > 0.25*max(abs(X))); y = real(ifft(Y)); printf('noise power before: %.2f after: %.2f\n', ... mean((x-clean).^2), mean((y-clean).^2)); plot(t(1:400), x(1:400)); hold on; plot(t(1:400), y(1:400), 'linewidth', 1.5); legend('noisy', 'FFT-filtered'); title('A chord rescued from hiss');
Congruence: The Arithmetic of Secrets
This thread has two strands, and it pays to keep the credits straight — your cryptography series rests on both. The totient and its theorem are Euler's (1763): φ(n) counts the numbers below n sharing no factor with it, and aφ(n) ≡ 1 (mod n) whenever gcd(a, n) = 1. The systematic machinery of congruences — the ≡ notation, modular inverses, the whole clockwork algebra — is Gauss's, laid down in the Disquisitiones Arithmeticae (1801). RSA needs Euler's theorem for its engine and Gauss's algebra for its chassis.
For two centuries this was mathematics at its purest — Hardy famously toasted number theory for its uselessness. Then in 1976–77, Diffie, Hellman, Rivest, Shamir and Adleman noticed that clock arithmetic has an engineering property nothing else has: some of its operations are one-way streets. Multiplying two primes is instant; recovering them from the product is intractable. Raising g to a power mod p is instant; recovering the power — the discrete logarithm — is a cliff.
The one-way street, drawn
Watch the powers g, g², g³, … mod p hop around a circle of residues. The hops look random — that scatter is the security. Given the landing point, naming the hop count is the discrete log problem, and for a 2048-bit p the sun burns out first.
Diffie–Hellman in one breath
Alice and Bob agree publicly on p and a primitive root g. Alice picks secret a, shouts ga mod p; Bob picks secret b, shouts gb mod p. Each raises the other's shout to their own secret: both land on gab mod p. The eavesdropper holds ga and gb but needs the discrete log to climb to gab. Two people who have never met now share a secret, in public.
% --- Extended Euclid: g = a*x + b*y, and the modular inverse --- 1; % marker: keeps this file a script (functions defined below) function [g, x, y] = egcd(a, b) if b == 0 g = a; x = 1; y = 0; else [g, x1, y1] = egcd(b, mod(a, b)); x = y1; y = x1 - floor(a/b)*y1; g = g; endif endfunction function inv = modinv(a, m) [g, x, ~] = egcd(mod(a, m), m); if g != 1, error('no inverse: gcd != 1'); endif inv = mod(x, m); endfunction % --- Sanity: invert 17 mod 3120 (the RSA step from the E&G guide) d = modinv(17, 3120) mod(17*d, 3120) % -> 1, as Euler promises % --- Bezout in the open: gcd(240, 46) = 2 ---------------------- [g, x, y] = egcd(240, 46); printf('gcd=%d and 240*(%d) + 46*(%d) = %d\n', g, x, y, 240*x+46*y);
% --- A toy exchange over Z_p* ---------------------------------- 1; % script marker function r = powmod(a, k, n) % repeated squaring, as in the E&G guide r = 1; a = mod(a, n); while k > 0 if mod(k, 2), r = mod(r*a, n); endif a = mod(a*a, n); k = floor(k/2); endwhile endfunction p = 30803; g = 2; % public: a prime and a generator a = 7716; b = 12834; % private picks (never sent) A = powmod(g, a, p); B = powmod(g, b, p); % the two shouts sA = powmod(B, a, p); sB = powmod(A, b, p); % both climb to g^(ab) printf('Alice key %d == Bob key %d : %d\n', sA, sB, sA==sB); % --- The spy's only move: brute-force the discrete log --------- tic; x = 1; k = 0; do x = mod(x*g, p); k = k + 1; until x == A printf('dlog found: k = %d (matches a: %d) in %.3f s\n', ... k, k==a, toc); % Now imagine p with 617 digits instead of 5. That is the cliff.
RSA: Euler's Theorem With a Padlock On It
RSA is Euler's theorem read as an engineering spec. Pick primes p, q; publish n = pq and an exponent e; keep d = e−1 mod φ(n) private. Anyone can lock a message m by computing me mod n. Only the holder of d can unlock, because
The trapdoor is φ(n). Computing it from n means finding (p−1)(q−1), which means factoring n — and factoring is the one-way street again. Publish the product, keep the factors: the whole of internet key exchange balances on the difficulty of undoing one multiplication that Gauss could have done in his head.
% --- Key generation -------------------------------------------- 1; % script marker function r = powmod(a, k, n) r = 1; a = mod(a, n); while k > 0 if mod(k, 2), r = mod(r*a, n); endif a = mod(a*a, n); k = floor(k/2); endwhile endfunction p = 61; q = 53; n = p*q; phi = (p-1)*(q-1); e = 17; [~, d] = gcd(e, phi); d = mod(d, phi); % private exponent: 2753 % --- Encrypt a word letter by letter (A=1 .. Z=26) ------------- msg = 'GAUSS'; m = double(msg) - double('A') + 1; c = arrayfun(@(x) powmod(x, e, n), m) back = arrayfun(@(x) powmod(x, d, n), c); printf('decrypted: %s\n', char(back - 1 + double('A'))); % --- Signing: the same trapdoor, run backwards ------------------ h = mod(sum(m .* (1:numel(m))), n); % toy hash of the message sig = powmod(h, d, n); % sign with the PRIVATE key ok = powmod(sig, e, n) == h; % anyone verifies with PUBLIC printf('signature %d verifies: %d\n', sig, ok);
Curvature: Geometry Measured From the Inside
The Euler & Gauss guide ended this story at the Theorema Egregium: Gaussian curvature K is intrinsic, detectable by measurements made entirely within a surface — no view from outside required. This thread follows that idea as it grows from a surveyor's observation into the shape of the universe, and then into the string / M-theory guide.
The intrinsic test is beautifully concrete. Draw a triangle out of geodesics — the straightest possible paths — and sum its angles. On a flat sheet you get exactly π. On a sphere you get more; on a saddle, less. The excess is not an error term. It is the curvature, integrated:
A second intrinsic probe: carry an arrow around a closed loop, always keeping it as parallel to itself as the surface allows. On a flat sheet it comes home unchanged. On a curved surface it comes home rotated — by exactly the curvature enclosed. This holonomy is how a being confined to the surface, with no concept of an outside, could still measure K.
Riemann inherits, Einstein spends
In 1854, at Göttingen, the aging Gauss chose the topic for the habilitation lecture of his student Bernhard Riemann — and picked the one Riemann feared most: the foundations of geometry. Riemann rose to it by generalizing the Theorema Egregium to any number of dimensions: space itself could have intrinsic curvature, varying point to point, encoded in what we now call the metric tensor. Gauss, nearly alone in the audience, reportedly left deeply moved.
Sixty-one years later Einstein spent the inheritance. General relativity (1915) says matter curves the four-dimensional geometry of spacetime, and what we call gravity is just geodesic motion inside that curvature — the planets are not pulled, they are coasting straight through a bent geometry. The mathematics is Riemann's, which is to say Gauss's, industrialized:
Strings: curvature all the way down
String theory runs the logic one more turn, and this is the handoff to your string / M-theory guide. A string sweeps out a two-dimensional worldsheet — an honest Gaussian surface — and the action that governs it is (in Polyakov's form) built from the worldsheet metric; the theory's consistency hinges on two-dimensional curvature bookkeeping, where the Gauss–Bonnet total curvature counts the holes in the worldsheet and organizes string interactions by topology. The demand that quantum anomalies cancel then fixes the dimension of spacetime: 10 for superstrings, 11 for M-theory.
The extra dimensions hide by being small — compactified into shapes (circles in Kaluza–Klein's 1920s original, Calabi–Yau spaces in the modern theory) whose intrinsic curvature determines the particle physics we see. Which particles exist, their masses and charges: in string theory these are readouts of the curvature of a space too small to see, measured — as Gauss insisted all geometry could be — entirely from the inside.
% K from the first & second fundamental forms, by finite differences 1; % script marker function K = gauss_K(r, u, v) h = 1e-5; ru = (r(u+h,v) - r(u-h,v)) / (2*h); % tangent vectors rv = (r(u,v+h) - r(u,v-h)) / (2*h); ruu = (r(u+h,v) - 2*r(u,v) + r(u-h,v)) / h^2; rvv = (r(u,v+h) - 2*r(u,v) + r(u,v-h)) / h^2; ruv = (r(u+h,v+h) - r(u+h,v-h) - r(u-h,v+h) + r(u-h,v-h)) / (4*h^2); nrm = cross(ru, rv); nrm = nrm / norm(nrm); E = dot(ru,ru); F = dot(ru,rv); G = dot(rv,rv); L = dot(ruu,nrm); M = dot(ruv,nrm); N = dot(rvv,nrm); K = (L*N - M^2) / (E*G - F^2); % Gauss's own formula endfunction % --- Sphere of radius 2: K should be 1/R^2 = 0.25 everywhere --- sph = @(u,v) [2*cos(u).*cos(v), 2*sin(u).*cos(v), 2*sin(v)]; printf('sphere R=2 : K = %.6f (theory 0.2500)\n', gauss_K(sph, 0.7, 0.4)); % --- Saddle z = x^2 - y^2 at the origin: K = -4 ----------------- sad = @(u,v) [u, v, u.^2 - v.^2]; printf('saddle : K = %.6f (theory -4.0000 at 0,0)\n', gauss_K(sad, 0, 0)); % --- Torus (R=2, r=0.7): K flips sign inner vs outer ------------ tor = @(u,v) [(2+0.7*cos(v)).*cos(u), (2+0.7*cos(v)).*sin(u), 0.7*sin(v)]; printf('torus outer: K = %+.4f inner: K = %+.4f\n', ... gauss_K(tor, 0.3, 0), gauss_K(tor, 0.3, pi));
% Angle excess of a geodesic triangle == its area (unit sphere, K=1) 1; % script marker function ang = corner(A, B, C) % angle at vertex A between great-circle arcs A->B and A->C tb = B - dot(B,A)*A; tc = C - dot(C,A)*A; % project to tangent plane ang = acos( dot(tb,tc) / (norm(tb)*norm(tc)) ); endfunction % --- Three unit vectors = triangle vertices --------------------- A = [1 0 0]; B = [0 1 0]; C = [0 0.2 1]; C = C / norm(C); alpha = corner(A,B,C); beta = corner(B,C,A); gamma = corner(C,A,B); excess = alpha + beta + gamma - pi; % --- Independent area via L'Huilier's theorem ------------------- a = acos(dot(B,C)); b = acos(dot(A,C)); c = acos(dot(A,B)); s = (a+b+c)/2; E4 = sqrt(tan(s/2)*tan((s-a)/2)*tan((s-b)/2)*tan((s-c)/2)); area = 4*atan(E4); printf('angle sum = %.6f rad (pi = %.6f)\n', alpha+beta+gamma, pi); printf('excess = %.6f\n', excess); printf('area (LHuilier) = %.6f match: %d\n', area, abs(excess-area)<1e-9);
Zeta: The Basel Problem Grows Up
When Euler summed 1 + ¼ + ⅑ + … to π²/6 in 1735, he did more than win a contest ninety years old. He had evaluated one point of a function — and the function turned out to know where the prime numbers are. This is the thread that ends in the Mathematical Tapestry, and in the deepest open problem in mathematics.
The product identity is unreasonable at first sight and inevitable at second: expand every factor as a geometric series, multiply out, and unique factorization guarantees each integer n is assembled exactly once. The Euler product is the fundamental theorem of arithmetic wearing analysis' clothes. Because ζ(s) blows up at s = 1 (the harmonic series), the product must contain infinitely many factors: Euler had proved the infinitude of primes with calculus, 2,000 years after Euclid did it with a two-line trick.
Riemann's 1859 move: feed it complex numbers
The series only converges for s > 1. In an eight-page paper of 1859 — his only one on number theory — Riemann, Gauss's successor at Göttingen, did the decisive thing: he treated s as a complex variable and extended ζ to the whole plane by analytic continuation, finding a functional equation that mirrors the plane about the line Re(s) = ½. The continued function has zeros, and Riemann's formula for counting primes says the zeros are the music: each zero contributes one wave to the exact shape of the prime staircase. Gauss's teenage π(x) ≈ Li(x) guess from the Euler & Gauss guide is just the smooth baseline; the zeros supply the wiggles, exactly.
Walking the critical line
All the mystery now lives in the critical strip 0 < Re(s) < 1. The Riemann Hypothesis — Hilbert's eighth problem, a Clay million, unproven since 1859 — says every nontrivial zero sits exactly on the mirror line Re(s) = ½. If true, the primes are as orderly as they could possibly be. Below, you can walk the line yourself and watch the function thread the origin.
% Zeta via the eta series + Cohen-Villegas-Zagier acceleration --- 1; % script marker function z = zeta_cvz(s, n) % alternating eta series, accelerated: good far into the strip d = (3 + sqrt(8))^n; d = (d + 1/d) / 2; b = -1; c = -d; acc = 0; for k = 0:n-1 c = b - c; acc = acc + c * (-1)^k * exp(-s * log(k+1)); b = b * 2*(k+n)*(k-n) / ((2*k+1)*(k+1)); endfor eta = acc / d; z = eta / (1 - 2^(1-s)); % eta -> zeta endfunction % --- Sanity against Euler's specials ---------------------------- printf('zeta(2) = %.12f (pi^2/6 = %.12f)\n', real(zeta_cvz(2,40)), pi^2/6); printf('zeta(4) = %.12f (pi^4/90 = %.12f)\n', real(zeta_cvz(4,40)), pi^4/90); % --- Walk the critical line, flag the dips ---------------------- t = 10:0.02:27; mag = arrayfun(@(tt) abs(zeta_cvz(0.5 + 1i*tt, 60)), t); for k = 2:numel(t)-1 if mag(k) < mag(k-1) && mag(k) < mag(k+1) && mag(k) < 0.05 printf('zero near t = %.3f |zeta| = %.2e\n', t(k), mag(k)); endif endfor % -> 14.135, 21.022, 25.011 : the first three notes of the music plot(t, mag, 'linewidth', 1.3); xlabel('t'); ylabel('|zeta(1/2 + it)|'); title('The critical line: every touch of zero is a Riemann zero');
% How much better does zeta make the prime count? ----------------- 1; % script marker function pr = sieve(N) isp = true(1, N); isp(1) = false; for k = 2:floor(sqrt(N)) if isp(k), isp(2*k:k:N) = false; endif endfor pr = find(isp); endfunction function v = li(x) % Li via the convergent series (E&G guide, fixed) g = 0.57721566490153286; L = log(x); s = g + log(L); term = 1; for k = 1:120 term = term * L / k; s = s + term / k; endfor v = s - 1.04516378011749278; % subtract li(2) endfunction function v = R(x) % Riemann's R via the Gram series L = log(x); v = 1; term = 1; for k = 1:80 term = term * L / k; zk = sum((1:400).^(-(k+1))); % zeta(k+1) by direct sum v = v + term / (k * zk); endfor endfunction N = 1e6; pr = sieve(N); for x = [1e4 1e5 1e6] pix = sum(pr <= x); printf('x=%7d pi=%6d Li err %+6.1f R err %+6.1f\n', ... x, pix, li(x)-pix, R(x)-pix); endfor % R(x), built from zeta, lands roughly 5-10x closer than Li(x). % Add the zeros' oscillating terms and the formula becomes EXACT.
The Loom, Read Backwards
Four threads, one warp. Every row of this table is a straight line from a 1700s desk in Basel or a 1800s observatory in Göttingen to a guide already on your shelf.
| Thread | The seed | The weaver | The fabric | On your shelf |
|---|---|---|---|---|
| 〜 Wave | Euler, eiθ (1748) | Fourier 1822 · Dirichlet 1829 | Impedance, filters, FFT, spectra | Circuits · Maxwell |
| ⚿ Key | Euler, φ & theorem (1763) · Gauss, congruences (1801) | Diffie–Hellman 1976 · RSA 1977 | Key exchange, signatures, TLS | Cryptography series |
| ◠ Curve | Gauss, Theorema Egregium (1827) | Riemann 1854 · Einstein 1915 | General relativity, worldsheets, 10 & 11 dimensions | String / M-theory |
| ζ Zeta | Euler, Basel & product (1735–37) | Riemann 1859 | Prime counting, RH, −1/12 in physics | Mathematical Tapestry |
The threads also tie to each other: the FFT that analyzes your circuits multiplies the giant integers of RSA; the Euler product hands the primes of Thread II to the analysis of Thread IV; zeta's continuation pays string theory's bills in Thread III. Pull any one thread in this library and the others move.
The profound study of nature is the most fertile source of mathematical discoveries.— Joseph Fourier, Théorie analytique de la chaleur, 1822 — the weaver's creed