Algebraic Numbers
Algebraic numbers are complex numbers that are roots of non-zero polynomials with rational coefficients.
Definition and Minimal Polynomials
A number is algebraic if there exists a polynomial such that . The unique monic polynomial of lowest degree that satisfies is called its minimal polynomial.
python
1def evaluate_rational_poly(coeffs, x):
2 res = 0
3 for i, c in enumerate(coeffs):
4 res += c * (x**i)
5 return res
6
7# Check if i (sqrt(-1)) is algebraic
8# Minimal poly: x^2 + 1
9coeffs_i = [1, 0, 1]
10import math
11val = evaluate_rational_poly(coeffs_i, 1j)
12print(f"p(i) = {val}")
13
14# Check if sqrt(2) + sqrt(3) is algebraic
15# It satisfies x^4 - 10x^2 + 1 = 0
16alpha = math.sqrt(2) + math.sqrt(3)
17coeffs_alpha = [1, 0, -10, 0, 1]
18print(f"p(sqrt(2)+sqrt(3)) = {evaluate_rational_poly(coeffs_alpha, alpha)}")
Algebraic Integers
An algebraic integer is a root of a monic polynomial with integer coefficients. For example, is an algebraic integer, but is not (it is an algebraic number, but its minimal polynomial is , which is not monic).
Is every rational number an algebraic number?
Transcendental Numbers
Numbers that are not algebraic are called transcendental. Proving a number is transcendental is usually much harder. Famous examples include and .
python
1import math
2
3# Liouville's constant is transcendental
4liouville = sum(10**(-math.factorial(n)) for n in range(1, 10))
5print(f"Liouville's constant approx: {liouville}")
6print("Transcendental numbers are 'uncountably' more common than algebraic ones.")