Skip to content

Chapter 128. Finite Fields

128.1 Introduction

A finite field is a field with finitely many elements. Finite fields are also called Galois fields and are commonly written as

Fq \mathbb{F}_q

or

GF(q), \operatorname{GF}(q),

where qq is the number of elements in the field.

Finite fields are important because they give linear algebra a discrete setting. Over R\mathbb{R} or C\mathbb{C}, vector spaces contain infinitely many vectors. Over a finite field, every finite-dimensional vector space contains only finitely many vectors. This makes the subject useful in coding theory, cryptography, finite geometry, computer algebra, and digital communication. Finite fields exist exactly when the number of elements is a prime power q=pnq=p^n, and all finite fields of the same order are isomorphic.

The basic concepts of linear algebra remain the same: vectors, matrices, subspaces, bases, linear maps, rank, nullity, and determinants. What changes is the arithmetic.

128.2 Fields

A field is a set equipped with addition, subtraction, multiplication, and division by nonzero elements.

The familiar examples are

Q,R,C. \mathbb{Q}, \qquad \mathbb{R}, \qquad \mathbb{C}.

A field FF has two operations:

$$

  • : F \times F \to F, $$

and

:F×FF. \cdot : F \times F \to F.

These operations satisfy the usual laws: associativity, commutativity, distributivity, additive identities, additive inverses, multiplicative identities, and multiplicative inverses for nonzero elements.

Linear algebra can be developed over any field. The scalars in a vector space do not have to be real or complex. They may come from a finite field.

128.3 Prime Fields

The simplest finite fields are the fields

Fp \mathbb{F}_p

where pp is prime.

The elements are residue classes modulo pp:

Fp={0,1,2,,p1}. \mathbb{F}_p = \{0,1,2,\ldots,p-1\}.

Addition and multiplication are performed modulo pp.

For example, in F5\mathbb{F}_5,

3+4=72(mod5), 3+4 = 7 \equiv 2 \pmod 5,

and

34=122(mod5). 3 \cdot 4 = 12 \equiv 2 \pmod 5.

The number pp must be prime. If pp is composite, then some nonzero elements do not have multiplicative inverses. For example, modulo 66,

230(mod6), 2 \cdot 3 \equiv 0 \pmod 6,

although neither 22 nor 33 is zero. Thus arithmetic modulo 66 does not form a field.

128.4 Characteristic

The characteristic of a field is the least positive integer pp such that

p1=0. p \cdot 1 = 0.

In a finite field, the characteristic is always prime.

For Fp\mathbb{F}_p, the characteristic is pp. This means that adding 11 to itself pp times gives zero:

1+1++1p times=0. \underbrace{1+1+\cdots+1}_{p \text{ times}} = 0.

For example, in F2\mathbb{F}_2,

1+1=0. 1+1=0.

This identity changes many familiar formulas. In characteristic 22, subtraction is the same as addition:

ab=a+b. a-b = a+b.

This fact is heavily used in binary coding theory and digital computation.

128.5 Vector Spaces over Finite Fields

Let FF be a finite field. A vector space over FF is a set VV whose vectors can be added and multiplied by scalars from FF.

The standard example is

Fn. F^n.

If F=FqF=\mathbb{F}_q, then

Fqn \mathbb{F}_q^n

is the set of all nn-tuples

(x1,,xn),xiFq. (x_1,\ldots,x_n), \qquad x_i \in \mathbb{F}_q.

Since each coordinate has qq possible values, the total number of vectors is

qn. q^n.

Thus a finite-dimensional vector space over a finite field is a finite set.

For example,

F23 \mathbb{F}_2^3

has

23=8 2^3 = 8

vectors.

They are

000, 001, 010, 011, 100, 101, 110, 111. 000,\ 001,\ 010,\ 011,\ 100,\ 101,\ 110,\ 111.

128.6 Linear Combinations

Linear combinations are defined as usual.

If

v1,,vkV v_1,\ldots,v_k \in V

and

a1,,akFq, a_1,\ldots,a_k \in \mathbb{F}_q,

then

a1v1++akvk a_1v_1+\cdots+a_kv_k

is a linear combination of the vectors.

The coefficients are chosen from the finite field.

For example, over F2\mathbb{F}_2, the only scalars are 00 and 11. Therefore a linear combination is simply a sum of selected vectors.

If

v1=[101],v2=[011], v_1 = \begin{bmatrix} 1\\ 0\\ 1 \end{bmatrix}, \qquad v_2 = \begin{bmatrix} 0\\ 1\\ 1 \end{bmatrix},

then their span over F2\mathbb{F}_2 is

{[000],[101],[011],[110]}. \left\{ \begin{bmatrix}0\\0\\0\end{bmatrix}, \begin{bmatrix}1\\0\\1\end{bmatrix}, \begin{bmatrix}0\\1\\1\end{bmatrix}, \begin{bmatrix}1\\1\\0\end{bmatrix} \right\}.

The last vector appears because

[101]+[011]=[110] \begin{bmatrix} 1\\ 0\\ 1 \end{bmatrix} + \begin{bmatrix} 0\\ 1\\ 1 \end{bmatrix} = \begin{bmatrix} 1\\ 1\\ 0 \end{bmatrix}

in F23\mathbb{F}_2^3.

128.7 Subspaces

A subspace of Fqn\mathbb{F}_q^n is a subset closed under addition and scalar multiplication.

If WW is a kk-dimensional subspace of Fqn\mathbb{F}_q^n, then

W=qk. |W| = q^k.

This formula is specific to finite fields and is often useful.

For example, a 22-dimensional subspace of F35\mathbb{F}_3^5 contains

32=9 3^2 = 9

vectors.

A 00-dimensional subspace contains only the zero vector. A 11-dimensional subspace over Fq\mathbb{F}_q contains qq vectors: the zero vector and q1q-1 nonzero scalar multiples of a single vector.

128.8 Bases and Dimension

A basis over a finite field is a linearly independent spanning set.

If

V=Fqn, V = \mathbb{F}_q^n,

then the standard basis is

e1,,en, e_1,\ldots,e_n,

where eie_i has a 11 in position ii and 00 elsewhere.

Every vector has a unique coordinate representation:

v=a1e1++anen,aiFq. v = a_1e_1+\cdots+a_ne_n, \qquad a_i \in \mathbb{F}_q.

The dimension is the number of basis vectors.

The number of vectors in an nn-dimensional vector space over Fq\mathbb{F}_q is

qn. q^n.

This gives a direct relation between algebraic dimension and cardinality.

128.9 Matrices over Finite Fields

A matrix over Fq\mathbb{F}_q is a rectangular array whose entries lie in Fq\mathbb{F}_q.

For example, over F2\mathbb{F}_2,

A=[101011] A = \begin{bmatrix} 1 & 0 & 1\\ 0 & 1 & 1 \end{bmatrix}

is a 2×32 \times 3 matrix.

Matrix addition, scalar multiplication, and matrix multiplication are performed using the field operations.

For example, over F2\mathbb{F}_2,

[1101]+[1011]=[0110]. \begin{bmatrix} 1 & 1\\ 0 & 1 \end{bmatrix} + \begin{bmatrix} 1 & 0\\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 0 & 1\\ 1 & 0 \end{bmatrix}.

The entry 1+11+1 becomes 00, since arithmetic is modulo 22.

128.10 Linear Systems over Finite Fields

A system of linear equations over a finite field has the same matrix form:

Ax=b. Ax=b.

The difference is that all arithmetic is performed in the field.

For example, over F5\mathbb{F}_5, consider

x+2y=3,3x+y=4. \begin{aligned} x+2y &= 3,\\ 3x+y &= 4. \end{aligned}

Eliminate xx. Multiply the first equation by 33:

3x+6y=9. 3x+6y = 9.

Modulo 55, this becomes

3x+y=4. 3x+y = 4.

This is exactly the second equation. Hence the two equations are dependent, and the system has more than one solution.

The usual methods still apply: row reduction, rank computation, and null space computation. The arithmetic is finite, but the structure is unchanged.

128.11 Gaussian Elimination

Gaussian elimination works over any field.

The allowed row operations are:

OperationMeaning
Swap two rowsReorder equations
Multiply a row by a nonzero scalarRescale an equation
Add a scalar multiple of one row to another rowReplace an equation by an equivalent one

The only requirement is that every nonzero scalar used for division has an inverse. Fields satisfy this requirement.

For example, in F7\mathbb{F}_7, the inverse of 33 is 55, since

35=151(mod7). 3\cdot 5 = 15 \equiv 1 \pmod 7.

Thus division by 33 means multiplication by 55.

128.12 Rank and Nullity

For a matrix

AMm,n(Fq), A \in M_{m,n}(\mathbb{F}_q),

the rank is the dimension of its column space. The nullity is the dimension of its null space:

ker(A)={xFqn:Ax=0}. \ker(A)=\{x\in \mathbb{F}_q^n : Ax=0\}.

The rank-nullity theorem remains valid:

rank(A)+nullity(A)=n. \operatorname{rank}(A)+\operatorname{nullity}(A)=n.

If the nullity is rr, then the homogeneous system

Ax=0 Ax=0

has

qr q^r

solutions.

This counting form is one of the characteristic features of finite-field linear algebra.

128.13 Invertible Matrices

A square matrix

AMn(Fq) A \in M_n(\mathbb{F}_q)

is invertible if there exists a matrix A1A^{-1} such that

AA1=A1A=I. AA^{-1}=A^{-1}A=I.

Equivalently:

ConditionStatement
Full rankrank(A)=n\operatorname{rank}(A)=n
Trivial kernelker(A)={0}\ker(A)=\{0\}
Nonzero determinantdet(A)0\det(A)\neq0
Bijective mapxAxx\mapsto Ax is one-to-one and onto

The set of all invertible n×nn \times n matrices over Fq\mathbb{F}_q is called the general linear group:

GLn(Fq). \operatorname{GL}_n(\mathbb{F}_q).

Its order is

GLn(Fq)=(qn1)(qnq)(qnq2)(qnqn1). |\operatorname{GL}_n(\mathbb{F}_q)| = (q^n-1)(q^n-q)(q^n-q^2)\cdots(q^n-q^{n-1}).

The formula comes from choosing linearly independent columns. The first column can be any nonzero vector. The second column can be any vector outside the span of the first. The kk-th column must lie outside the span of the previous k1k-1 columns.

128.14 Field Extensions

Not every finite field has prime order. Finite fields also exist with pnp^n elements, where pp is prime and n1n \geq 1.

For example,

F4,F8,F9,F16 \mathbb{F}_4,\quad \mathbb{F}_8,\quad \mathbb{F}_9,\quad \mathbb{F}_{16}

are finite fields.

A field with pnp^n elements may be constructed as

FpnFp[x]/(f(x)), \mathbb{F}_{p^n} \cong \mathbb{F}_p[x]/(f(x)),

where f(x)f(x) is an irreducible polynomial of degree nn over Fp\mathbb{F}_p. In this construction, elements are represented by polynomials of degree less than nn, and multiplication is reduced modulo f(x)f(x).

128.15 Example: The Field F4\mathbb{F}_4

The field F4\mathbb{F}_4 has four elements. It cannot be the integers modulo 44, since arithmetic modulo 44 is not a field.

Instead, construct it from

F2[x]/(x2+x+1). \mathbb{F}_2[x]/(x^2+x+1).

Let α\alpha be the image of xx. Then

α2+α+1=0. \alpha^2+\alpha+1=0.

Since the characteristic is 22, subtraction equals addition, so

α2=α+1. \alpha^2 = \alpha+1.

The four elements are

0,1,α,α+1. 0,\quad 1,\quad \alpha,\quad \alpha+1.

Addition is polynomial addition modulo 22. Multiplication uses the rule

α2=α+1. \alpha^2=\alpha+1.

For example,

α(α+1)=α2+α=(α+1)+α=1. \alpha(\alpha+1) = \alpha^2+\alpha = (\alpha+1)+\alpha = 1.

Thus α+1\alpha+1 is the multiplicative inverse of α\alpha.

128.16 Frobenius Map

In a finite field of characteristic pp, the Frobenius map is

φ(x)=xp. \varphi(x)=x^p.

It satisfies

φ(x+y)=φ(x)+φ(y) \varphi(x+y)=\varphi(x)+\varphi(y)

and

φ(xy)=φ(x)φ(y). \varphi(xy)=\varphi(x)\varphi(y).

The identity

(x+y)p=xp+yp (x+y)^p=x^p+y^p

holds in characteristic pp, because the intermediate binomial coefficients are divisible by pp.

In Fpn\mathbb{F}_{p^n}, every element satisfies

xpn=x. x^{p^n}=x.

Thus the roots of

XpnX X^{p^n}-X

are precisely the elements of Fpn\mathbb{F}_{p^n}.

128.17 Multiplicative Group

The nonzero elements of a finite field form a group under multiplication:

Fq×=Fq{0}. \mathbb{F}_q^\times = \mathbb{F}_q \setminus \{0\}.

This group has

q1 q-1

elements.

A fundamental theorem states that

Fq× \mathbb{F}_q^\times

is cyclic. Therefore there exists an element gg such that every nonzero element can be written as

gk g^k

for some integer kk. Such an element is called a primitive element.

This fact is important in coding theory, cryptography, and computational algebra.

128.18 Linear Codes

A linear code is a subspace of a finite-dimensional vector space over a finite field.

Most commonly, one studies subspaces

CFqn. C \subseteq \mathbb{F}_q^n.

The elements of CC are called codewords.

If CC has dimension kk, then it contains

qk q^k

codewords.

A generator matrix is a matrix whose rows form a basis for CC. If

G G

is a k×nk \times n generator matrix, then every codeword has the form

uG,uFqk. uG, \qquad u \in \mathbb{F}_q^k.

A parity-check matrix is a matrix HH such that

C={xFqn:Hx=0}. C = \{x \in \mathbb{F}_q^n : Hx=0\}.

Thus coding theory is linear algebra over finite fields.

128.19 Cryptographic Use

Finite fields are also used in cryptography.

The multiplicative group Fq×\mathbb{F}_q^\times supports discrete logarithm problems. Given a primitive element gg and an element hh, one asks for an integer kk such that

gk=h. g^k=h.

For carefully chosen fields, this problem can be computationally difficult.

Finite fields also appear in elliptic curve cryptography, where the points of an elliptic curve are defined over a finite field. The field supplies the arithmetic; the curve supplies the group structure.

128.20 Finite Geometry

Finite vector spaces give finite geometries.

For example, the one-dimensional subspaces of

Fqn \mathbb{F}_q^n

are the points of projective space

Pn1(Fq). \mathbb{P}^{n-1}(\mathbb{F}_q).

The number of one-dimensional subspaces of Fqn\mathbb{F}_q^n is

qn1q1. \frac{q^n-1}{q-1}.

This follows because there are qn1q^n-1 nonzero vectors, and each one-dimensional subspace contains q1q-1 nonzero vectors.

Finite geometry is closely connected with combinatorics, design theory, coding theory, and group theory.

128.21 Summary

Finite fields provide a discrete scalar system for linear algebra. Their arithmetic is finite, exact, and algebraic.

The main facts are:

ConceptStatement
Finite fieldA field with finitely many elements
OrderAlways pnp^n, where pp is prime
Prime fieldFp\mathbb{F}_p, arithmetic modulo pp
Extension fieldFpn\mathbb{F}_{p^n}, built using irreducible polynomials
Vector space size(
Subspace sizeA kk-dimensional subspace has qkq^k elements
Linear systemsSolved by ordinary row reduction using field arithmetic
Multiplicative groupFq×\mathbb{F}_q^\times is cyclic
ApplicationsCoding theory, cryptography, finite geometry

Finite-field linear algebra keeps the structural form of ordinary linear algebra but replaces continuous arithmetic with exact finite arithmetic. This makes it one of the main tools for discrete mathematics and computation.