How to divide one number in $\textbf Q(\zeta_8)$ by another?

Solution 1:

The equation $N(z) = z \bar{z}$ with $N: \mathbf{Q}(i) \to \mathbf{Q}$ which implies $$\frac{1}{z} = \frac{\bar{z}}{N(z)}$$ generalizes to Galois extensions $L/K$: there is a field norm $$N_{L/K}(z) = \prod_{\sigma\in\operatorname{Gal}(L/K)} \sigma(z)\qquad \text{ with } \quad N_{L/K} : L \to K,$$ which implies $$\frac{1}{z} = \frac{w}{N_{L/K}(z)} \qquad \text{ where } \quad w = \prod_{\operatorname{id}\neq\sigma\in\operatorname{Gal}(L/K)} \sigma(z)\bigg.$$

In this case we have $L=\mathbf{Q}(\zeta_8)$, $K=\mathbf{Q}$, the minimum polynomial of $\zeta_8$ is $X^4 + 1$, and $$\operatorname{Gal}(L/K) = \{\zeta_8\mapsto\zeta_8,\ \ \zeta_8\mapsto\zeta_8^3,\ \ \zeta_8\mapsto\zeta_8^5 = -\zeta_8,\ \ \zeta_8\mapsto\zeta_8^{7} = -\zeta_8^3\}.$$

So for $z= \alpha+\beta\zeta_8+\gamma\zeta_8^2+\delta\zeta_8^3$ you have the pleasure of doing this calculation.


To save time we can do the calculation in SageMath:

L.<zeta8> = CyclotomicField(8)
R.<a,b,c,d> = PolynomialRing(L)
z = a + b*zeta8 + c*zeta8^2 + d*zeta8^3
w = prod(z.map_coefficients(sigma) for sigma in L.galois_group() if not sigma.order() == 1)
N = w*z
w_vect = sum(vector(R,p)*q for (p,q) in list(w))

From the values of w_vect and N we see $$w = (a^3 - b^2c + ac^2 + 2abd + cd^2) + (-a^2b + bc^2 - b^2d - 2acd - d^3)\zeta_8 + (ab^2 - a^2c - c^3 + 2bcd - ad^2)\zeta_8^2 + (-b^3 + 2abc - a^2d + c^2d - bd^2)\zeta_8^3$$ and $N_{\mathbf{Q}(\zeta_8)/\mathbf{Q}}(z) = a^4 + b^4 - 4ab^2c + 2a^2c^2 + c^4 + 4a^2bd - 4bc^2d + 2b^2d^2 + 4acd^2 + d^4.$

Let's check to be sure:

sage: (w_vect[0] + w_vect[1]*zeta8 + w_vect[2]*zeta8^2 + w_vect[3]*zeta8^3)*z == N
True

An example, as requested by Mr. Brooks: to calculate $\frac{\zeta_8-\zeta_8^3}{\zeta_8+\zeta_8^3}$ we put $z = \zeta_8+\zeta_8^3$ and compute $$\begin{align*}w &= (\zeta_8^3+\zeta_8^9)(-\zeta_8-\zeta_8^3)(-\zeta_8^3-\zeta_8^9)\\ &= (\zeta_8+\zeta_8^3)^3\\&=\zeta_8^3 + 3\zeta_8^2\zeta_8^3 + 3\zeta_8\zeta_8^6 + \zeta_8^9\\&= \zeta_8^3 - 3\zeta_8 - 3\zeta_8^3 + \zeta_8\\ &= -2(\zeta_8 + \zeta_8^3)\end{align*}$$ and $$N_{L/K}(z) = wz = -2(\zeta_8 + \zeta_8^3)^2 = -2(\zeta_8^2 + 2\zeta_8\zeta_8^3 + \zeta_8^6) = -2(\zeta_8^2 - 2 - \zeta_8^2) = 4$$ so $$\frac{1}{z} = \frac{w}{N_{L/K}(z)} = -\frac{1}{2}(\zeta_8+\zeta_8^3).$$ (This is the same as putting $(a,b,c,d) = (0,1,0,1)$ in the formulae above.)

Finally: $$\frac{\zeta_8-\zeta_8^3}{\zeta_8+\zeta_8^3} = (\zeta_8-\zeta_8^3)\cdot\frac{1}{z} = -\frac{1}{2}(\zeta_8-\zeta_8^3)(\zeta_8+\zeta_8^3) = -\frac{1}{2}(\zeta_8^2 - \zeta_8^6) = -\zeta_8^2.$$


All the above holds in an abstract number field $L= \mathbf{Q}(\zeta_8)$ where $\zeta_8$ is a root of $X^4+1$. If you choose the embedding $L\to\mathbb{C}$ given by $\zeta_8 \mapsto \exp(2\pi i/8)$ then e.g. the example computes $$\frac{\sqrt{2}}{\sqrt{-2}} = -i.$$

Solution 2:

This amounts to the same thing Ricardo Buring suggested (+1), but may be easier to follow.

Your denominator is of the form $$z_1+z_2\xi,$$ where $z_1=\alpha+\gamma i$ and $z_2=\beta+\delta i$ are two elements of $\Bbb{Q}(i)$ such that at least one of them is non-zero. Let's use the fact that $\xi^2=i$: $$ \frac1{z_1+z_2\xi}=\frac{z_1-z_2\xi}{(z_1+z_2\xi)(z_1-z_2\xi)}= \frac{z_1-z_2\xi}{z_1^2-z_2^2\xi^2}=\frac{z_1-z_2\xi}{z_1^2-iz_2^2}. $$ After this preliminary step your denominator is a non-zero element of $\Bbb{Q}(i)$, so you know how to continue with the calculation.


I was taking advantage of the fact that the relevant Galois group has a suitable subgroup, allowing me to first calculate the relative norm of the denominator to an intermediate subfield. Not much to this. Further observe that there are occasions, when no intermediate fields exist. Therefore this is not a universal remedy. Either use the norm like Ricardo did. Or, use the general algorithm from Lord Shark the Unknown's comment under the question.

Solution 3:

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.