**F**_{p} is the
field of prime order p.

**F**_{p}^{n} is the set of all n-tuples
(δ_{0} , δ_{1}, ..., δ_{n - 1})
of elements of **F**_{p}.

The position map lays out **F**_{p}^{2m} as a square of order
p^{m}.
In the square, the rows and columns are numbered from 0 to
p^{m}-1.
Let x =
(δ_{0}, δ_{1}, ..., δ_{2m-1}) be an element of
**F**_{p}^{2m}.
Let

δ_{i} = μ(d_{i}),

0 ≤ d_{i} < p,

i = 0, ..., 2m-1 .

Then **P**x is the cell at row
r and column c, where

r = d_{0}p^{m-1} + d_{1}p^{m-2} + ... + d_{m-1}

c = d_{m}p^{m-1} + d_{m+1}p^{m-2} + ... + d_{2m-1} .

What's going on here? The coordinates of x are interpreted as integers from 0 to p-1; they are separated into two groups of m numbers, which are then used as the "digits" of r and c in base p.

Here is a demonstration of how the position map works.
The "P" and "M" controls allow you to select a square whose order p^{m} is between
2 and 32.
The other controls allow you to select values for d_{0} , ... , d_{2m-1}
.
The corresponding position in the square is shown in green.
Alternatively, if you click on a position in the square, then the corresponding values of
d_{0} , ... , d_{2m-1} are displayed in the controls.

r =

c =

Just as the position map assigns a cell in the p^{m} × p^{m} square
to every element of **F**_{p}^{2m}, the content map assigns to
every such element a number in the range 0 ≤ n < p^{2m}.
As before, let x =
(δ_{0} , δ_{1} ,..., δ_{2m-1}) be an element of
**F**_{p}^{2m}.
Let

δ_{i} = μ(d_{i}),

0 ≤ d_{i} < p,

i = 0, ..., 2m-1 .

Then

**C**x = d_{0}p^{2m-1} +...+ d_{2m-1}.

In effect, the coordinates of x are being used as digits in the base-*p* expansion of
**C**x.

In a vector space over **F**_{p}, two elements can be added or subtracted, and
an element of the vector space can be multiplied by an element of **F**_{p}
.
The sum of two elements of **F**_{p}^{n} is defined thus:

(δ_{0} , δ_{1} ,..., δ_{n-1}) +
(δ′_{0} , δ′_{1} ,..., δ′_{n-1}) =
(δ_{0}+δ′_{0} ,..., δ_{n-1}+δ′_{n-1}) .

Here is a demonstration of addition on **F**_{p}^{2m} arranged as
a square of order p^{m}.
In the equation U + V =
W, the three vectors are color-coded.
As in the previous display, there are "P" and "M" controls with which to select the order of the square.
For U and V, there are
controls for the values of d_{0} ,..., d_{2m-1}.
The corresponding values for W are shown.
You can also change the positions of U and
V in the square: clicking
on a position will bring up a dialog which gives you the choice of moving either
U or V to that
position.

U: r =

c =

V: r =

c =

W: r =

c =

The product of an element of an element **F**_{p} and an element of
**F**_{p}^{n} is defined thus:

κ(δ_{0} , δ_{2} ,..., δ_{n})
=
(κδ_{0} , κδ_{2} ,..., κδ_{n}) .

Here is a demonstration of multiplication by a field element κ in
**F**_{p} of an element U in
**F**_{p}^{2m}.
The "P" and "M" controls are like those in the previous demos.
There are selectors for the values of d_{0} ,..., d_{2m} for
U, and there is another for the value of κ.
In the square, U is represented by a red cell, and W =
κU is represented in blue.
If you click on a position in the square, U will be moved to that position.

κ:

U: r =

c =

W: r =

c =

Aren't vectors geometrical? I'm pretty sure I remember learning that a vector was something that had length and direction.

Well, yes; if the field elements are real numbers, elements of **R** rather than elements of
**F**_{p}, then the vectors are geometrical.
**R**^{2} is a useful algebraic tool for studying plane geometry, and
**R**^{3} is the same for solid geometry.
Now **R**^{2} and **R**^{3} are just special
cases of **R**^{n}.
If you do your geometry using the algebra of vectors, then the extension from two or three dimensions to four or more is
almost easier to do than to refrain from doing.
The extension to other base fields, such as **F**_{p}, empowers us to use our
intuitions about lines and planes in a different and novel context.

Lines and planes in space are described in linear algebra as *affine subspaces.*
To begin with, a *linear subspace* is a set of vectors which includes u + v if it includes
u and v, and includes κ
u if it includes u and κ is a
field element.
An *affine subspace* is a set that can be constructed from a linear subspace by adding a fixed vector to each member
of it.
That is, A is an affine subspace if there is a linear subspace
S and a vector w such that
A consists of those vectors w + x
where x belongs to S.
We say that A is *parallel* to
S, and that all the affine spaces parallel to
S are parallel to one another.

Affine subspaces are sometimes called ** flats**. I will generally adhere to this usage; when the dimension of a
flat is particularly important, I will call it a

Here is a demonstration of the behavior of flats in **F**_{p}^{2m}.
You can select a set of points in the vector space, and the applet will show you the flat which they *span*, that is,
the smallest flat containing them.
This set is *independent* if no proper subset spans the same flat. The demo will only let you choose an independent
set of points.
The points belonging to the flat are shown in green, and the spanning set are emphasized by dots.
To manipulate the spanning set, you can click over a cell.
A dialog box will show you what operations are available for this cell; if it is one of the selected points then you can
remove it, or if it is not already in the affine subspace you can add it to the spanning set.
The flat can be translated to a parallel flat using the pop-up menu; if you click a cell belonging to the flat and
select "Translate", then clicking on another cell will have the effect of moving the former
cell of the flat to the latter point, and translating the entire flat accordingly.

Parallel flats can be displayed in another way as well. If you press the button marked "Color parallel flats at random," then a random color will be chosen for each flat, and its points will be marked by lozenges of that color. The button marked "Blank out parallel flats" will remove the colored lozenges.

On the vector space **F**_{p}^{n}, a *linear function* is a function
f from the vector space to **F**_{p}, satisfying
**F**_{p}^{n}
and κ belongs to
**F**_{p}.

f(u + v) = f(u) + f(v)

and
f(κu) = κf(u)

where
u
and
v
belong to
An *affine function* is a linear function plus a constant.
More formally, it is a function of the form
u → f(u) + λ
where f is linear and λ is an element of
**F**_{p}.
An affine function is determined by its values at a set of points that is independent and spans the entire space.

The accompanying demonstration shows affine functions on vector spaces of the form
**F**_{p}^{2m} displayed as squares.
Having chosen the values of *p* and *m*, you can specify the affine function in one of two ways.
The first is to select the value of λ and the value
of the linear part at each of the points e_{0} ,...,
e_{2m-1}, where e_{i}
has all components *0* except for a *1* at the *i*-th place.
Controls are provided to select these values; the labels also indicate the positions of the points
e_{i} in the square.
The other way is to select the values of the affine function itself, at
2m + 1 points: Z = (0,0,...,0) and
e_{0} ,..., e_{2m-1}.
These points are highlighted in pale green.
If you click on one of these points, a dialog box will appear with a selector for the value of the affine function at
that point.

If an affine function *A* has the form A(u) =
L(u) + c where c is constant and L is
linear, then we shall call L the *linear part* of *A*, and
c the *constant part*.

If L_{0}, ..., L_{2m-1} are linear functions, then they determine a
*linear map* L from **F**_{p}^{2m} to
itself, thus:

Lu = (L_{0}u, ..., L_{2m-1}u) .

Similarly, if A_{0}, ..., A_{2m-1} are affine functions, then they determine an
*affine map* A:

Au = (A_{0}u, ..., A_{2m-1}u) .

We will say that L_{0}, ..., L_{2m-1} and
A_{0}, ..., A_{2m-1} are the *components* of L
and A respectively.