# How does trigonometry in a Galois field work?

This is a follow-up to this question. I'm interested in doing trigonometry in finite fields on a computer. I do not understand precisely how trigonometric functions are supposed to work in a finite (Galois) field. I've read the Wikipedia article but I'm having trouble understanding what sorts of angles and numbers are representable in finite fields.

Here is what I do understand:

Starting with the 2D Cartesian plane with coordinates x, y, we can represent discrete angles that are multiples of $90^\circ = \frac{\pi}{2}$. These are the fourth roots of unity $x = \cos{\frac{2k\pi}{4}}$ and $y = \sin{\frac{2k\pi}{4}}$ or alternatively: $z = \cos{\frac{k\pi}{2}} + i\sin{\frac{k\pi}{2}}$, where $k$ is a positive integer less than $4$. These numbers can be represented solely with the integers. If we want to add discrete angles that are multiples of $30^\circ = \frac{2\pi}{12}$, we need a quadratic extension of the integers so that we have quadratic (algebraic) integers of the form $a + b\sqrt 3$. This allows us to represent the twelfth roots of unity as x and y coordinates. If we wish to double the number of angles to $15^\circ = \frac{2\pi}{24}$ multiples, we must extend our field again, forming a tower of quadratic extensions with numbers of the form $(a + b\sqrt 3) + (c + d\sqrt 3)\sqrt 2$. Numbers of this form allow us to represent the $24^{th}$ roots of unity.

How does this work in a finite field? Can I choose a finite field such that I can exactly represent the $n^{th}$ roots of unity in a manner analogous to the above? I'm particularly interested in constructable numbers, which feature only quadratic extensions (and multiquadratic extensions like $\sqrt{5 + \sqrt 5}$). In particular this means that $n$ is restricted to having factors of 2 and Fermat primes. I restricted myself to powers of $2$ and Fermat prime $3$ in my example above. Both $12$ and $24$ have factors of only $2$ and $3$.

- Edit -

To try to clarify what I'm struggling with, all the examples in the Wikipedia article and its accompanying references seem to demonstrate using angles of $\frac{\pi}{6}$. I do not see how to find or use a finite field that has been extended twice or more (e.g. angles of $\frac{\pi}{12}$ as described above), as the relationship to the complex plane in a finite field setting seems to blur as the tower of extensions grows.

This is a new subject for me, so I'd really appreciate an example or two to go along with any explanations.

-
In will help us when you say exactly what is hard to understand in the Wikipedia article. In particular so that we won't repeat what is already there. Also try to check out the original references. – Martin Brandenburg Mar 19 '13 at 14:17
I have updated the post and checked the original references. – hatch22 Mar 19 '13 at 14:48
The field $\mathbb{Z}_7[i]$ of 49 elements has 24th roots of unity. For example $1+i$. In characteristic 5 you need to go to a sextic extension to find those. Having primitive roots of unity of order 24 forbids characteristic three (in addition to char two that you already made an exception of). You can find 24th roots of unity also in prime fields such as $\mathbb{Z}_{73}$. – Jyrki Lahtonen Mar 19 '13 at 14:56
Fermat primes?! 17 is relatively easy. If $\omega$ is a primitive cubic root of unity (an entity that satisfies $\omega^2+\omega+1=0$), then the field $K=GF(17^2)$ $$K=\{a+b\omega\mid a,b\in\mathbb{Z}_{17}\}$$ has 24th roots of unity because its multiplicative group is cyclic of order $17^2-1=288=24\cdot12$. The arithmetic of $a,b$ is integer arithmetic modulo $17$ and the arithmetic of $\omega$ is just using that equation. – Jyrki Lahtonen Mar 19 '13 at 15:23
OK. I follow, but I'm having trouble visualizing how that would translate to angles in the (extended) finite complex plane (torus? sphere?) – hatch22 Mar 19 '13 at 15:50