Part V — Chapter 15

Carl Friedrich Gauss

The Prince of Mathematicians who reshaped number theory, geometry, and statistics

15.1 Carl Friedrich Gauss (1777 – 1855)

Carl Friedrich Gauss was born on April 30, 1777 in Braunschweig (Brunswick), Germany, to a poor working-class family. His father was a gardener and bricklayer; his mother was illiterate. Yet from his earliest years, Gauss displayed a mathematical talent so extraordinary that it bordered on the supernatural.

The most famous anecdote of his childhood comes from his primary school days. When Gauss was about seven or eight years old, his teacher, seeking to occupy the class for a while, asked the students to add up all the integers from 1 to 100. Within seconds, young Gauss placed his slate on the teacher's desk with the correct answer: 5050. He had noticed that the numbers could be paired —$1 + 100 = 101$, $2 + 99 = 101$, $3 + 98 = 101$, and so on — giving 50 pairs each summing to 101:

$$\sum_{k=1}^{n} k = \frac{n(n+1)}{2} = \frac{100 \times 101}{2} = 5050$$

This story, whether precisely true or embellished, captures Gauss's defining trait: the ability to see deep structure where others saw only tedious computation. By the age of fifteen, he was reading Newton's Principia and Euler's works in Latin, absorbing their content with ease. His early mathematical diary, begun in 1796 and spanning 19 pages with 146 entries, recorded a stream of discoveries that would have made the career of any mathematician.

Gauss's Life — Key Dates

  • 1777 — Born in Braunschweig, Germany
  • 1792 — Enters the Collegium Carolinum, funded by the Duke of Brunswick
  • 1795–1798 — Studies at Göttingen; constructs the regular 17-gon (1796)
  • 1796 — Proves quadratic reciprocity (first complete proof)
  • 1799 — Doctoral thesis: first proof of the Fundamental Theorem of Algebra
  • 1801 — Publishes Disquisitiones Arithmeticae; predicts orbit of Ceres
  • 1805 — Marries Johanna Osthoff; they have three children before her death in 1809
  • 1807 — Appointed director of the Göttingen observatory
  • 1809 — Publishes Theoria Motus (method of least squares)
  • 1818–1826 — Conducts geodetic survey of the Kingdom of Hanover
  • 1827 — Publishes Disquisitiones Generales circa Superficies Curvas (differential geometry)
  • 1831 — Begins collaboration with Wilhelm Weber on electromagnetism
  • 1833 — Builds one of the first electromagnetic telegraphs with Weber
  • 1840s — Works on potential theory, publishes general results on inverse-square force laws
  • 1855 — Dies in Göttingen on February 23

Gauss's talents attracted the attention of the Duke of Brunswick, who funded his education at the Collegium Carolinum and then at the University of Göttingen. During his student years, Gauss made discovery after discovery in rapid succession. His mathematical diary, discovered long after his death, reveals that he had independently discovered many results that would be credited to others — including the Fast Fourier Transform (rediscovered by Cooley and Tukey in 1965), non-Euclidean geometry (claimed by Bolyai and Lobachevsky), and the prime number theorem (proved by Hadamard and de la Vallée-Poussin in 1896).

Gauss's motto was “Pauca sed matura” — “Few, but ripe.” Unlike Euler, who published everything, Gauss published only work he considered polished and complete, famously saying that an architect does not leave the scaffolding after the building is finished. This perfectionism meant that much of his work was discovered only after his death, in his notebooks and correspondence.

His personal life was marked by tragedy. His first wife, Johanna, died in 1809 shortly after the birth of their third child, who also died. Though he remarried (to Johanna's best friend, Minna Waldeck), Gauss never fully recovered from this loss. His relationships with his sons were difficult — he discouraged them from pursuing mathematics, fearing they would diminish the family name. Despite personal sorrows, his mathematical output remained extraordinary throughout his life.

15.2 Disquisitiones Arithmeticae (1801)

The Disquisitiones Arithmeticae, published when Gauss was just 24, is one of the most important books in the history of mathematics. It essentially created modern number theory as a rigorous, systematic discipline. The work introduced modular arithmetic with a clear notation and developed the theory of quadratic forms and quadratic residues to an extraordinary depth.

The book is divided into seven sections. The first three develop the arithmetic of congruences, culminating in a proof of quadratic reciprocity. Section IV treats quadratic residues in depth. Section V, the longest and most original, develops a comprehensive theory of binary quadratic forms. Section VI applies the theory to various problems. Section VII treats cyclotomy — the theory of roots of unity — and contains the proof that the regular 17-gon is constructible. Gauss had planned an eighth section on higher-degree congruences, but it was never published.

Modular Arithmetic — Gauss's Congruence Notation

Gauss introduced the congruence notation that is now universal. We write:

$$a \equiv b \pmod{m}$$

to mean that $m$ divides $a - b$, i.e., $m \mid (a - b)$. For example, $17 \equiv 2 \pmod{5}$ because $5 \mid 15$.

Gauss proved that congruences satisfy:

  • If $a \equiv b$ and $c \equiv d \pmod{m}$, then $a + c \equiv b + d \pmod{m}$
  • If $a \equiv b$ and $c \equiv d \pmod{m}$, then $ac \equiv bd \pmod{m}$
  • If $a \equiv b \pmod{m}$, then $a^k \equiv b^k \pmod{m}$ for all $k \geq 0$

Worked Example: Arithmetic in Modular Systems

Let us compute $7^{100} \pmod{13}$ using Fermat's little theorem, which Gauss employed extensively in the Disquisitiones.

By Fermat's little theorem, $7^{12} \equiv 1 \pmod{13}$ since $\gcd(7, 13) = 1$.

We write $100 = 12 \times 8 + 4$, so:

$$7^{100} = (7^{12})^8 \cdot 7^4 \equiv 1^8 \cdot 7^4 \equiv 7^4 \pmod{13}$$

Now $7^2 = 49 \equiv 10 \pmod{13}$, so $7^4 = (7^2)^2 \equiv 10^2 = 100 \equiv 9 \pmod{13}$.

Therefore $7^{100} \equiv 9 \pmod{13}$.

Quadratic Residues and the Legendre Symbol

An integer $a$ is a quadratic residue modulo an odd prime $p$ (with $p \nmid a$) if the congruence $x^2 \equiv a \pmod{p}$ has a solution. Otherwise, $a$ is a quadratic non-residue.

The Legendre symbol encodes this:

$$\left(\frac{a}{p}\right) = \begin{cases} 1 & \text{if } a \text{ is a QR mod } p \\ -1 & \text{if } a \text{ is a QNR mod } p \\ 0 & \text{if } p \mid a \end{cases}$$

Euler's criterion gives a computational formula: $\left(\frac{a}{p}\right) \equiv a^{(p-1)/2} \pmod{p}$.

Quadratic Residues mod 7

The squares modulo 7 are:

$1^2 \equiv 1, \; 2^2 \equiv 4, \; 3^2 \equiv 2, \; 4^2 \equiv 2, \; 5^2 \equiv 4, \; 6^2 \equiv 1 \pmod{7}$

So the quadratic residues mod 7 are $\{1, 2, 4\}$ and the non-residues are $\{3, 5, 6\}$.

The Disquisitiones also developed the theory of quadratic forms$ax^2 + bxy + cy^2$, classifying them by their discriminant $D = b^2 - 4ac$. Gauss showed that equivalence classes of forms under linear substitutions form a finite group (the class group), a concept that would later become central to algebraic number theory.

Binary Quadratic Forms and Composition

A binary quadratic form is an expression $f(x,y) = ax^2 + bxy + cy^2$ where$a, b, c \in \mathbb{Z}$. Two forms are equivalent if one can be transformed into the other by a substitution $x = \alpha X + \beta Y$, $y = \gamma X + \delta Y$where $\alpha\delta - \beta\gamma = 1$.

Gauss defined a composition operation on equivalence classes of forms with the same discriminant, making them into what we now recognize as a finite abelian group — the class group$\text{Cl}(D)$. The order of this group, the class number $h(D)$, measures the failure of unique factorization in the corresponding quadratic number field.

Worked Example: Representing Integers by Forms

Consider the form $f(x,y) = x^2 + y^2$ with discriminant $D = -4$. Which primes can be represented as $p = x^2 + y^2$?

By Fermat's theorem (proved rigorously by Gauss): $p = x^2 + y^2$ if and only if$p = 2$ or $p \equiv 1 \pmod{4}$.

Concrete examples:

  • $2 = 1^2 + 1^2$
  • $5 = 1^2 + 2^2$
  • $13 = 2^2 + 3^2$
  • $17 = 1^2 + 4^2$
  • $29 = 2^2 + 5^2$
  • $37 = 1^2 + 6^2$

Note that 3, 7, 11, 19, 23 (all $\equiv 3 \pmod 4$) cannot be so represented.

15.3 Quadratic Reciprocity

Gauss called the law of quadratic reciprocity the “golden theorem” (theorema aureum) and considered it one of the most beautiful results in mathematics. It had been conjectured by Euler and partially proved by Legendre, but Gauss was the first to give a complete proof, in 1796 at the age of eighteen. He would eventually produce at least six different proofs throughout his lifetime, each illuminating a different facet of this deep result.

The Law of Quadratic Reciprocity

Let $p$ and $q$ be distinct odd primes. Then:

$$\left(\frac{p}{q}\right)\left(\frac{q}{p}\right) = (-1)^{\frac{p-1}{2}\cdot\frac{q-1}{2}}$$

Equivalently:

  • If $p \equiv 1 \pmod{4}$ or $q \equiv 1 \pmod{4}$ (or both), then $\left(\frac{p}{q}\right) = \left(\frac{q}{p}\right)$
  • If $p \equiv q \equiv 3 \pmod{4}$, then $\left(\frac{p}{q}\right) = -\left(\frac{q}{p}\right)$

The two supplements handle $-1$ and $2$:

$$\left(\frac{-1}{p}\right) = (-1)^{(p-1)/2} = \begin{cases} 1 & p \equiv 1 \pmod{4} \\ -1 & p \equiv 3 \pmod{4} \end{cases}$$
$$\left(\frac{2}{p}\right) = (-1)^{(p^2-1)/8} = \begin{cases} 1 & p \equiv \pm 1 \pmod{8} \\ -1 & p \equiv \pm 3 \pmod{8} \end{cases}$$

Gauss's first proof, given in the Disquisitiones, used an intricate induction argument. His later proofs used Gauss sums, which connect number theory to analysis in a deep way. The Gauss sum associated to a character modulo a prime$p$ is defined as follows:

Gauss Sums

For an odd prime $p$, the quadratic Gauss sum is:

$$g = \sum_{a=0}^{p-1} \left(\frac{a}{p}\right) e^{2\pi i a/p}$$

Gauss proved the remarkable identity $g^2 = (-1)^{(p-1)/2} \cdot p$, which can be written as:

$$g^2 = \left(\frac{-1}{p}\right) p = \begin{cases} p & \text{if } p \equiv 1 \pmod{4} \\ -p & \text{if } p \equiv 3 \pmod{4} \end{cases}$$

Determining the sign of $g$ itself (not just $g^2$) was a much harder problem that Gauss solved only after years of effort, proving that $g > 0$ when the sum is taken with a specific choice of primitive root.

Worked Example: Is 3 a Quadratic Residue mod 41?

We want to determine $\left(\frac{3}{41}\right)$. Both 3 and 41 are odd primes.

Since $41 \equiv 1 \pmod{4}$, by quadratic reciprocity:

$$\left(\frac{3}{41}\right) = \left(\frac{41}{3}\right) = \left(\frac{41 \bmod 3}{3}\right) = \left(\frac{2}{3}\right)$$

Now $3 \equiv 3 \pmod{8}$, so by the second supplement: $\left(\frac{2}{3}\right) = (-1)^{(9-1)/8} = (-1)^1 = -1$.

Therefore $\left(\frac{3}{41}\right) = -1$, meaning 3 is a quadratic non-residue mod 41. The equation $x^2 \equiv 3 \pmod{41}$ has no solution.

Worked Example: Is 5 a Quadratic Residue mod 23?

We want $\left(\frac{5}{23}\right)$. Since $5 \equiv 1 \pmod{4}$, reciprocity gives:

$$\left(\frac{5}{23}\right) = \left(\frac{23}{5}\right) = \left(\frac{3}{5}\right)$$

Now we need $\left(\frac{3}{5}\right)$. Since $3 \equiv 3 \pmod{4}$ and$5 \equiv 1 \pmod{4}$, reciprocity gives $\left(\frac{3}{5}\right) = \left(\frac{5}{3}\right) = \left(\frac{2}{3}\right) = -1$.

Therefore $\left(\frac{5}{23}\right) = -1$, and $x^2 \equiv 5 \pmod{23}$ has no solution.

The significance of quadratic reciprocity goes far beyond the specific result. It is the simplest example of a reciprocity law, a pattern that pervades number theory at the deepest levels. The search for higher reciprocity laws — cubic reciprocity, quartic reciprocity, and beyond — led to algebraic number theory (Kummer, Dedekind), class field theory (Hilbert, Artin), and ultimately to the Langlands program, one of the most ambitious research programs in modern mathematics.

Gauss himself studied biquadratic (quartic) reciprocity, and it was in this context that he introduced the Gaussian integers (Section 15.4). He showed that the law of quartic reciprocity takes its most natural form not over the ordinary integers, but over$\mathbb{Z}[i]$. This was one of the earliest hints that number theory requires the study of more general number rings beyond $\mathbb{Z}$.

15.4 Gaussian Integers

In his investigations of higher reciprocity laws (specifically, biquadratic reciprocity), Gauss was led to consider integers of the form $a + bi$ where $a, b \in \mathbb{Z}$ and$i = \sqrt{-1}$. These are now called Gaussian integersand form the ring $\mathbb{Z}[i]$.

The Gaussian Integers

The set $\mathbb{Z}[i] = \{a + bi : a, b \in \mathbb{Z}\}$ forms a ring under the usual addition and multiplication of complex numbers. The norm of a Gaussian integer is:

$$N(a + bi) = a^2 + b^2 = (a + bi)(a - bi)$$

The norm is multiplicative: $N(\alpha\beta) = N(\alpha)N(\beta)$. The units of $\mathbb{Z}[i]$ (elements with norm 1) are$\{1, -1, i, -i\}$.

Division with remainder works in $\mathbb{Z}[i]$: for any $\alpha, \beta \in \mathbb{Z}[i]$with $\beta \neq 0$, there exist $q, r \in \mathbb{Z}[i]$ such that$\alpha = q\beta + r$ and $N(r) < N(\beta)$. This makes $\mathbb{Z}[i]$a Euclidean domain, and therefore a principal ideal domain and a unique factorization domain.

Worked Example: Euclidean Division in Gaussian Integers

Divide $\alpha = 11 + 7i$ by $\beta = 3 + i$.

Compute $\alpha / \beta = (11 + 7i)/(3 + i) = (11 + 7i)(3 - i)/((3 + i)(3 - i))$:

$$= \frac{(33 - 11i + 21i - 7i^2)}{9 + 1} = \frac{40 + 10i}{10} = 4 + i$$

So $q = 4 + i$ and $r = \alpha - q\beta = (11 + 7i) - (4 + i)(3 + i)$:

$$(4 + i)(3 + i) = 12 + 4i + 3i + i^2 = 11 + 7i$$

So $r = 0$, meaning $(3 + i) \mid (11 + 7i)$ exactly.

Classification of Gaussian Primes

A Gaussian integer $\pi$ is prime in $\mathbb{Z}[i]$ if and only if it is (up to units) one of:

  • $1 + i$ — the unique prime above 2, since $2 = -i(1+i)^2$
  • An ordinary prime $p \equiv 3 \pmod{4}$ — these remain prime (are “inert”) in $\mathbb{Z}[i]$
  • $a + bi$ where $a^2 + b^2 = p$ for a prime $p \equiv 1 \pmod{4}$ — these primes “split”

Factoring in the Gaussian Integers

  • $5 = (2 + i)(2 - i)$ since $5 \equiv 1 \pmod{4}$ and $N(2+i) = 5$
  • $13 = (3 + 2i)(3 - 2i)$ since $13 \equiv 1 \pmod{4}$ and $N(3+2i) = 13$
  • $3$ remains prime in $\mathbb{Z}[i]$ since $3 \equiv 3 \pmod{4}$
  • $7$ remains prime in $\mathbb{Z}[i]$ since $7 \equiv 3 \pmod{4}$
  • $29 = (5 + 2i)(5 - 2i)$ since $29 \equiv 1 \pmod{4}$ and $N(5+2i) = 29$
  • $2 = -i(1+i)^2$ — the prime 2 ramifies

A crucial theorem, proved by Gauss, is that $\mathbb{Z}[i]$ is a unique factorization domain (UFD): every non-zero non-unit Gaussian integer factors uniquely (up to order and units) into Gaussian primes. This property directly yields Fermat's two-square theorem:

Fermat's Two-Square Theorem (via Gaussian Integers)

An odd prime $p$ can be written as $p = a^2 + b^2$ if and only if $p \equiv 1 \pmod{4}$.

Proof sketch: If $p \equiv 1 \pmod{4}$, then $-1$ is a quadratic residue mod $p$ (by the first supplement to quadratic reciprocity), so there exists$x$ with $x^2 \equiv -1 \pmod{p}$. In $\mathbb{Z}[i]$, this means$p \mid (x + i)(x - i)$ but $p \nmid (x + i)$ and $p \nmid (x - i)$. Therefore $p$ is not prime in $\mathbb{Z}[i]$, so $p = \pi\bar{\pi}$for some Gaussian prime $\pi = a + bi$. Taking norms: $p^2 = N(\pi)N(\bar{\pi}) = (a^2+b^2)^2$, giving $p = a^2 + b^2$. $\blacksquare$

Worked Example: Finding Gaussian Factorizations

Factor $n = 65$ in $\mathbb{Z}[i]$.

First, $65 = 5 \times 13$. Since $5 \equiv 1 \pmod{4}$ and $13 \equiv 1 \pmod{4}$, both split:

$$65 = (2 + i)(2 - i)(3 + 2i)(3 - 2i)$$

This also explains why 65 can be written as a sum of two squares in two different ways:

$$65 = 1^2 + 8^2 = 4^2 + 7^2$$

These correspond to different groupings: $(2+i)(3+2i) = 4 + 7i$ and $(2+i)(3-2i) = 8 - i$, giving the two representations.

15.5 The Regular 17-gon Construction

On March 30, 1796, the eighteen-year-old Gauss made a discovery that convinced him to devote his life to mathematics: he proved that the regular 17-sided polygon (heptadecagon)can be constructed with compass and straightedge alone. This was the first advance in the problem of polygon constructibility since the ancient Greeks, who knew how to construct regular polygons with 3, 4, 5, 6, 8, 10, 12, and 15 sides. No progress had been made in over two thousand years.

Gauss's Constructibility Criterion

A regular $n$-gon is constructible with compass and straightedge if and only if:

$$n = 2^k \cdot p_1 \cdot p_2 \cdots p_m$$

where $k \geq 0$ and $p_1, p_2, \ldots, p_m$ are distinct Fermat primes — primes of the form $F_j = 2^{2^j} + 1$.

The known Fermat primes are: $F_0 = 3$, $F_1 = 5$, $F_2 = 17$,$F_3 = 257$, $F_4 = 65537$. No others have been found, and it is conjectured that these five are the only Fermat primes.

The key insight is that constructing a regular $n$-gon amounts to constructing$\cos(2\pi/n)$. A length is constructible if and only if it can be obtained from the rationals by a finite sequence of additions, subtractions, multiplications, divisions, and square roots. Algebraically, this means the minimal polynomial of $\cos(2\pi/n)$ must have degree that is a power of 2.

Gauss's Approach via Periods

Let $\omega = e^{2\pi i/17}$, a primitive 17th root of unity. The roots of $x^{17} - 1 = 0$ (excluding $x = 1$) satisfy the cyclotomic polynomial:

$$\Phi_{17}(x) = x^{16} + x^{15} + x^{14} + \cdots + x + 1$$

Since 3 is a primitive root modulo 17, the powers $3^0, 3^1, \ldots, 3^{15} \pmod{17}$give a cyclic permutation of $\{1, 2, \ldots, 16\}$. Gauss grouped these into periods of successively smaller size:

Two periods of length 8: The even powers of 3 mod 17 give one set, and the odd powers give another. Concretely, $\eta_1 = \omega + \omega^2 + \omega^4 + \omega^8 + \omega^{16} + \omega^{15} + \omega^{13} + \omega^9$and $\eta_2 = \omega^3 + \omega^5 + \omega^6 + \omega^7 + \omega^{10} + \omega^{11} + \omega^{12} + \omega^{14}$.

These satisfy $\eta_1 + \eta_2 = -1$ and $\eta_1 \eta_2 = -4$, giving the quadratic $t^2 + t - 4 = 0$, so $\eta_{1,2} = (-1 \pm \sqrt{17})/2$.

Gauss continued subdividing the periods. Each 8-element period splits into two 4-element periods, satisfying a quadratic whose coefficients involve $\sqrt{17}$. Each 4-element period then splits into two 2-element periods via another quadratic, and finally each 2-element period splits into individual roots via a final quadratic. The result is a tower of quadratic extensions:

$$\mathbb{Q} \subset \mathbb{Q}(\sqrt{17}) \subset \mathbb{Q}(\sqrt{17}, \sqrt{34 - 2\sqrt{17}}) \subset \cdots \subset \mathbb{Q}(\omega)$$

Since $\varphi(17) = 16 = 2^4$, exactly four nested square roots are needed. The explicit formula for the key cosine value is:

$$16\cos\!\left(\frac{2\pi}{17}\right) = -1 + \sqrt{17} + \sqrt{34 - 2\sqrt{17}} + 2\sqrt{17 + 3\sqrt{17} - \sqrt{34 - 2\sqrt{17}} - 2\sqrt{34 + 2\sqrt{17}}}$$

This expression involves only rational numbers and iterated square roots, confirming that the value is constructible with compass and straightedge. Each square root corresponds to one step in the Galois-theoretic tower of quadratic extensions.

Constructible Regular Polygons (Small n)

The constructible $n$-gons for $n \leq 100$ include:

$n = 3, 4, 5, 6, 8, 10, 12, 15, 16, 17, 20, 24, 30, 32, 34, 40, 48, 51, 60, 64, 68, 80, 85, 96$

Notably, the regular 7-gon, 9-gon, 11-gon, 13-gon, 14-gon, 18-gon, and 19-gon are not constructible.

Why the Regular 7-gon is Not Constructible

Since $7$ is prime but not a Fermat prime (it cannot be written as $2^{2^j} + 1$), the regular 7-gon fails Gauss's criterion. Algebraically, the minimal polynomial of$\cos(2\pi/7)$ has degree $\varphi(7)/2 = 3$:

$$8t^3 + 4t^2 - 4t - 1 = 0$$

Since 3 is not a power of 2, the roots cannot be expressed using only square roots, and the 7-gon cannot be constructed with compass and straightedge.

Gauss was so proud of this discovery that he reportedly asked for a regular 17-gon to be inscribed on his tombstone. Though the stonemason declined (finding it indistinguishable from a circle at small scale), a 17-pointed star does appear on the monument to Gauss in Braunschweig.

15.6 The Method of Least Squares

In 1801, the asteroid Ceres was discovered by Giuseppe Piazzi, who observed it for just 41 days before it disappeared behind the Sun. Astronomers desperately needed to predict where it would reappear. Using only Piazzi's limited data, the 24-year-old Gauss predicted the orbit of Ceres with such precision that it was rediscovered exactly where he said it would be. This feat made Gauss famous throughout Europe.

The mathematical method behind this triumph was the method of least squares, which Gauss had developed around 1795 (though he did not publish it until 1809 in Theoria Motus). Legendre independently published the method in 1805, leading to a priority dispute. Gauss claimed prior discovery, and his unpublished manuscripts support this claim.

The Method of Least Squares

Given data points $(x_1, y_1), \ldots, (x_n, y_n)$ and a model $f(x; \mathbf{a})$depending on parameters $\mathbf{a}$, find the parameters that minimize:

$$S(\mathbf{a}) = \sum_{i=1}^{n} \left(y_i - f(x_i; \mathbf{a})\right)^2$$

The key idea: among all possible parameter choices, we prefer the one that makes the sum of squared residuals (deviations from observed data) as small as possible.

Linear Least Squares — Deriving the Normal Equations

For the linear model $y = a + bx$, minimize $S = \sum(y_i - a - bx_i)^2$:

$$\frac{\partial S}{\partial a} = -2\sum(y_i - a - bx_i) = 0 \implies na + b\sum x_i = \sum y_i$$
$$\frac{\partial S}{\partial b} = -2\sum x_i(y_i - a - bx_i) = 0 \implies a\sum x_i + b\sum x_i^2 = \sum x_i y_i$$

Solving these normal equations:

$$b = \frac{n\sum x_i y_i - \sum x_i \sum y_i}{n\sum x_i^2 - \left(\sum x_i\right)^2}, \qquad a = \bar{y} - b\bar{x}$$

Worked Example: Fitting a Line to Data

Suppose we have the data points: (1, 2.1), (2, 3.8), (3, 6.2), (4, 7.9), (5, 10.1).

We compute: $n = 5$, $\sum x_i = 15$, $\sum y_i = 30.1$,$\sum x_i^2 = 55$, $\sum x_i y_i = 109.5$.

$$b = \frac{5 \times 109.5 - 15 \times 30.1}{5 \times 55 - 15^2} = \frac{547.5 - 451.5}{275 - 225} = \frac{96}{50} = 1.92$$
$$a = \frac{30.1}{5} - 1.92 \times \frac{15}{5} = 6.02 - 5.76 = 0.26$$

The best-fit line is $y = 0.26 + 1.92x$.

In matrix form, for $\mathbf{y} = X\boldsymbol{\beta} + \boldsymbol{\varepsilon}$, the least squares estimator is:

$$\hat{\boldsymbol{\beta}} = (X^TX)^{-1}X^T\mathbf{y}$$

The Gauss–Markov Theorem

Consider the linear model $\mathbf{y} = X\boldsymbol{\beta} + \boldsymbol{\varepsilon}$ where:

  • $E[\boldsymbol{\varepsilon}] = \mathbf{0}$ (zero mean errors)
  • $\text{Cov}(\boldsymbol{\varepsilon}) = \sigma^2 I$ (homoscedastic, uncorrelated errors)

Then the OLS estimator $\hat{\boldsymbol{\beta}} = (X^TX)^{-1}X^T\mathbf{y}$ is the Best Linear Unbiased Estimator (BLUE): among all estimators that are linear in$\mathbf{y}$ and unbiased, $\hat{\boldsymbol{\beta}}$ has the smallest variance (in the matrix sense: any other linear unbiased estimator has a covariance matrix that exceeds$\text{Cov}(\hat{\boldsymbol{\beta}})$ by a positive semidefinite matrix).

15.7 The Gaussian Distribution

Gauss derived the normal distribution as the error distribution that naturally justifies the method of least squares as a maximum likelihood procedure. His reasoning was elegant: if we assume that (i) the most probable value of a quantity measured repeatedly is the arithmetic mean of the observations, and (ii) errors follow some smooth symmetric distribution, then the error distribution must be Gaussian.

The Gaussian (Normal) Distribution

A random variable $X \sim N(\mu, \sigma^2)$ has probability density function:

$$f(x) = \frac{1}{\sigma\sqrt{2\pi}}\,\exp\!\left(-\frac{(x - \mu)^2}{2\sigma^2}\right)$$

where $\mu$ is the mean and $\sigma$ is the standard deviation.

Gauss's Derivation of the Normal Distribution

Gauss's argument proceeds as follows. Suppose the error density is $\varphi(x)$. Given observations with errors, the likelihood of the data is proportional to:

$$L = \prod_{i=1}^{n} \varphi(x_i - \theta)$$

Requiring that the maximum likelihood estimate of $\theta$ is the arithmetic mean$\bar{x}$ forces $\varphi'/\varphi$ to be a linear function. Solving the resulting differential equation with the normalization constraint yields:

$$\varphi(x) = \frac{h}{\sqrt{\pi}} e^{-h^2 x^2}$$

where $h = 1/(\sigma\sqrt{2})$ is the precision parameter.

Key properties of the normal distribution:

  • Symmetric about the mean $\mu$, with the familiar “bell curve” shape
  • The 68–95–99.7 rule: approximately 68.3% of the probability lies within $\mu \pm \sigma$, 95.4% within $\mu \pm 2\sigma$, and 99.7% within $\mu \pm 3\sigma$
  • Closed under addition: if $X \sim N(\mu_1, \sigma_1^2)$ and $Y \sim N(\mu_2, \sigma_2^2)$ are independent, then $X + Y \sim N(\mu_1 + \mu_2, \sigma_1^2 + \sigma_2^2)$
  • It maximizes entropy among all distributions with given mean and variance
  • The moment generating function is $M(t) = \exp(\mu t + \sigma^2 t^2/2)$
  • All moments exist: $E[X^{2k}] = \sigma^{2k}(2k-1)!!$ for the standard normal, and all odd central moments are zero

The Standard Normal and the Error Function

The standard normal $Z \sim N(0, 1)$ has density $\phi(z) = \frac{1}{\sqrt{2\pi}}e^{-z^2/2}$and cumulative distribution function:

$$\Phi(z) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{z} e^{-t^2/2}\,dt = \frac{1}{2}\left[1 + \operatorname{erf}\!\left(\frac{z}{\sqrt{2}}\right)\right]$$

where $\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt$ is the error function, which Gauss studied extensively in connection with the theory of errors in astronomical observations.

Worked Example: Probability Calculation

Suppose exam scores follow $X \sim N(72, 10^2)$. What fraction of students score above 90?

Standardize: $Z = (90 - 72)/10 = 1.8$.

We need $P(X > 90) = P(Z > 1.8) = 1 - \Phi(1.8) \approx 1 - 0.9641 = 0.0359$.

About 3.6% of students score above 90.

Central Limit Theorem

If $X_1, X_2, \ldots, X_n$ are independent, identically distributed random variables with mean $\mu$ and finite variance $\sigma^2$, then:

$$\frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}} \xrightarrow{d} N(0, 1) \quad \text{as } n \to \infty$$

This explains the ubiquity of the normal distribution in nature: any quantity that is the sum of many small, independent random effects will be approximately normally distributed. While Gauss did not prove the CLT in its modern form, his work on the theory of errors laid much of the groundwork.

Worked Example: Central Limit Theorem in Action

A fair die has mean $\mu = 3.5$ and variance $\sigma^2 = 35/12 \approx 2.917$. If we roll 100 dice and sum the results, what is the probability the sum exceeds 370?

By the CLT, the sum $S_{100} \approx N(100 \times 3.5, 100 \times 35/12) = N(350, 291.67)$.

Standardize: $Z = (370 - 350)/\sqrt{291.67} = 20/17.08 \approx 1.17$.

So $P(S_{100} > 370) \approx 1 - \Phi(1.17) \approx 0.121$, about 12.1%.

15.8 Differential Geometry — The Theorema Egregium

In 1827, Gauss published the Disquisitiones Generales circa Superficies Curvas, founding the field of differential geometry. This work laid the mathematical groundwork that Riemann would generalize and Einstein would use for general relativity. It grew out of Gauss's practical work surveying the Kingdom of Hanover from 1818 to 1826 — the task of mapping a curved surface (the Earth) onto a flat plane forced him to develop a rigorous theory of surfaces.

The First Fundamental Form

A surface parametrized by $\mathbf{r}(u, v)$ has an infinitesimal arc length given by:

$$ds^2 = E\,du^2 + 2F\,du\,dv + G\,dv^2$$

where $E = \mathbf{r}_u \cdot \mathbf{r}_u$, $F = \mathbf{r}_u \cdot \mathbf{r}_v$, and $G = \mathbf{r}_v \cdot \mathbf{r}_v$. This is the first fundamental form, also called the metric tensor. It encodes all intrinsic geometry: distances, angles, and areas on the surface.

Gaussian Curvature

At each point of a smooth surface, the two principal curvatures$\kappa_1$ and $\kappa_2$ give the maximum and minimum curvatures in orthogonal directions. The Gaussian curvature is:

$$K = \kappa_1 \kappa_2$$

In terms of the coefficients of the first ($E, F, G$) and second ($e, f, g$) fundamental forms:

$$K = \frac{eg - f^2}{EG - F^2}$$

Theorema Egregium (Gauss's Remarkable Theorem, 1827)

The Gaussian curvature $K$ is an intrinsic invariant — it depends only on the first fundamental form $(E, F, G)$ and its partial derivatives. It is unchanged by isometric deformations of the surface.

Explicitly, when $F = 0$ (orthogonal parametrization), Gauss's formula gives:

$$K = -\frac{1}{2\sqrt{EG}}\left[\frac{\partial}{\partial u}\!\left(\frac{G_u}{\sqrt{EG}}\right) + \frac{\partial}{\partial v}\!\left(\frac{E_v}{\sqrt{EG}}\right)\right]$$

A creature living on the surface can determine $K$ purely from internal measurements, without reference to the ambient space. The Latin name means “remarkable theorem” — Gauss himself was struck by how surprising it is that curvature, which seems to depend on how a surface bends in space, is actually intrinsic.

Curvature of Common Surfaces

  • Plane: $K = 0$
  • Sphere of radius $R$: $K = 1/R^2 > 0$ (positive, constant)
  • Cylinder: $K = 0$ (one principal curvature is zero)
  • Saddle ($z = xy$): $K < 0$ at the origin
  • Pseudosphere: $K = -1/R^2$ (constant negative curvature)
  • Torus: $K$ varies — positive on the outer rim, negative on the inner rim, zero along two circles

Worked Example: Curvature of a Sphere

Parametrize the sphere of radius $R$ by $\mathbf{r}(\theta, \phi) = (R\sin\theta\cos\phi, R\sin\theta\sin\phi, R\cos\theta)$.

The first fundamental form coefficients are: $E = R^2$, $F = 0$, $G = R^2\sin^2\theta$.

The second fundamental form coefficients are: $e = R$, $f = 0$, $g = R\sin^2\theta$.

$$K = \frac{eg - f^2}{EG - F^2} = \frac{R \cdot R\sin^2\theta - 0}{R^2 \cdot R^2\sin^2\theta - 0} = \frac{R^2\sin^2\theta}{R^4\sin^2\theta} = \frac{1}{R^2}$$

As expected, the sphere has constant positive Gaussian curvature everywhere.

A beautiful consequence of the Theorema Egregium: you cannot flatten an orange peel without tearing or stretching it, because the sphere has $K = 1/R^2 > 0$ while the plane has $K = 0$, and isometric maps preserve $K$. But you can flatten a cylinder, because both cylinder and plane have $K = 0$. This is why maps of the Earth inevitably introduce distortion.

Gauss–Bonnet Theorem (Global Version)

For a compact surface $S$ without boundary:

$$\int\!\!\!\int_S K\,dA = 2\pi\,\chi(S)$$

where $\chi(S)$ is the Euler characteristic of the surface. For a sphere,$\chi = 2$, so $\int K\,dA = 4\pi$. For a torus, $\chi = 0$, so the positive and negative curvature regions cancel perfectly. This theorem, which Gauss proved in a local version, connects local differential geometry to global topology.

15.9 Non-Euclidean Geometry

For over two thousand years, mathematicians had tried to prove Euclid's parallel postulate from the other four axioms. All attempts failed. Gauss realized, probably as early as the 1810s, that the parallel postulate is independent: a consistent geometry exists in which infinitely many parallels pass through a given external point.

In this hyperbolic geometry, the angles of a triangle sum to less than $180°$, with the deficit proportional to the area:

$$\text{Area}(\triangle) = R^2\bigl(\pi - \alpha - \beta - \gamma\bigr)$$

where $\alpha, \beta, \gamma$ are the angles and $R$ is related to the (negative) curvature. In terms of Gaussian curvature, a surface with constant $K = -1/R^2$ serves as a model for hyperbolic geometry. The angle deficit formula is a special case of the local Gauss–Bonnet theorem:

$$\int\!\!\!\int_{\triangle} K\,dA + (\alpha + \beta + \gamma) = \pi$$

Gauss never published these findings, fearing “the clamour of the Boeotians.” The credit went to János Bolyai (1832) and Nikolai Lobachevsky (1829), who published independently.

When Bolyai's father shared his son's work with Gauss, Gauss replied that he could not praise it “because to praise it would be to praise myself.” This response deeply wounded the younger Bolyai, who suspected Gauss of trying to claim priority — though Gauss's private letters confirm he had indeed reached similar conclusions years earlier.

Gauss attempted to test the geometry of physical space by measuring the angles of a large triangle formed by three mountain peaks (Brocken, Hoher Hagen, and Inselsberg, with sides of roughly 69, 85, and 107 km). Within experimental precision, the angles summed to $180°$ — as we now know, the curvature of space is extremely small at terrestrial scales. Einstein's general relativity would later show that spacetime is curved, but the effect is detectable only near extremely massive objects.

15.10 The Fundamental Theorem of Algebra

Gauss's 1799 doctoral thesis provided the first rigorous proof of the Fundamental Theorem of Algebra. While d'Alembert, Euler, and Lagrange had all attempted proofs, each had gaps. Gauss gave four different proofs over his lifetime (in 1799, 1815, 1816, and 1849).

The Fundamental Theorem of Algebra

Every non-constant polynomial with complex coefficients has at least one root in $\mathbb{C}$. Equivalently, every polynomial of degree $n \geq 1$ can be factored completely:

$$p(z) = a_n(z - z_1)(z - z_2)\cdots(z - z_n)$$

where $z_1, \ldots, z_n \in \mathbb{C}$ (counted with multiplicity).

Gauss's first proof was topological in nature, using the fact that the image of a large circle under a polynomial must wind around the origin. His later proofs used algebraic and analytic methods. Remarkably, despite proving that complex roots always exist, Gauss was careful to formulate the theorem in terms of real polynomials factoring into real linear and quadratic factors — he was wary of the philosophical status of complex numbers, even while using them masterfully.

Consequence: Factoring Real Polynomials

Every real polynomial factors into real linear and irreducible quadratic factors. For example:

$$x^4 + 1 = (x^2 + \sqrt{2}\,x + 1)(x^2 - \sqrt{2}\,x + 1)$$

This factors over $\mathbb{C}$ as $(x - e^{i\pi/4})(x - e^{3i\pi/4})(x - e^{5i\pi/4})(x - e^{7i\pi/4})$, and conjugate pairs combine to give the real quadratic factors above.

15.11 Legacy

Gauss's influence pervades virtually every branch of mathematics and physics. He transformed number theory from a collection of curiosities into a rigorous discipline. He created differential geometry, whose concepts underpin general relativity. His statistical methods — least squares, the normal distribution — are the foundation of modern data science.

Beyond mathematics, Gauss contributed to astronomy (orbit determination), geodesy, electromagnetism (Gauss's law: $\oint \mathbf{E}\cdot d\mathbf{A} = Q/\varepsilon_0$), and even the invention of the telegraph. The CGS unit of magnetic flux density, the gauss, honours his name. His work on magnetism included the development of the magnetometer and systematic measurements of Earth's magnetic field.

The sheer breadth of concepts and results bearing Gauss's name is staggering: Gaussian integers, Gaussian elimination, Gaussian curvature, Gaussian distribution, Gauss's law, Gauss–Bonnet theorem, Gauss sums, Gauss's lemma, the Gauss map, Gauss–Markov theorem, Gauss–Jordan elimination, Gaussian quadrature, the Gauss hypergeometric function, and many more.

Perhaps his most lasting legacy is the standard of rigour he set. His four proofs of the Fundamental Theorem of Algebra, six proofs of quadratic reciprocity, and meticulous development of modular arithmetic established the expectation of complete, airtight mathematical proof that defines the modern discipline. As Abel wrote in 1828: “He is like the fox, who effaces his tracks in the sand with his tail.” This captures both the elegance and the frustration of reading Gauss — his published work is polished to perfection, with all traces of discovery removed.

The inscription on his monument in Braunschweig reads: “Mathematicorum Princeps” — the Prince of Mathematicians. The German 10-mark banknote featured his portrait alongside the normal distribution curve from 1989 until the introduction of the euro. Few figures in intellectual history have so thoroughly reshaped the landscape of human knowledge.

Rate this chapter: