Finite fields

MAGMA knows about all the finite fields.

To create the finite field $ \mathbb{F}_p$ in MAGMA, type F:=GF(p); . For example, F:=GF(5); Set(F); returns { 0, 1, 2, 3, 4 } . Addition is carried out using $ +$ and multiplication using $ *$.

Exercise 2.14.1   List all the elements of $ GF(7)$. Create a multiplication table for $ GF(7)$.

The command GF returns a field for any prime power $ p^k$. MAGMA assigns a fixed primitive element to each field $ GF(p^k)$. This is a root of a Conway polynomial, which is the primitive polynomial over $ GF(p)$ defining $ GF(p^k)$. If you don't want to use a root of the Conway polynomial as a generator, one can also specify some other polynomial.

To define the field of 3 elements, type

F3 := FiniteField(3);
We can define the field of $ 3^4$ elements in several different ways. We can use the Conway polynomial:
> F<z> := FiniteField(3^4);
> F;
Finite field of size 3^4
> DefiningPolynomial(F);
$.1^4 + 2*$.1^3 + 2

We can define it as an extension of the field of 3 elements, using the Conway polynomial:

> F<z> := ext< F3 | 4 >;
> F;
Finite field of size 3^4

We can supply our own polynomial, say $ x^4 + x^3 + 2$:

> P<x> := PolynomialRing(F3);
> p:=x^4+x^3+2;
> IsIrreducible(p);
true
> F<z> := ext< F3 | p >;
> F;
Finite field of size 3^4

We can define it as an extension of the field of $ 3^2$ elements:

> F9<w> := ext< F3 | 2 >;
> F<z> := ext< F9 | 2 >;
> F;
Finite field of size 3^4

Each element $ a\in F$ is a polynomial of degree at most 3 in the primitive element $ z$:

$\displaystyle a=a_0+a_1z+a_2w^2+a_3w^3.
$

The coefficients $ a_i$ are obtained from the Eltseq command:
> w:=PrimitiveElement(F);
>
> a:=Random(F);
> a;
z^9
> Eltseq(a);
[ 0, 2, 1, 1 ]
> 2*w+w^2+w^3; //check
z^9
>
> a:=Random(F);
> a;
z^37
> Eltseq(a);
[ 1, 2, 0, 0 ]
> 1+2*w; //check
z^37

Exercise 2.14.2   List all the elements of $ GF(25)$, as poewers of a primitive element and as polynomials of degree $ 1$ or less in the primitive element.

Exercise 2.14.3   Using MAGMA, create a multiplication table for $ GF(4)$.



David Joyner 2007-09-03