Some numbers are roots of polynomials with rational coefficients ($\sqrt2$, $i$, $\sqrt[3]{2}$), and some aren't ($\pi$, $e$). That split is the first big fork in field theory. For the "root of something" numbers, one special polynomial controls everything: what $F(\alpha)$ looks like, its degree, how to divide in it. This page finds that polynomial and then shows that the algebraic numbers are closed under all four operations, which is much less obvious than it sounds.
Throughout, $K/F$ is a field extension.
An element $\alpha \in K$ is algebraic over $F$ if there exists a non-zero polynomial $f \in F[x]$ such that $f(\alpha) = 0$.
If $\alpha \in K$ is not algebraic over $F$, then $\alpha$ is transcendental over $F$.
Which of $\sqrt2$, $i$, $\sqrt[3]{2} + 1$, $\pi$ are algebraic over $\mathbb{Q}$? Over $\mathbb{R}$?
Over $\mathbb{Q}$: $\sqrt2$ is a root of $x^2 - 2$, $i$ of $x^2 + 1$, and $\sqrt[3]2 + 1$ of $(x - 1)^3 - 2$. $\pi$ is transcendental over $\mathbb{Q}$ (Lindemann, 1882; a hard theorem we'll just use).
Over $\mathbb{R}$: everything in $\mathbb{C}$ is algebraic, including $\pi$, which is a root of $x - \pi \in \mathbb{R}[x]$. Being algebraic always depends on the base field.
An extension $K/F$ is an algebraic extension if every element of $K$ is algebraic over $F$.
Finite degree is enough to guarantee this, by a pure counting argument.
If $[K:F] < \infty$, then $K/F$ is algebraic.
Proof. Let $n = [K:F]$ and consider any $\alpha \in K$. The set $\{1, \alpha, \alpha^2, \dots, \alpha^n\}$ consists of $n+1$ elements in an $n$-dimensional space, so it is linearly dependent over $F$. (If two of the powers coincide, they're dependent already.) Hence there exist $a_0, a_1, \dots, a_n \in F$, not all zero, with $\sum_{i=0}^n a_i \alpha^i = 0$. Thus $\alpha$ is a root of the non-zero polynomial $f(x) = \sum_{i=0}^n a_i x^i \in F[x]$. $\blacksquare$
Here's the proof as a machine. Each new power of $\alpha$ is a column of coordinates in a basis of the field. The moment a column is a combination of the earlier ones, the combination is a polynomial with $\alpha$ as a root.
The converse fails: an algebraic extension can have infinite degree.
Show that $K = \mathbb{Q}(2^{1/2}, 2^{1/3}, 2^{1/4}, \dots)$ is algebraic over $\mathbb{Q}$ but $[K:\mathbb{Q}] = \infty$.
Infinite degree. $x^n - 2$ is Eisenstein at $2$, so it's irreducible, and it is the minimal polynomial of $2^{1/n}$ (see below). So $[\mathbb{Q}(2^{1/n}):\mathbb{Q}] = n$, and $\mathbb{Q}(2^{1/n}) \subseteq K$ forces $[K:\mathbb{Q}] \ge n$ for every $n$.
Algebraic. Every element of $K$ is built from finitely many of the generators by $+, -, \times, \div$, so it lies in some $\mathbb{Q}(2^{1/2}, \dots, 2^{1/n})$, which has finite degree over $\mathbb{Q}$ by the Tower Law (each step has degree at most $n$). Finite degree implies algebraic.
An algebraic $\alpha$ is a root of many polynomials: if $f(\alpha) = 0$ then $(x^5 + 7)f(x)$ vanishes at $\alpha$ too. The useful one is the smallest.
Let $\alpha \in K$ be algebraic over $F$. The minimal polynomial of $\alpha$ over $F$, denoted $f_\alpha(x)$ or $\operatorname{min}_F(\alpha)$, is the unique monic polynomial in $F[x]$ of minimal degree such that $f_\alpha(\alpha) = 0$.
The degree of $\alpha$ over $F$ is $\deg(f_\alpha)$.
Why unique? If two monic polynomials of the same minimal degree both vanish at $\alpha$, their difference vanishes at $\alpha$ and has smaller degree, so it must be $0$.
Let $\alpha \in K$ be algebraic over $F$ with minimal polynomial $f_\alpha$. Then:
Proof.
Part 1 runs backwards too, and that's how you find minimal polynomials in practice: if $f$ is monic, irreducible, and $f(\alpha) = 0$, then $f = f_\alpha$ (by part 2, $f_\alpha \mid f$, and $f$ has no proper factors). So: guess a monic polynomial that kills $\alpha$, then prove it's irreducible with the tools from Polynomial Rings. Skip the irreducibility check and you can be wrong: $x^4 - 4$ kills $\sqrt2$, but $f_{\sqrt2} = x^2 - 2$.
Now the main event: the minimal polynomial tells you exactly what $F(\alpha)$ looks like.
Suppose $K/F$ is a field extension and $\alpha \in K$ is algebraic over $F$ of degree $n$. Then:
Proof. A dependence $\sum_{i<n} a_i\alpha^i = 0$ would be a nonzero polynomial of degree $< n$ vanishing at $\alpha$, so $\{1, \alpha, \dots, \alpha^{n-1}\}$ is linearly independent over $F$, implying $[F(\alpha):F] \ge n$. Consider the $F$-subspace
$$V = \{a_0 + a_1\alpha + \dots + a_{n-1}\alpha^{n-1} : a_i \in F\} = \{g(\alpha) : g \in F[x],\ \deg g < n \text{ or } g = 0\}.$$
$V$ is closed under addition and subtraction, and under multiplication: to multiply $g(\alpha)h(\alpha)$, divide $gh$ by $f_\alpha$ and keep the remainder, which takes the same value at $\alpha$. To verify inverses, let $g(\alpha) \neq 0$ with $\deg(g) < n$. Since $f_\alpha$ is irreducible and $f_\alpha \nmid g$, $\gcd(g, f_\alpha) = 1$. By Bézout's identity, there exist $u, v \in F[x]$ such that
$$u(x)g(x) + v(x)f_\alpha(x) = 1.$$
Evaluating at $\alpha$ gives $u(\alpha)g(\alpha) = 1$, so $g(\alpha)^{-1} = u(\alpha) \in V$. Thus $V$ is a subfield containing $F$ and $\alpha$, so $V \supseteq F(\alpha)$; and $V \subseteq F(\alpha)$ clearly. So $V = F(\alpha)$, with basis $\{1, \dots, \alpha^{n-1}\}$, proving 1 and 2.
For 3, the evaluation map $F[x] \to F(\alpha)$, $g \mapsto g(\alpha)$, is a ring homomorphism, onto by the description of $V$, with kernel $\{g : g(\alpha) = 0\} = (f_\alpha)$ by part 2 of the Lemma. The First Isomorphism Theorem gives $F[x]/(f_\alpha) \cong F(\alpha)$. $\blacksquare$
Part 3 says the two ways of building extensions on Field Extensions agree: adjoining a root inside a big field, and Kronecker's quotient $F[x]/(f)$, give the same field whenever $f = f_\alpha$.
The proof hides a practical algorithm for division in $F(\alpha)$: run the Euclidean algorithm on $g$ and $f_\alpha$, and back-substitute to get $u$. Watch it rationalize some denominators that high school never taught you how to rationalize.
Every high school teacher who ever said "never leave a radical in the denominator" was secretly running the Euclidean algorithm on $x^2 - 2$. They just didn't tell you. They didn't know either.
The same theorem works over finite fields, where "is it a square?" is a finite check.
Find $[\mathbb{F}_3(\sqrt2):\mathbb{F}_3]$ and $[\mathbb{F}_7(\sqrt2):\mathbb{F}_7]$.
In $\mathbb{F}_3[x]$, $x^2 - 2$ has no roots: $(\pm 1)^2 - 2 \equiv -1 \not\equiv 0$ and $0^2 - 2 \equiv 1 \not\equiv 0$. A quadratic with no roots is irreducible, so $[\mathbb{F}_3(\sqrt{2}):\mathbb{F}_3] = 2$ and $\mathbb{F}_3(\sqrt{2}) \cong \mathbb{F}_3[x]/(x^2 - 2)$, a field with $9$ elements.
In $\mathbb{F}_7[x]$, $x^2 - 2 = (x - 3)(x + 3)$ (since $3^2 = 9 \equiv 2$), so $\sqrt{2} \in \mathbb{F}_7$ already, and $\mathbb{F}_7(\sqrt{2}) = \mathbb{F}_7$: degree $1$.
And transcendental elements exist in abundance: just adjoin a variable.
Let $F(t) = \left\{\frac{f(t)}{g(t)} : f, g \in F[t],\, g \ne 0\right\}$, the field of rational functions. Show $t$ is transcendental over $F$, and find $[K(\sqrt t):K]$ for $K = F(t)$.
A polynomial relation $\sum a_i t^i = 0$ with $a_i \in F$ holds in $F(t)$ only if every $a_i = 0$ (that's what it means for $t$ to be a variable). So $t$ is transcendental over $F$.
Over $K = F(t)$, consider $f(x) = x^2 - t \in K[x]$. Its coefficients lie in $F[t]$, a UFD with field of fractions $K$, and it is Eisenstein at the prime $t$: $t$ divides every non-leading coefficient, $t \nmid 1$, $t^2 \nmid t$. So $f$ is irreducible over $F[t]$, hence over $K$ by Gauss's Lemma. For a root $\theta = \sqrt{t}$ in some extension, $[K(\theta):K] = 2$.
Eisenstein works in any UFD, not just $\mathbb{Z}$: the "prime" can be an irreducible polynomial like $t$. The version on Polynomial Rings was stated over $\mathbb{Z}$, but the proof never used anything special about integers.
Is $\sqrt2 + \sqrt[3]5$ algebraic over $\mathbb{Q}$? Finding a polynomial for it by hand is painful. Degrees make it free.
Given an extension $K/F$, the collection of all elements of $K$ that are algebraic over $F$ is a subfield of $K$.
Proof. Let $\alpha, \beta \in K$ be algebraic over $F$. Then $\alpha \pm \beta$, $\alpha\beta$, and $\alpha/\beta$ (for $\beta \ne 0$) lie in the field $F(\alpha, \beta) = (F(\alpha))(\beta)$. Now $\beta$ is algebraic over $F$, hence over $F(\alpha)$ (the same polynomial works), so by the theorem above and the Tower Law,
$$[F(\alpha, \beta):F] = [F(\alpha)(\beta):F(\alpha)]\,[F(\alpha):F] < \infty.$$
Since finite extensions are algebraic, every element in $F(\alpha, \beta)$ is algebraic over $F$. $\blacksquare$
Give an upper bound for the degree of $\sqrt2 + \sqrt[3]5$ over $\mathbb{Q}$.
It lies in $\mathbb{Q}(\sqrt2, \sqrt[3]5)$, whose degree is at most $2 \cdot 3 = 6$. Its degree divides that field's degree, so it's at most $6$. (In fact it's exactly $6$, though proving that takes more work. The bound alone already proves it's algebraic, without writing down a single polynomial.)
Algebraic over algebraic is algebraic, too.
If $L$ is algebraic over $K$, and $K$ is algebraic over $F$, then $L$ is algebraic over $F$.
Proof. Let $\alpha \in L$. Since $\alpha$ is algebraic over $K$, there exist $a_0, a_1, \dots, a_n \in K$, not all zero, such that $\sum_{i=0}^n a_i \alpha^i = 0$. Each $a_i$ is algebraic over $F$, so $[F(a_0, \dots, a_n):F] < \infty$ (adjoin them one at a time and use the Tower Law). Moreover, $\alpha$ is algebraic over $F(a_0, \dots, a_n)$ (that polynomial has its coefficients there), so $[F(a_0, \dots, a_n, \alpha):F(a_0, \dots, a_n)] < \infty$. By the Tower Law, $[F(a_0, \dots, a_n, \alpha):F] < \infty$, which implies that $\alpha$ is algebraic over $F$. $\blacksquare$
The trick in both proofs: never work with "algebraic" directly. Translate to "finite degree," use the Tower Law, translate back. The infinite-degree example above is why you need to shrink to finitely many elements first.
Two subfields of the same big field can be glued together.
If $K_1, \dots, K_n \subseteq K$, their composite field (or compositum), denoted $K_1 K_2 \cdots K_n$, is the smallest subfield of $K$ containing each $K_i$.
Let $K_1, K_2 \subseteq K$ be finite extensions of $F$ with $[K_1:F] = m$ and $[K_2:F] = n$. Let $\{\alpha_1, \dots, \alpha_m\}$ be an $F$-basis for $K_1$ and $\{\beta_1, \dots, \beta_n\}$ be an $F$-basis for $K_2$. Then:
It looks like the Tower Law grid, but the products can now collapse, because the two fields might overlap. The classic example: two cube roots of $2$.
Let $F = \mathbb{Q}$, $K_1 = \mathbb{Q}(\sqrt[3]{2})$, and $K_2 = \mathbb{Q}(\zeta_3 \sqrt[3]{2})$ where $\zeta_3 = e^{2\pi i/3}$. Find $[K_1 K_2:\mathbb{Q}]$.
Both $\sqrt[3]2$ and $\zeta_3\sqrt[3]2$ are roots of the irreducible $x^3 - 2$, so $m = n = 3$. Over $K_1$, $x^3 - 2 = (x - \sqrt[3]{2})(x^2 + \sqrt[3]{2}x + \sqrt[3]{4})$, and $\zeta_3\sqrt[3]2$ is a root of the quadratic factor. So $[K_1K_2:K_1] = [K_1(\zeta_3\sqrt[3]2):K_1] \le 2$.
It isn't $1$: $K_1 \subseteq \mathbb{R}$ while $\zeta_3\sqrt[3]2 \notin \mathbb{R}$. So $[K_1 K_2 : K_1] = 2$, and $[K_1 K_2 : \mathbb{Q}] = 2 \cdot 3 = 6 < 9 = mn$.
$K_1K_2$ contains $\zeta_3 = \frac{\zeta_3\sqrt[3]2}{\sqrt[3]2}$, so $K_1 K_2 = \mathbb{Q}(\sqrt[3]{2}, \zeta_3)$. It contains all three roots of $x^3 - 2$: it's the splitting field of $x^3 - 2$ over $\mathbb{Q}$, which shows up again in Galois Theory.
Don't multiply the degrees of side-by-side fields. Here $3 \cdot 3 = 9$, but the true degree is $6$. The bound $mn$ is reached only when the bases stay independent over the other field; coprime degrees are the easy case where that's automatic (second exercise).
Minimal polynomials and degrees, the bread and butter.
Find the minimal polynomial of $\sqrt2 + \sqrt3$ over $\mathbb{Q}$, and over $\mathbb{Q}(\sqrt2)$.
Let $\gamma = \sqrt2 + \sqrt3$. Then $\gamma^2 = 5 + 2\sqrt6$, so $(\gamma^2 - 5)^2 = 24$, i.e. $\gamma^4 - 10\gamma^2 + 1 = 0$. The polynomial $x^4 - 10x^2 + 1$ is irreducible over $\mathbb{Q}$ (an exercise on Polynomial Rings), so it is $\operatorname{min}_{\mathbb{Q}}(\gamma)$. (Alternatively: $\mathbb{Q}(\gamma) = \mathbb{Q}(\sqrt2, \sqrt3)$ has degree $4$, so $\gamma$ has degree $4$.)
Over $\mathbb{Q}(\sqrt2)$: $\gamma - \sqrt2 = \sqrt3$, so $(\gamma - \sqrt2)^2 = 3$, i.e. $\gamma^2 - 2\sqrt2\,\gamma - 1 = 0$. Since $\gamma \notin \mathbb{Q}(\sqrt2)$ (otherwise $\sqrt3$ would be), the degree is $2$, and $\operatorname{min}_{\mathbb{Q}(\sqrt2)}(\gamma) = x^2 - 2\sqrt2\,x - 1$.
Let $K_1, K_2 \subseteq K$ be finite extensions of $F$ with $[K_1:F] = m$, $[K_2:F] = n$, and $\gcd(m, n) = 1$. Show $[K_1K_2:F] = mn$.
$K_1 \subseteq K_1K_2$, so $m \mid [K_1K_2:F]$ by the Tower Law; likewise $n \mid [K_1K_2:F]$. Since $\gcd(m, n) = 1$, $mn \mid [K_1K_2:F]$. But the theorem gives $[K_1K_2:F] \le mn$. So $[K_1K_2:F] = mn$.
Write $\dfrac{1}{1 + \sqrt[3]2 + \sqrt[3]4}$ in the basis $\{1, \sqrt[3]2, \sqrt[3]4\}$ of $\mathbb{Q}(\sqrt[3]2)$.
Let $\alpha = \sqrt[3]2$. Then $1 + \alpha + \alpha^2 = \dfrac{\alpha^3 - 1}{\alpha - 1} = \dfrac{2 - 1}{\alpha - 1} = \dfrac{1}{\alpha - 1}$. So the inverse is $\alpha - 1 = -1 + \sqrt[3]2 + 0 \cdot \sqrt[3]4$.
Check: $(\alpha - 1)(1 + \alpha + \alpha^2) = \alpha^3 - 1 = 1$. (Bézout finds the same thing: $(x - 1)(x^2 + x + 1) - (x^3 - 2) = 1$.)
The algebraic numbers are a field, they are algebraic over $\mathbb{Q}$ by definition, and they're still enormous.
Let $\mathbb{A} = \{\alpha \in \mathbb{C} : \alpha \text{ is algebraic over } \mathbb{Q}\}$. Prove that $\mathbb{A}$ is a countable field and that $[\mathbb{A}:\mathbb{Q}] = \infty$. Conclude that transcendental numbers exist (in fact, almost every complex number is one).
Proof. $\mathbb{A}$ is a subfield of $\mathbb{C}$ by the theorem above (with $K = \mathbb{C}$, $F = \mathbb{Q}$).
Countable. $\mathbb{Q}[x]$ is countable: polynomials of degree $\le d$ correspond to $\mathbb{Q}^{d+1}$, which is countable, and a countable union of countable sets is countable. Each nonzero polynomial has finitely many roots in $\mathbb{C}$. So $\mathbb{A}$, the union of the root sets, is countable.
Infinite degree. For each $n$, $2^{1/n} \in \mathbb{A}$ has degree $n$ over $\mathbb{Q}$ ($x^n - 2$ is Eisenstein at $2$). So $\mathbb{Q}(2^{1/n}) \subseteq \mathbb{A}$ gives $[\mathbb{A}:\mathbb{Q}] \ge n$ for all $n$.
Transcendentals. $\mathbb{C}$ is uncountable and $\mathbb{A}$ is countable, so $\mathbb{C} \setminus \mathbb{A}$ is uncountable (and so is $\mathbb{R} \setminus \mathbb{A}$). $\blacksquare$