In field theory, a primitive element of a finite field GF(q) is a generator of the multiplicative group of the field. In other words, is called a primitive element if it is a primitive (q−1)th root of unity in GF(q); this means that all the non-zero elements of can be written as for some (positive) integer .