TITLE: How to divide one number in $\textbf Q(\zeta_8)$ by another?
QUESTION [12 upvotes]: Consider two numbers, one is $a + b \zeta_8 + ci + d(\zeta_8)^3$, the other is $\alpha + \beta \zeta_8 + \gamma i + \delta(\zeta_8)^3 \neq 0$. How do I compute $$\frac{a + b \zeta_8 + ci + d(\zeta_8)^3}{\alpha + \beta \zeta_8 + \gamma i + \delta(\zeta_8)^3}?$$ I know that $$\frac{a + bi}{c + di} = \frac{ac + bd}{c^2 + d^2} + \frac{bc - ad}{c^2 + d^2}i.$$
I tried to work out a similar formula for the division in $\textbf Q(\zeta_8)$ but wound up in a hopeless mess that I won't bother to type here. It's no problem for me to calculate a numerical approximation, but how do I get an algebraic expression $$\frac{a + b \zeta_8 + ci + d(\zeta_8)^3}{\alpha + \beta \zeta_8 + \gamma i + \delta(\zeta_8)^3} = \epsilon + \eta \zeta_8 + \theta i + \kappa(\zeta_8)^3$$ such that $\epsilon, \eta, \theta, \kappa \in \textbf Q$?

REPLY [5 votes]: An equivalent way of looking at this can be via the isomorphism given by looking at each element of $\mathbb{Q}(\zeta_8)$ as a linear map of a vector space over $\mathbb{Q}$.
Just like the ordinary complexes are isomorphic to the matrices
$$
\begin{pmatrix}
a & -b \\
b & a \\
\end{pmatrix},
$$
the field $\mathbb{Q}(\zeta_8)$ is isomorphic to the matrices
$$
M = 
\begin{pmatrix}
a & -d & -c & -b \\
b &  a & -d & -c \\
c &  b &  a & -d \\
d &  c &  b &  a \\
\end{pmatrix},
$$
where the entries are in $\mathbb{Q}$ (easy to observe by looking at the effect of $a + b\zeta_8 + c\zeta_8^2 + d\zeta_8^3$ on the $(1, \zeta_8, \zeta_8^2, \zeta_8^3)$ basis using the $\zeta^4_8 = -1$ reduction formula).
The determinant $\det M$ then equals the norm of an element in $\mathbb{Q}(\zeta_8)$ over $\mathbb{Q}$ in other answers here and the usual matrix inversion formula $\operatorname{adj}(M)/\det(M)$ of adjugate over determinant gives you the coefficients of the multiplicative inverse (of course, you only need to compute the first column of the adjugate). The relative complication of the matrix inversion formula explains why these algebraic expressions get messy, even for a relatively structured matrix as this one.