# Abstract Real Numbers: Fields

When I learned abstract algebra, we very nearly skipped over rings. Basically, we
spent a ton of time talking about groups; then we talked about rings pretty much as a
stepping stone to fields. Since then, I’ve learned more about rings, in the context of
category theory. I’m going to follow the order in which I learned things, and move on
to fields. From fields, I’ll jump back a bit into some category theory, and look at
the category theoretic views of the structures of abstract algebra.

My reasoning is that I find that you need to acquire some understanding of what
the basic objects and morphisms mean, before the category theoretic view makes any
sense. Once you understand the basic concepts of abstract algebra, category theory
becomes very useful for understanding how things fit together. Many complicated things become clear in terms of category theoretic descriptions and structures – but first, you need to understand what the elements of those structures mean.

We started with groups. Groups describe a set of values with an operation with useful algebraic properties. It’s a very abstract version of something with minimal
number-like behavior. From there, we moved on to rings. Rings add a second operation, with constraints on the relationship between the two operations, and by doing so,
creates an abstraction that models some of the most basic concepts of the integers. Our next step is fields, which add a few more properties to rings, and as a result, create an abstraction that describes things that behave like the real numbers.

A field is really quite simple. First, it’s a ring, (R,+,×). In addition to
the standard ring properties, the × operator must be commutative, and the
identity values for + and × must be distict – that is,
1R≠0R. That gives you a non-trivial commutative
ring
. Then you add one more property: for every value r∈R except 0
(where 0 is the additive identity), there is a multiplicative inverse value
r-1∈R such that r×r-1=1 (where 1 is the
multiplicative identity).

Fields are fascinating things. There are a huge number of fascinating fields; I could spend a year doing nothing but writing about interesting sets of values that can form interesting fields. For now, I’ll run through a quick list of interesting ones, including my own favorite, the nimbers.

First, there’s the obvious ones:

1. The set of rational numbers is, fairly obviously, a field with
2. The set of real numbers is a field, again with standard operations.
3. The set of Complex numbers is a field, with standard complex operations.

Then there’s some slightly less obvious, but still pretty obvious ones:

1. The set of computable numbers is a field.
2. If P is a prime number, then the set of integers from 0 to P-1 are a field,
using standard modulo arithmetic operations.
3. The surreal numbers are a field – in fact, a super-field of the Reals.
4. If you allow the collection of values in a field to be a proper class, then the nimbers are a field. (more in a minute)

There are some suprising ones, but they take a bit of work to explain, so I’ll delay that for another post. To give you a sense for how something can behave very much like a number, and yet behave very counterintuitively, we can look at my favorite
warped type of number: the nimber. Nimbers were written about fairly extensively by John Conway in his book on the Surreal numbers. They’re basically what you get from
building surreals with only one set, rather than a pair of sets, and then try to build a field around the result. They’re quite cute. I did some fairly detailed writing about them a while ago; you can go read that for details.

The basic idea of the nimbers is to use an ordinal construction process. So you take the set of ordinal numbers, and associate them with construction steps. At ordinal 0, you have nothing but the empty set. So you call that the value 0. At ordinal 1, you’ve got nothing but 0 to work with, so you define the number 1 as the set containing 0. You can continue to construct numbers, where each number is produced at some ordinal. Each new ordinal introduces the next largest number
that can’t be produced as the sum of any numbers produced by previous ordinal steps. So ordinal step 2 gives us 2, and also 2+1=3. .

What’s odd about the nimbers is that there are no negative numbers. So what’s the additive inverse of 1? Itself! What’s the additive inverse of 2? 2!

This makes for some very interesting arithmetic. In nimbers, 15+6=9, 15+9=6, and 15+16=31. Howzat?

In nimbers, to add, you decompose nimbers into binary expansions, cancel repeated terms, and sum-up whatever’s left. So looking back at those examples, 15 = 8+4+2+1,
and 6=4+2, so 15+6=8+4+2+1+4+2; re-order that, and you get 8+4+4+2+2+1; cancel pairs, giving 8+1=9. For 15+16, 16=16, 15=8+4+2+1; there are no repeated terms, so

Multiplication also relies on a sort of binary expansion; but instead of
expanding in powers of 2, you expand in fermat 2-powers (numbers of the form 222). If you use the fermat 2-power expansions, combined with the fact that multiplication is distributive over addition, you can define nimber multiplication relatively easily, once you know that
in number multiplication, the nimber product of any pair of fermat 2-powers (numbers of the form 222n) is their normal product; the nimber product of a fermat 2-power n with itself (the nimber square of n) is 3n/2 . Combine that with distributivity of addition, and you can
work out nimber products.

For example, suppose we wanted to multiply 6×2. The first Fermat powers
are 2 and 4 (220 and 221). So
we can break 6×2 = (4+2)×2 = 4×2 + 2×2 = 8 + 3×2/2 = 8+3 = 11.

For a more interesting example, try 12 × 5:

1. 12=3×4; 5 = 4+1. So 12×5 = (3×4)×(4+1)
2. Distributing, we get 3×4×4 + 3×4×1.
3. Now, let’s focus on the term 3×4×4:
1. 3×4×4 = 3×((3/2)*4)
2. That reduces to 3×6 = (2+1)×6
3. Distributing, that gives us = 2×6 + 6
4. Decomposing 6, that gives us = 2×(4+2) + (4+2)
5. Distributing again, 2×4 + 2×2 + (4+2)
6. Doing the multiplications on the Fermat 2-powers,
we get 8 + 3 + 4 + 2 = 8 + 2 + 1 + 4 + 2 = 13.
4. Now, the term 3×4 = (2+1)×4 = 2×4 + 1×4 = 8 + 4 = 12.
5. Putting the two solved subterms together, we get 13 + 12 = 1.

So 12×5 = 13 + 12 = 8 + 4 + 1 + 8 + 4 = 1. So 12 is the multiplicative inverse of 5!

The multiplicative inverse of nimbers in just plain weird. It exists, but it’s pretty counterintuitive. Basically, given a nimber n, the multiplicative
inverse of n is the first-born nimber not in the set S, where 0 ∈ S, and if 0<n'<n, and m∈S, then (1+(n’-n)×m)/n’ ∈ S. That’s
a mess to understand; the easiest way to get a grip on it is to just work out
a multiplication table of nimbers. (I’ll probably toss together a nimber implementation over the weekend and post it here for you to play with.) If you
work it out, you can find, for example, that 3 and 2 are multiplicative inverses, 4 and 15, and and 8 and 10 are multiplicative inverses. Not what you might expect at all! But it works, and satisfies all of the field definitions.

Nimbers aren’t particularly important, but they’re fun. They give you an interesting sense of how a definition that really seems to point towards numbers as
we generally understand them can be easily used to produce something that looks
sort of pathological and distinctly un-numberish.

In later posts, we’ll see some of the interesting things that you can do with fields.

## 0 thoughts on “Abstract Real Numbers: Fields”

1. Anonymous

What’s the reason for the restriction that 1 is not the same as 0 is not a universally accepted convention. The main consequences I see are to be able to exclude the trivial ring from being a field (and so that 0 is not invertible). Why are these necessary?

2. Mark C. Chu-Carroll

There’s a couple of ways of looking at it. The main reason is that it prevents trivial fields. The point of a field – what makes it fundamentally different from a ring – is that it possesses a kind of structure.
If you allowed 1=0, so that you could have a trivial field, then what would the requirement that the multiplication operation have an inverse mean, if the only value in the field has no inverse?
Another way of looking at what I said above is: one of the requirements for a field is that there be a multiplicative inverse. A trivial field would have no actual instances of multiplicative inverses. So if you require a meaningful multiplicative inverse, then that in itself implies that you must have a non-trivial ring.

3. agnostic

Was it because rings have less applied value than groups or fields? I wouldn’t know, but I see plenty of books with titles like “Group theory in physics,” but never any about rings.

4. Anonymous

But the trivial field, where e = 1 = 0, has both multiplicative and additive inverses. e=-e, and e^(-1) = e. So that’s not where it falls down.

5. Coin

Anyonymous, #259 in John Baez’s “This Week’s Finds in Mathematical Physics is actually all about that particular subject, and it’s a really interesting read. Baez argues that the nontriviality axiom, the restriction that 1 != 0, is mostly there as a convenience– because there are these useful general theorems that apply only to “all fields other than the trivial one”, and so we simply exclude the trivial field from being a field at all, so we can shorten that to “all fields” and not go crazy always having to remember to mention the exception:

Unfortunately, allowing a field with 1 = 0 causes nothing but grief. For example, we can define vector spaces using any field (people say “over” any field), and there’s a nice theorem saying two vector spaces are isomorphic if and only if they have the same dimension. And normally, there’s one vector space of each dimension. But the last part isn’t true for a field with 1 = 0.

But Baez then goes on to argue that there are situations where we actually *would* want the trivial field to exist, and certain uses of fields only make sense if we allow the trivial field back in. For example Baez specifically talks about something called “q-deformation”, which I don’t understand but which has to do with quantum groups and apparently relates fields to vector spaces in a certain way. But if you drop the triviality axiom from the definition of a field, and consider what q-deformation would do to the trivial field, you find that the things q-deformation would normally tell you about vector spaces suddenly become meaningful statements about the relationship between the trivial field and sets.
Baez thinks these things are meaningful and useful enough that he winds up describing the trivial field as a mathematical “phantom“, something that we don’t want to exist but find ourselves constantly stumbling over anyway, kind of like how we maybe originally didn’t want to allow the square root of -1 to be a number but we gradually found ourselves needing to create extensions where we could use that concept anyway.

6. HWSOD

I am very confused by your explanation of how to multiply nimbers.
multiplication cant be distributive because:
2 * a = (1 + 1) * a = a + a = 0
but 2 * 3 = 1 =/= 0
?

7. Mark C. Chu-Carroll

HWSOD:
You’re getting caught by the fact that the Nimbers don’t behave as you expect them to.
In Nimbers, 1+1 doesn’t equal 2; it equals 0!

8. Antendren

I think the main reason for not letting 1=0 is that otherwise a lot of results in field theory would start with “Let F be a non-trivial field”. This way, they can just start with “Let F be a field”. Since no one cares about the 1=0 field, we’re not losing anything.

9. Xanthir, FCD

Nodnod. Afaik, it’s purely there to exclude the trivial field, because the trivial field is virtually never useful. In the very rare cases when you *do* want to include the trivial field, you can do so explicitly.
I don’t think I ever learned how nimber multiplication worked. Thanks for that, Mark! I’ll throw together an implementation after I run some errands.

10. HWSOD

Is there a way to compute 8 * 16 (as nimbers) using Fermat 2 powers?
It’s obviously equal to 4 * 32 or 2 * 64 but none of those are easily computible either.

11. Mark C. Chu-Carroll

HWSOD:
I don’t know that there’s an *easy* way. Here’s the process:
8 is 2*4; 16 is 2^2^2. So it’s 2*4*16 – which are all fermat two-powers, so it’s going to end up the same as the conventional product – 8*16=128.

12. Mark C. Chu-Carroll

WRT the trivial field stuff:
I was trying to make the point with my talk about structure. My way of understanding this stuff is to think of it in terms of the fact that we’re building structures with certain interesting properties.
The trivial field may match most of the field properties – but it’s not a structure with the properties that we’re trying to describe with a field. The field theorems generally don’t work on a trivial field because the trivial field doesn’t have the structure that we’re trying to study.
So we can define fields as not including trivial fields, and then say that field theorems work for all fields; or we can define the fields in a way that includes the trivial ones, and then state almost every theorem as “For all non-trivial fields, …”.

13. Xanthir, FCD

Mark: I’m assuming that nx1=n? That wasn’t stated explicitly by you, but it’s implicit in your example.
HWSOD:
8 is a product of fermat power, (4×2). 16 is a fermat power itself. The product of fermat powers is just the normal product of the numbers. Your problem is that you are considering it pairwise, and saying that 8 isn’t a fermat power. It *is* a product of fermat powers, so 8*16 also creates a product of fermat powers. Thus, the whole thing multiplies normally.
It turns out that multiplying a fermat power by *any* nimber is the same as the normal product. You can see this by noting that the second number in the product can be broken down into a sum of powers of 2 (which all sum like normal numbers), each of which can themselves be broken into a product of fermat powers. When you then distribute a single fermat power across this, all the numbers merely do a bitshift so that there are no collisions and the special rules of nim-addition don’t come into play.

14. Coin

Mark, could you check your spam trap? I made a post in this thread yesterday which got “held for moderation”. Thanks!

15. Brian McEnnis

In # 2, Mark wrote

If you allowed 1=0, so that you could have a trivial field, …

It’s not that you could have a trivial field, you will have a trivial field if 1=0:
For any n in the field n = n x 1 = n x 0 = 0. In other words, if 1 = 0 then any element in the field must be 0.
(Note: n x 0 = 0 follows trivially(!) from the field axioms.)
And Anonymous is correct in #4. In a trivial field (i.e. one with just a single element e), the answer to any question is e. What’s 0? Answer: e. What’s 1? Answer: e. What’s e + e? Answer: e. What’s e x e? Answer: e. What are the additive and multiplicative inverses of e? Answers: e and e.
Not a very interesting structure, so we block it, and it alone, by assuming 1 ≠ 0.

16. Davis

Was it because rings have less applied value than groups or fields? I wouldn’t know, but I see plenty of books with titles like “Group theory in physics,” but never any about rings.

Absolutely not. The reason you don’t see books on “Rings” or “Ring Theory” is that the fields employing them have different names: Commutative Algebra (and Non-Commutative Algebra) and Algebraic Geometry are two enormous, important fields where the study of rings is central.
How deeply rings are covered in an abstract algebra course probably depends most on the interests of the professor, and the time constraints for the class.

17. Anonymous

Mark: I understand the structure comment, but this particular axiom is a bit odd. To me it doesn’t seem to be enforcing structure, but rather the opposite — allowing (forcing, even) one element to be distinguished. It feels like saying groups aren’t really groupoids.
Thank you, Coin. That’s exactly what I was looking for: what sorts of things don’t hold for the trivial field. It’s not just that it’s an uninteresting case, as some posters have said, but that things have to work differently with it. The “not interesting” excuse feels to me like saying that “Oh, we won’t call abelian groups groups, because the commutativity makes them trivial.”

18. Xanthir, FCD

Man, nimber multiplication is *hard* to implement!
Nimber addition is basically trivial. It’s just doing a logical xor of the binary expansion of the numbers, and as it turns out Common Lisp already has a function that does *exactly* that! So nimber addition is defined thusly:
(apply ‘logxor nimbers))
You’re just renaming the logxor, essentially.
But nimber multiplication… whew. You define a couple of helper functions (for testing for fermat powers, generating fermat powers, and generating expansions of numbers in base fermat) which aren’t difficult, but then you hit a wall when you actually try to define nimber-mult. Or at least I did. I carved out all the obvious base cases, which went fine, but when I got to the recursive part, anything I did resulted in entire classes of nimbers falling into an infinite loop.
I think I’ve got it down now (it involves a lot more preprocessing of the nimber being multiplied before shooting it down the recursive tower), but I wasn’t able to finish implementing it last night. We’ll see how it goes!

19. Jonathan Vos Post

Being in command of multiplicative inverse can be, literally, a matter of life or death.
January 22, 2008
Vital Signs
In the Lab: Simple Math Errors Can Imperil Patients
By NICHOLAS BAKALAR
The New York Times
Doctors make the same arithmetic mistakes the rest of us make, but the consequences can be considerably more serious.
Researchers tested a group of 28 doctor volunteers using a high-tech patient simulator. The doctors were told that the patient was a 5-year-old with a potentially fatal allergic reaction to peanuts. This was said to be a medical emergency, and the proper treatment was 0.12 milligrams of epinephrine injected as quickly as possible.
Half the doctors were given a glass bottle of epinephrine labeled “1 milligram in 1 milliliter solution.” The other half had bottles labeled “1 milliliter of a 1:1000 solution” — exactly the same thing but expressed as a ratio instead of a concentration. In either case, the correct dosage would be 0.12 milliliters of the solution.
Eleven of the 14 in the concentration group, but only 2 in the ratio group, calculated the dose correctly. The concentration group needed an average of 35.5 seconds to make the injection, while the ratio group averaged more than two minutes. One doctor in the ratio group administered a full milligram of epinephrine, about eight times the correct amount.
“Converting from ratios to milligrams per milliliter leads to muddles between hundredths and thousandths,” said Dr. Daniel W. Wheeler, an anesthesiologist and a clinical lecturer at the University of Cambridge in England who was the lead author of the article, which appeared Jan. 1 in The Annals of Internal Medicine. “And errors tend to be by factors of 10 — large and potentially dangerous.”
Copyright 2008 The New York Times Company