## Compute the minimal polynomial of an algebraic number over QQ

Find the minimal polynomial of $1+i$ over $\mathbb{Q}$.

Note that $1+i \in \mathbb{Q}(i)$, and that $\mathbb{Q}(i)$ has degree 2 over $\mathbb{Q}$ (since $i$ is a root of the irreducible $x^2+1$). That is, the degree of $\mathbb{Q}(1+i)$ over $\mathbb{Q}$ is at most 2.

Knowing an upper bound on the degree of the minimal polynomial of $\alpha = 1+i$, we can compute the powers of $\alpha$ and solve the linear system $\alpha^2 + a\alpha + b = 0$.

Evidently, $1+i$ is a root of $p(x) = x^2-2x+2$. (WolframAlpha agrees.) Moreover, $p(x)$ is irreducible over $\mathbb{Q}$ by Eisenstein’s criterion; so it is the minimal polynomial of $1+i$ over $\mathbb{Q}$.