4 Linear algebra

4.1 Fields

This part of the module is about generalizing what we know about matrices and vectors.

When we talk about vectors, or matrices, there’s an important thing we have to decide: where do the entries come from? For example, we might work with matrices with real numbers as entries, or with complex numbers as entries. We never really discussed this in the first part of the module, because it doesn’t make any difference to the theory we developed. So it’s natural to ask which other kinds of numbers we could use as entries in our vectors and matrices and still have everything work OK.

The answer is that the entries must come from what is called a field. Roughly speaking, a field is a set with multiplication and addition operations that obey the usual rules of algebra, and where you can divide by any non-zero element. Examples are , the set of all real numbers, , the set of all complex numbers, , the set of all rational numbers. Non-examples are : you can’t divide by 2 in , and M2×2(), the set of all 2×2 real matrices, again because we know there are non-zero 2×2 matrices which aren’t invertible.

The usual way to define a field is to write down a list of axioms. Everything that satisfies the axioms is a field. If you do want to know the field axioms, here they are: you can read them here.

The next section is about an important family of fields we have not seen yet.

4.1.1 Finite fields of prime order

Let p be a prime number. Then 𝔽p, the finite field of order p, is the set {0,1,2,,p1} with addition and multiplication exactly the same as for ordinary whole numbers, except that we regard all multiples of p as equal to 0.

This is easier to understand in an example. Let’s work in 𝔽5. Then

  • 3+4=7=2 because 5=0 in 𝔽5. Similarly,

  • 3+2=0,

  • 4×3=12=2.

We can deal with subtractions and negative numbers too:

  • 34=1=1+5=4

  • 4×(3)=12=12+15=3.

4.1.2 Addition and multiplication tables

There’s an easy way to summarize all the possible additions and multiplications in 𝔽5: draw tables with rows and columns labelled by 0,1,2,3,4, and in row i and column j put the result of i+j or i×j.

+ 0 1 2 3 4
0 0 1 2 3 4
1 1 2 3 4 0
2 2 3 4 0 1
3 3 4 0 1 2
4 4 0 1 2 3
Table 4.1: Addition table for 𝔽5.
× 0 1 2 3 4
0 0 0 0 0 0
1 0 1 2 3 4
2 0 2 4 1 3
3 0 3 1 4 2
4 0 4 3 2 1
Table 4.2: Multiplication table for 𝔽5.

Here are the addition and multiplication tables for 𝔽3.

+ 0 1 2
0 0 1 2
1 1 2 0
2 2 0 1
Table 4.3: Addition table for 𝔽3.
× 0 1 2
0 0 0 0
1 0 1 2
2 0 2 1
Table 4.4: Multiplication table for 𝔽3.

4.1.3 Multiplicative inverses

In a field, you have to be able to divide by non-zero elements. Being able to divide by x is equivalent to the existence of an element 1/x or x1, called a multiplicative inverse to x (because y/x is just y×1/x). So to check that we can divide, we need to check that for each nonzero x there is another element which you can multiply x by to get 1. We will do this for the examples of 𝔽3 and 𝔽5.

In 𝔽3, you can see from the table that

  • 1×1=1, so 11=1

  • 2×2=1, so 21=2

and so every non-zero element of 𝔽3 has a multiplicative inverse.

In 𝔽5, you can see from the table that

  • 1×1=1, so 11=1

  • 2×3=1, so 21=3 and 31=2

  • 4×4=1, so 41=4.

and so every non-zero element of 𝔽5 has a multiplicative inverse.

We’re going to give a proof that every element of 𝔽p has a multiplicative inverse and give a method for finding these multiplicative inverses.

First, here is a reminder about division with remainder. There is a fundamental fact about the natural numbers: if you have any two positive whole numbers x and y, you can try to divide x by y. When you do that you get a quotient q and a remainder r, which is a nonnegative integer less than y:

x =qy+r 0r<y

It’s easy to convince yourself of the truth of this by imagining starting at zero on the number line and taking steps of size y to the right, stopping when the next step would take you past x. Call the number of steps taken at the point you stop q. You’ve stopped at the number qy, and the distance from this point to x, which is the remainder r=xqy, must be less than y since otherwise you could take another full step without passing x.

Theorem 4.1.1.

Let p be prime and 0<a<p be a whole number. Then there are whole numbers s and t such that as+pt=1.

Proof.

Let g be the smallest positive number that can be written as an integer multiple of p plus an integer multiple of a, so g=as+pt for some integers s and t. Note that g<p since pa is a positive number that can be written this way. Divide p by g to get quotient q and remainder r, so p=qg+r where 0r<g. Then

r =pqg
=pq(as+pt)
=(1qt)pqsa.

Since 0r<g and g is the smallest positive number that can be written as a multiple of p plus a multiple of a we must have r=0, that is, g divides the prime number p. Since g<p we have g=1. ∎

We can even calculate numbers s and t satisfying as+pt=1 quickly. To do this divide p by a, getting a quotient q2 and a remainder r2

p=q2a+r2  0r2<a

(we start with a subscript 2 here because we will think of p as r0 and a as r1). If r2=0, stop. Otherwise divide a by r2 getting a quotient q3 and remainder r3

a=q3r2+r3  0r3<r2

If r3=0, stop. Otherwise divide r2 by r3 getting a quotient q4 and remainder r4:

r2=q4r3+r4  0r4<r3

If r4=0, stop. Otherwise divide r3 by r4 getting quotient q5 and remainder r5:

r3=q5r4+r5  0r5<r4

and so on. The sequence r2,r3, satisfies

a>r2>r3>r4>r5>0

You can’t have a decreasing sequence of positive integers that goes on forever, so there is some m such that rm=0. The last few divisions were

rm5 =qm3rm4+rm3 (4.1)
rm4 =qm2rm3+rm2 (4.2)
rm3 =qm1rm2+rm1 (4.3)
rm2 =qmrm1+0 (4.4)

We claim that rm1=1. For rm1 divides rm2, because of the last equation. In (4.3) the terms on the right hand side are multiples of rm1, so the left hand side rm3 is a multiple of rm1 as well. Repeating the same argument we end up with rm1 dividing all the left-hand-sides, in particular, rm1 divides the prime number p. Since rm1<a<p we have rm1=1. So (4.3) is really

rm3=qm1rm2+1

or equivalently

rm3qm1rm2=1. (4.5)

Now we can express rm3 in terms of rs with a smaller subscript with equation (4.1), and we can express rm2 in terms of rs with a smaller subscript using (4.2). When we substitute this in (4.5), we get 1= some multiple of rm3 plus some multiple of rm4. And we can keep doing that over and over again until we eventually get 1= a multiple of r1 plus a multiple of r0, that is, as+pt for some whole numbers s and t.

It helps to see an example. Take p=13 and a=5. We have

13 =2×5+3
5 =1×3+2
3 =1×2+1
2 =2×1+0

and so

1 =31×2
=(132×5)1×(51×3)
=(132×5)1×(51×(132×5))
=2×135×5

This helps us find multiplicative inverses in 𝔽p because if as+pt=1 then in 𝔽p we have, since multiples of p are equal to zero, as=1 and s is the multiplicative inverse of a. In our example, p=13,a=5,s=5,t=2, so the multiplicative inverse of 5 in 𝔽13 is 5 which is the same as 8.