# Any difference working with matrices over fields?

Is there any difference regarding row operations and such with matrices when they are over fields? For instance, I have the following matrix over GF(3):

0 0 2 2 0 2
2 2 0 2 1 2
1 1 2 0 2 2
1 1 0 1 2 1


I did a bunch of row operations and put it into reduced echelon form which gave me:

1 1 0 0 0 2/3
0 0 1 0 0 2/3
0 0 0 1 0 1/3
0 0 0 0 1  0


Is this correct or is something done differently with operations when it's a field?

EDIT: Used all the suggestions listed below. Could someone confirm my answer and let me know if there's any quicker steps to the answer? Listing all my steps below.

R1 <-> R4

1 1 0 1 2 1
2 2 0 2 1 2
1 1 2 0 2 2
0 0 1 1 0 1


R2 = R2 + R3

1 1 0 1 2 1
0 0 2 2 0 1
1 1 2 0 2 2
0 0 2 2 0 2


R3 = R3 + 2*R1

1 1 0 1 2 1
0 0 2 2 0 1
0 0 2 2 0 1
0 0 2 2 0 2


R2 = R2 + R3

1 1 0 1 2 1
0 0 1 1 0 2
0 0 2 2 0 1
0 0 2 2 0 2


R3 = R2 + R3, R4 = R2 + R4

1 1 0 1 2 1
0 0 1 1 0 2
0 0 0 0 0 0
0 0 0 0 0 1


R4 <-> R3

1 1 0 1 2 1
0 0 1 1 0 2
0 0 0 0 0 1
0 0 0 0 0 0


R2 = R2 + R3

1 1 0 1 2 1
0 0 1 1 0 0
0 0 0 0 0 1
0 0 0 0 0 0


R1 = R1 + 2*R3

1 1 0 1 2 0
0 0 1 1 0 0
0 0 0 0 0 1
0 0 0 0 0 0

• What the others said. Everything is the same, and you must not divide by zero, in this case you must not divide by $3$ either, because $3=0$. See this old answer for an example of doing row reduction over $GF(29)$. +1 to all – Jyrki Lahtonen Oct 16 '15 at 15:11

Everything is done the same, with the adjustment that all the matrix entries and the scalars you use come from the field.

So as mentioned, if you are working in $\mathbb{F}_{3}$ then you can't divide a row by $3=0$. Any time you perform a row operation you can reduce the entries mod $3$.

• One quick question. Can I still do division normally with a single row? For instance, if I have a row of all 2's, can I just do 1/2 times that row to make them 1's? Or is it different with GF(3)? – pfinferno Oct 17 '15 at 4:51
• @pfinferno You want to multiply by $2^{-1} = 2$. – Morgan Rodgers Oct 17 '15 at 6:37
• @pfinferno Yes, but then if you had a $1$ in that row it would turn into $1/2$. This is another way of writing $2^{-1}$, and $2^{-1} = 2$ since $2 \cdot 2 = 4 \equiv 1 \bmod{3}$. – Morgan Rodgers Oct 17 '15 at 14:08
• @pfinferno It helps to realize that $2 = -1$ in this field (and you know that $(-1)^{-1} = -1$). – Morgan Rodgers Oct 17 '15 at 14:48
• @pfinferno Yep, looks right to me. – Morgan Rodgers Oct 17 '15 at 20:45

Hint. Does $2/3$ make sense over GF(3)?

• Nope, co-efficients can be 0,1, or 2 I remember now. Is the addition = subtraction here? I remember working with the fields before 2 + 2 = 0. – pfinferno Oct 16 '15 at 5:30
• @pfinferno: In characteristic 2, addition is subtraction, because $2=0$ implies $1=-1$. In characteristic 3, that doesn't work: you get, e.g., $-1 = 2$. I suppose if you wanted, you could say that subtraction and doubling are the same. Or that doubling is the same as halving, because $4=1$ ,and thus $2 = \frac{1}{2}$. – user14972 Oct 16 '15 at 5:49

Yes, everything here is done the same way — including the fact you shouldn't divide by zero like you did in your calculations.