*(This is something of a computational aside in my series on algebraic number theory.)*

Recall that a number field is a field of the form $\mathbf{Q}(\omega)$, where $\omega$ is a complex number which is algebraic over $\mathbf{Q}$ (that is, is a root of some polynomial in rational coefficients). Then the elements of $\mathbf{Q}(\omega)$ are of the form

\[ a_0 + a_1\omega + a_2\omega^2 + \dots + a_{n-1}\omega^{n-1}, \]

where $n$ is the degree of $\omega$ over $\mathbf{Q}$ (that is, the degree of a monic, irreducible polynomial in rational coefficients which has $\omega$ as a root).

What this means is that an element of a number field can essentially be viewed as a polynomial in rational coefficients, and in turn this means that we can easily perform the operations of addition and multiplication in any number field (indeed, in any field extension, provided we can easily compute in the base field). This post will demonstrate how this is done, both by hand when the number field is manageable, and with a computer using PARI/GP. The standard reference for computational matters in number fields (and many others) is the book by Cohen.

Continue reading →