Two Lives, One Century Apart
Euler died in St. Petersburg in 1783. Gauss was born in Brunswick in 1777. For six years the two greatest mathematicians who ever lived shared the Earth — one a blind old man still dictating papers at a ferocious pace, the other a small child who would soon astonish his schoolmasters. They never met. They didn't need to: Gauss learned his craft from Euler's books, and later told students that the study of Euler's works remains the best school for the different fields of mathematics, and nothing can replace it.
Leonhard Euler
The most prolific mathematician in history: roughly 850 works, filling over 70 volumes of collected papers. He lost sight in one eye at 31 and in both by 64 — and his output increased, computed entirely in his head. He gave us the notation we still write: f(x), e, i, π (popularized), Σ.
- Founded graph theory and topology
- Solved the Basel problem at 28
- Connected e, i, π in one equation
- Created the calculus of variations
- Worked until the hour of his death
Carl Friedrich Gauss
The Princeps Mathematicorum — prince of mathematicians. A poor bricklayer's son whose genius won him a duke's patronage. His motto was pauca sed matura: few, but ripe. He published reluctantly, and his private notebooks turned out to contain decades of unannounced discoveries, including non-Euclidean geometry.
- Proved the Fundamental Theorem of Algebra
- Wrote the Disquisitiones Arithmeticae at 21
- Rediscovered the lost planet Ceres
- Founded differential geometry of surfaces
- Directed the Göttingen Observatory 48 years
Parallel timelines
Euler born in Basel, Switzerland, son of a pastor who wanted him to study theology.
Joins the St. Petersburg Academy at 20, recruited to Catherine I's new scientific court.
Solves the Basel problem: the sum of reciprocal squares is π²/6. Europe takes notice.
The Seven Bridges of Königsberg paper — the birth of graph theory.
Publishes the Introductio in analysin infinitorum, containing eiθ = cos θ + i sin θ.
Returns to St. Petersburg; goes almost completely blind. Productivity rises.
Gauss born in Brunswick. He will later joke that he could count before he could talk.
Euler dies mid-calculation, discussing the newly discovered planet Uranus. "He ceased to calculate and to live."
At 19, Gauss constructs the regular 17-gon with compass and straightedge — the first advance on Greek geometry in 2,000 years.
Doctoral thesis: the first widely accepted proof of the Fundamental Theorem of Algebra.
Publishes the Disquisitiones Arithmeticae and predicts the position of the lost asteroid Ceres. Becomes famous across Europe in a single year.
Publishes his method of least squares and the theory of the normal error curve.
The Theorema Egregium: curvature is intrinsic. Differential geometry is born.
Gauss dies in Göttingen. His brain is preserved; his notebooks stun the mathematicians who open them.
Read Euler, read Euler — he is the master of us all.— PIERRE-SIMON LAPLACE, ADVICE TO YOUNG MATHEMATICIANS
The Number e and the Most Beautiful Equation
Euler took three numbers that seem to come from different universes — e from compound interest, i from impossible square roots, π from circles — and showed they were the same story told three ways.
Start with e ≈ 2.71828, the natural growth constant. It answers the question: if a bank paid 100% annual interest and compounded it continuously, what would $1 become in a year? Euler defined it cleanly:
The function ex is the unique function that is its own derivative — growth whose speed equals its size. Then Euler did something audacious: he fed the series an imaginary number. Substituting x = iθ and watching the powers of i cycle through i, −1, −i, 1, the series splits perfectly into two familiar pieces — cosine and sine:
This says that exponential growth in an imaginary direction is rotation. Multiplying by eiθ doesn't stretch a number — it turns it by angle θ around the origin. The whole machinery of waves, signals, alternating current, and quantum mechanics runs on this one fact. Set θ = π (half a turn) and you land exactly on −1:
Try it in Octave
GNU Octave handles complex numbers natively — exp() happily accepts imaginary arguments. Verify Euler's formula and identity numerically:
% --- Approximating e two ways ------------------------------- n = 1e6; e_limit = (1 + 1/n)^n % compound-interest limit e_series = sum(1 ./ factorial(0:15)) % series: converges FAST abs(e_series - exp(1)) % error ~ 1e-13 with 16 terms % --- Euler's formula: exp(i*theta) == cos + i*sin ----------- theta = linspace(0, 2*pi, 9).'; lhs = exp(1i*theta); rhs = cos(theta) + 1i*sin(theta); max(abs(lhs - rhs)) % ~ 1e-16: machine epsilon % --- Euler's identity --------------------------------------- exp(1i*pi) + 1 % ~ 0 + 1.2246e-16i % --- Draw the unit circle from pure exponentials ------------ t = linspace(0, 2*pi, 400); z = exp(1i*t); plot(real(z), imag(z), 'linewidth', 2); axis equal; grid on; title('The unit circle is e^{i\theta}');
The Basel Problem: π Hiding in the Integers
For ninety years, the best mathematicians in Europe — including the Bernoullis of Euler's home city of Basel — had tried to sum a simple-looking series and failed. In 1735, a 28-year-old Euler announced the answer, and it was scandalous: π appears out of nowhere.
What does a circle have to do with adding up fractions of square numbers? Euler's insight was to treat sin(x)/x as an infinite polynomial and factor it by its roots (±π, ±2π, ±3π, …), exactly as you'd factor a quadratic. Comparing the x² coefficient on both sides forces the sum of reciprocal squares to equal π²/6. It was daring, not yet rigorous — and completely correct.
The move opened a door Euler kept walking through. He computed Σ 1/n⁴ = π⁴/90, Σ 1/n⁶ = π⁶/945, and — most consequentially — discovered the Euler product, rewriting the whole series as a product over the primes:
That identity is the bridge between analysis (smooth sums) and arithmetic (the primes). A century later Riemann would extend it into the complex plane; a young Gauss, as we'll see, would attack the primes from the other side entirely.
% --- Partial sums of the Basel series ----------------------- N = 100000; n = 1:N; partial = cumsum(1 ./ n.^2); target = pi^2 / 6; printf('sum of 1/n^2 (N=%d): %.10f\n', N, partial(end)); printf('pi^2/6 : %.10f\n', target); printf('remaining gap ~1/N: %.2e\n', target - partial(end)); % --- Visualize convergence ---------------------------------- semilogx(n, partial, 'linewidth', 1.5); hold on; yline(target, '--'); xlabel('terms'); ylabel('partial sum'); title('Basel problem: crawling toward \pi^2/6'); % --- Euler product over primes vs the zeta sum, s = 2 -------- p = primes(2000); euler_product = prod(1 ./ (1 - p.^(-2))); printf('Euler product : %.10f\n', euler_product); printf('zeta(2) : %.10f\n', target); % Two utterly different computations, one number.
Seven Bridges, and the Birth of Graph Theory
The citizens of Königsberg had a Sunday puzzle: could you stroll through the city crossing each of its seven bridges exactly once? In 1736 Euler proved you couldn't — and in doing so invented a new kind of mathematics where shape doesn't matter, only connection.
Euler's move was ruthless abstraction. The islands and riverbanks became dots (vertices); the bridges became lines (edges). Distances, angles, the width of the river — all irrelevant. What remained was pure connectivity, and one decisive observation: every time your walk passes through a landmass, it consumes two bridges — one in, one out. So any landmass that isn't the start or end of the walk must touch an even number of bridges.
In Königsberg, all four landmasses touch an odd number of bridges. The walk is impossible — not hard, not undiscovered, but provably impossible. This paper is the founding document of graph theory and an ancestor of topology, which Euler called geometria situs: the geometry of position.
% Königsberg as an adjacency matrix (multigraph: entries count bridges) % order: N (north bank), I (island), S (south bank), E (east spit) A = [0 2 0 1; 2 0 2 1; 0 2 0 1; 1 1 1 0]; deg = sum(A, 2).' % degree of each landmass -> [3 5 3 3] odd_vertices = sum(mod(deg, 2) == 1) if odd_vertices == 0 disp('Euler CIRCUIT exists (return to start).') elseif odd_vertices == 2 disp('Euler PATH exists (start and end differ).') else disp('No Euler path: Königsberg walk is impossible.') end % Repair the city: remove one bridge between N and I ... B = A; B(1,2) = 1; B(2,1) = 1; degB = sum(B,2).' printf('odd vertices after demolition: %d -> walk possible!\n', ... sum(mod(degB,2)==1));
V − E + F = 2: The First Topological Invariant
Count the corners of a cube, subtract its edges, add its faces: 8 − 12 + 6 = 2. Do the same for a pyramid, a soccer ball, a diamond crystal — always 2. Euler noticed this in 1750 and understood it was not a fact about any particular solid, but about space itself.
The number 2 is the Euler characteristic of the sphere. Deform a cube like clay into a ball and the formula survives, because it never depended on flatness or angles — only on how the surface is stitched together. A donut-shaped polyhedron gives V − E + F = 0; a two-holed pretzel gives −2. Each shape of space has its own number. This is the seed of algebraic topology, and it's Euler's geometria situs again: position without measurement.
One elegant consequence: the formula proves there are exactly five Platonic solids — no sixth regular solid can exist, because V − E + F = 2 combined with regularity has only five integer solutions.
The Totient: Euler's Gift to Cryptography
Euler also planted the flag Gauss would later claim: number theory. His totient function φ(n) counts how many integers from 1 to n share no factor with n — and it powers a theorem that, 250 years later, became the engine of RSA encryption.
For a prime p, every smaller number is coprime to it, so φ(p) = p − 1. For a product of two distinct primes, φ(pq) = (p−1)(q−1) — easy to compute if you know the factors, and believed hard if you don't. That asymmetry is the entire secret of public-key cryptography. Euler's theorem generalizes Fermat's little theorem:
% helper: Octave's built-in is powmod; alias for portability if ~exist('powermod','file') function r = powermod(a,e,n), r = powmod(a,e,n); endfunction endif % helper for portability: Octave builtin is powmod if ~exist('powermod','file') function r = powermod(a,e,n), r = powmod(a,e,n); endfunction endif % --- Euler's totient from first principles ------------------ function t = totient(n) t = sum(gcd(1:n, n) == 1); endfunction arrayfun(@totient, 1:12) % 1 1 2 2 4 2 6 4 6 4 10 4 % --- Verify Euler's theorem: a^phi(n) mod n == 1 ------------ n = 20; a = 7; % gcd(7,20)=1 printf('7^phi(20) mod 20 = %d\n', powermod(a, totient(n), n)); % --- Toy RSA in eight lines --------------------------------- p = 61; q = 53; % (real keys use 300-digit primes) n = p*q; % public modulus: 3233 phi = (p-1)*(q-1); % Euler's totient: 3120 e = 17; % public exponent, coprime to phi [g, d, ~] = gcd(e, phi); d = mod(d, phi); % d = e^{-1} mod phi, requires g==1 % private key: e*d ≡ 1 mod phi msg = 1707; % the message: Euler's birth year c = powermod(msg, e, n); % encrypt with the PUBLIC key back= powermod(c, d, n); % decrypt with the PRIVATE key printf('message %d -> cipher %d -> decrypted %d\n', msg, c, back);
The Torch Passes
In 1784, one year after Euler's death, a seven-year-old in Brunswick was set a busywork problem by his schoolmaster Büttner: add every number from 1 to 100. The boy wrote a single number on his slate almost immediately and announced, in Low German, "Ligget se" — there it lies.
Young Gauss had seen what the drill was hiding. Fold the sequence in half: 1 + 100 = 101, 2 + 99 = 101, 3 + 98 = 101 … fifty pairs, each summing to 101. The answer is 50 × 101 = 5050. The story may be polished by retelling, but the instinct it captures is authentic Gauss: never compute what you can understand.
The duke of Brunswick heard of the bricklayer's son and paid his way through school and university. Gauss repaid the debt by absorbing everything — above all the works of Euler, the master he never met. Then, at nineteen, he did something Euler never had: he broke a problem that had stood since Euclid.
The Disquisitiones and Clock Arithmetic
In 1801, at 24, Gauss published the Disquisitiones Arithmeticae — and number theory went from a collection of clever puzzles to a systematic science. Its opening move looks almost too simple: a new notation for remainders.
Two numbers are congruent modulo m if they leave the same remainder on division by m — if they land on the same position of an m-hour clock. The genius is in the ≡ sign itself: Gauss chose a symbol that looks like equality because congruences behave like equations. You can add them, multiply them, and (carefully) divide them. Whole theories — quadratic reciprocity, which Gauss proved at 19 and loved enough to prove seven more times, calling it his theorema aureum, the golden theorem — flow from this one piece of good notation.
Euler had proven individual results about remainders; Gauss built them a home. Every hash table, every checksum, every cryptographic protocol on Earth now speaks Gauss's language of congruence.
% helper: Octave's built-in is powmod; alias for portability if ~exist('powermod','file') function r = powermod(a,e,n), r = powmod(a,e,n); endfunction endif % --- Congruence basics -------------------------------------- mod(1777, 7) % Gauss's birth year on a 7-clock mod(-3, 12) % Octave gives 9: always in 0..m-1 % --- A multiplication table mod 7 (a field!) ---------------- m = 7; [K, J] = meshgrid(0:m-1); mod(K .* J, m) % every nonzero row is a permutation % --- Quadratic residues: which numbers are squares mod p? --- p = 13; QR = unique(mod((1:p-1).^2, p)) % -> 1 3 4 9 10 12 (exactly (p-1)/2) % --- Euler's criterion links the two men directly ----------- % a is a square mod p <=> a^((p-1)/2) ≡ 1 (mod p) a = 10; powermod(a, (p-1)/2, p) % 1 -> yes, 10 is a QR mod 13 a = 5; powermod(a, (p-1)/2, p) % p-1 (i.e. -1) -> not a square
The Seventeen-Sided Polygon
On the morning of March 30, 1796, a nineteen-year-old still deciding between philology and mathematics woke up knowing something no human had known in the 2,000 years since Euclid: the regular 17-gon can be drawn with compass and straightedge alone. He chose mathematics that day, and started a diary.
The Greeks could construct regular polygons with 3, 4, 5, 6, 8, 10, 12, 15 sides — but 7, 9, 11, 13, 14 defeated them, and everyone assumed 17 was equally hopeless. Gauss saw the problem wasn't geometry at all. The corners of an n-gon are the complex roots of zn = 1 — points e2πik/n on Euler's unit circle. Compass and straightedge can only take square roots. So the question becomes pure algebra: can cos(2π/17) be built from nested square roots? Gauss proved it can — because 17 = 2⁴ + 1 is a Fermat prime, and 16 halves down to 1 in exactly four steps: 16 → 8 → 4 → 2 → 1, each step a square root.
He was so proud of it that he asked for a 17-gon on his tombstone. (The stonemason refused — with that many sides it would just look like a circle — and carved a 17-pointed star on a memorial in Brunswick instead.)
Finding a Lost Planet: Ceres and Least Squares
On New Year's Day 1801, the astronomer Piazzi spotted a faint new "planet" between Mars and Jupiter — then lost it in the sun's glare after tracking it across just 3° of sky. Europe's astronomers despaired of ever finding it again. A 24-year-old with no telescope announced where it would reappear. In December, it was exactly there.
Gauss's weapon was a question nobody had answered properly: when your measurements disagree — and they always disagree — what is the best estimate they collectively point to? His answer: choose the parameters that minimize the sum of the squared errors.
Why squares? Gauss showed that if measurement errors follow his bell-shaped curve (next section), least squares gives the most probable parameters — the method and the distribution justify each other. Squaring also punishes large errors heavily, keeps everything differentiable, and reduces the whole problem to solving a linear system (by, naturally, Gaussian elimination). Two centuries later, least squares is still the beating heart of statistics, GPS positioning, machine learning's loss functions, and every trend line ever fitted.
% Noisy observations of a hidden line y = 2.5x - 1 ------------- rng(1801) % Octave ≥7: use rng; older: rand("seed",1801); % the year of Ceres x = linspace(0, 10, 25).'; y = 2.5*x - 1 + randn(size(x))*1.5; % --- Way 1: the normal equations, exactly as Gauss did ------- A = [x, ones(size(x))]; % design matrix beta1 = (A.'*A) \ (A.'*y) % solve A'A β = A'y % --- Way 2: Octave's backslash (QR under the hood) ----------- beta2 = A \ y % --- Way 3: polyfit ------------------------------------------- beta3 = polyfit(x, y, 1) % --- Judge the fit -------------------------------------------- yhat = A*beta1; SSres = sum((y - yhat).^2); SStot = sum((y - mean(y)).^2); R2 = 1 - SSres/SStot plot(x, y, 'o', x, yhat, '-', 'linewidth', 2); title(sprintf('Least squares: y = %.2fx + %.2f (R^2 = %.3f)', ... beta1(1), beta1(2), R2));
The Bell Curve: A Portrait of Error Itself
Every measurement lies a little. Gauss asked what the lies look like in aggregate — and derived the one curve consistent with reasonable assumptions about error: symmetric, concentrated, with the arithmetic mean as the best estimate. The result is the most famous shape in science.
Look closely at the formula: e and π — Euler's constants — are right there in the portrait of randomness. The mean μ slides the bell; the standard deviation σ sets its width; the √(2π) (from the Gaussian integral ∫e−x²dx = √π) makes the total probability exactly 1.
The reason this curve is everywhere — heights, exam scores, noise in electronics, thermal motion — is the central limit theorem: add up many small independent influences, whatever their individual shapes, and their sum drifts inevitably toward the Gaussian. It is less a law of nature than a law of aggregation.
% Sums of UNIFORM randomness become GAUSSIAN ------------------- N = 20000; % experiments k = 12; % dice per experiment sums = sum(rand(k, N)); % each column: sum of k uniforms mu = k/2; sigma = sqrt(k/12); % theory for uniform sums z = (sums - mu) / sigma; % standardize histogram(z, 60, 'Normalization','pdf'); hold on; % was hist(z,60,1) – deprecated % normalized histogram t = linspace(-4, 4, 200); plot(t, exp(-t.^2/2)/sqrt(2*pi), 'linewidth', 2); title('12 uniform dice, summed: the bell emerges'); % The 68-95-99.7 rule, checked empirically --------------------- for s = 1:3 printf('within %d sigma: %.2f%% (theory %.2f%%)\n', s, ... 100*mean(abs(z) < s), 100*erf(s/sqrt(2))); end % Bonus: the Gaussian integral that tames sqrt(2*pi) ----------- quadgk(@(x) exp(-x.^2), -10, 10) % sqrt(pi) % -> 1.7725 = sqrt(pi)
Counting the Primes: A Teenager's Conjecture
At fifteen, Gauss was given a table of logarithms with a list of primes bound in the back. He began tallying primes in blocks of a thousand — a lifelong hobby; he eventually counted into the millions — and noticed that their density near a number x thins out like 1/ln x.
Here π(x) counts the primes up to x. Gauss's refined guess, the logarithmic integral Li(x), is astonishingly accurate: at x = 10⁹ it errs by 0.0003%. He never published the conjecture — pauca sed matura — mentioning it only in an 1849 letter. The proof took a century and required, fittingly, the machinery Euler had seeded: Riemann carried the Euler product into the complex plane, and the primes' rhythm turned out to be written in the zeros of the zeta function. The two protagonists of this guide meet inside the deepest unsolved problem in mathematics, the Riemann Hypothesis.
% --- Sieve of Eratosthenes, vectorized ----------------------- function pr = sieve(N) isp = true(1, N); isp(1) = false; for k = 2:floor(sqrt(N)) if isp(k), isp(k*k:k:N) = false; end end pr = find(isp); endfunction N = 1e6; pr = sieve(N); x = logspace(2, 6, 40); pix = arrayfun(@(v) sum(pr <= v), x); % π(x) by counting approx1 = x ./ log(x); % Gauss, age 15 approx2 = arrayfun(@(v) quadgk(@(t) 1./log(t), 2, v) % quad is deprecated → quadgk, x); % Li(x) % Relative errors of the two approximations ------------------- semilogx(x, 100*(approx1 - pix)./pix, '-o', ... x, 100*(approx2 - pix)./pix, '-s'); legend('x/ln x', 'Li(x)'); grid on; ylabel('error (%)'); title('Gauss vs the primes: Li(x) is eerily good'); printf('pi(10^6) = %d; Li: %.0f; x/ln x: %.0f\n', ... pix(end), approx2(end), approx1(end));
The Remarkable Theorem: Curvature from Within
In the 1820s Gauss spent summers doing something unglamorous: surveying the Kingdom of Hanover, hauling instruments up hills. Out of that muddy fieldwork came the deepest idea of his career — that a surface's curvature can be measured entirely from inside it.
Gauss defined the curvature K of a surface at a point as the product of its two principal curvatures — how sharply it bends in its most- and least-curved directions. A sphere of radius R has K = 1/R² everywhere; a flat sheet has K = 0; a saddle has K < 0. The shock is his Theorema Egregium ("remarkable theorem"): K is unchanged by any bending that doesn't stretch the surface. Creatures living on the surface, measuring only distances along it, can compute K without ever peeking at the third dimension.
Everyday consequences first: a flat sheet (K = 0) can roll into a cylinder (still K = 0) but can never wrap a sphere (K > 0) without wrinkling or tearing — which is why every flat map of Earth lies, and why a slice of pizza droops until you fold it lengthwise, forcing its zero curvature to spend itself on stiffness. Deeper consequence: if curvature is intrinsic, then a space needs no outside to be curved in. Gauss's student Riemann generalized this to any number of dimensions; Einstein then proposed that gravity is the intrinsic curvature of four-dimensional spacetime. The line from Hanover's muddy survey triangles to general relativity is direct.
I am becoming more and more convinced that the necessity of our geometry cannot be proved... perhaps in another life we will attain other insights into the essence of space, which is now unattainable to us.— GAUSS, LETTER TO OLBERS, 1817 — DECADES BEFORE NON-EUCLIDEAN GEOMETRY WAS PUBLISHED
His private notebooks show he had worked out non-Euclidean geometry and suppressed it, fearing — as he wrote to Bessel — the "clamor of the Boeotians." When Bolyai and Lobachevsky published, priority passed to bolder hands. Pauca sed matura cut both ways.
Convergence: Two Voices, One Mathematics
Put the two life's-works side by side and a pattern emerges: again and again, Euler discovers the phenomenon and Gauss discovers the law. Euler is the explorer who maps the coastline; Gauss is the cartographer who proves the map correct.
| Theme | Euler's move | Gauss's move |
|---|---|---|
| PRIMES | The Euler product ties primes to analysis; proves infinitude of primes analytically | Conjectures the Prime Number Theorem from hand-tallied data at 15 |
| RECIPROCITY | Conjectures quadratic reciprocity from numerical patterns | Proves it at 19 — then seven more times, his "golden theorem" |
| COMPLEX NUMBERS | Computes with them fearlessly: eiθ, roots of unity | Legitimizes them: the complex plane, and the Fundamental Theorem of Algebra — every polynomial of degree n has exactly n complex roots |
| ROOTS OF UNITY | Places the n-gon's corners at e2πik/n | Dissects them with Gaussian periods to construct the 17-gon |
| TOPOLOGY & GEOMETRY | V − E + F = 2; geometry of position | Intrinsic curvature; the Gauss–Bonnet theorem later welds the two: ∫K dA = 2πχ |
| METHOD | Publish everything — 850 works; let ideas breathe in the open | Pauca sed matura — publish only what is polished; the notebooks keep the rest |
The last row of that table is the real lesson. Euler's torrential openness gave the 18th century its working vocabulary; Gauss's ruthless standards gave the 19th century its rigor. Mathematics needs both temperaments — the river and the lens — and arguably every mathematician since has had to choose a point on the axis between them.
One last meeting point: the FFT
In an unpublished 1805 manuscript on interpolating asteroid orbits, Gauss worked out a fast recursive trick for computing trigonometric sums — the fast Fourier transform, 160 years before Cooley and Tukey reinvented it in 1965. And what does the FFT compute? Sums of Euler's e−2πikn/N — his formula, factored by Gauss's cleverness. Every JPEG, MP3, Wi-Fi packet and MRI scan runs on the two of them jointly.
% A signal with two hidden tones + noise ----------------------- fs = 512; t = (0:fs-1)/fs; sig = sin(2*pi*17*t) + 0.6*sin(2*pi*60*t) + 0.4*randn(size(t)); % ^ a 17 Hz tone, in Gauss's honor % The DFT is literally a matrix of Euler's formula -------------- N = numel(sig); [k, n] = meshgrid(0:N-1); W = exp(-2i*pi*k.*n/N); % e^{-2πikn/N}: pure Euler slow = W * sig.'; % O(N^2) multiply fast = fft(sig).'; % O(N log N): pure Gauss max(abs(slow - fast)) % ~1e-10: same numbers % Time them ------------------------------------------------------ tic; W * sig.'; t_slow = toc; tic; fft(sig); t_fast = toc; printf('matrix DFT: %.4fs fft: %.6fs speedup: %.0fx\n', ... t_slow, t_fast, t_slow/max(t_fast,eps)); % Find the hidden tones ------------------------------------------ P = abs(fast)/N; f = (0:N-1)*fs/N; plot(f(1:N/2), 2*P(1:N/2), 'linewidth', 1.5); xlabel('Hz'); title('Spectrum: peaks at 17 and 60 Hz');
And one for the road: Gaussian elimination
% Fit a parabola through three observed points ------------------- % (the shape of every projectile, and of Ceres' apparent path) P = [1 4; 2 3; 4 7]; % (x, y) observations A = [P(:,1).^2, P(:,1), ones(3,1)]; b = P(:,2); coef = A \ b % Gaussian elimination inside [L, U, Pm] = lu(A); % see the elimination explicitly L, U % A = P'LU: the row-reduction record xs = linspace(0, 5, 100); plot(P(:,1), P(:,2), 'o', xs, polyval(coef, xs), '-'); title('Three points, one parabola: A\\b'); % Historical footnote: "Gaussian" elimination appears in the % Chinese "Nine Chapters" ~2000 years earlier; Gauss systematized % it for least-squares normal equations, and the name stuck.
Where to go next in this library
Euler's formula is the working language of the Feynman path-integral guide (every path contributes eiS/ħ) and the Fourier machinery in the Maxwell and circuits guides. Gauss's totient and modular arithmetic are the foundation of the cryptography series, and his intrinsic curvature leads directly into the string theory / M-theory guide. The Basel problem's zeta function reappears — analytically continued — in the Mathematical Tapestry. This page is a hub; nearly every guide on the shelf cites one of these two men.
Mathematics is the queen of the sciences, and arithmetic the queen of mathematics.— CARL FRIEDRICH GAUSS · SARTORIUS VON WALTERSHAUSEN'S MEMOIR, 1856