Phil 455: Algebras


Earlier we introduced the notion of an operation, where all the function’s arguments came from a single domain, and that was also the function’s codomain. So a unary operation will map from some domain Α into Α, a binary operation will map from Α ⨯ Α → Α, and so on. For the special case of unary operations that were bijections, we called them permutations.

Now we’re going to talk about some kinds of mathematical structures where binary operations play a central defining role. Such an operation on a domain Α will be a total function from pairs of Αs into the codomain Α.

There are three aspects of this worth emphasizing: (i) an operation on Α must be a total function on Α ⨯ Α, that is, it must have a defined result for every pair of Αs. (ii) The operation must be a function, that is, there must be a single result for applying the operation to any pair of Αs. And (iii) the operation must be into Α, that is, its result for any pair of Αs must be another Α. Sometimes this is put by saying that the set Α is closed under the operation in question.

(Earlier, we only explicitly talked about closing sets under binary relations, which would correspond with unary operations, but I trust the extension to ternary relationsternary relations/binary operations will be intuitive.)

By saying the operation is into Α, I don’t exclude its being onto Α. It may or may not be.

I’ll use and and to stand for arbitrary operations. Instead of writing ★(x,y), as we did when using f as a symbol for functions, we’ll instead use “infix” notation and write x ★ y.

Note that x ★ y is the application of an operation, that is a certain kind of function, to two argument values. Its result will be some other value from the same domain. Contrast that to x ⊑ y which claims that some relation holds between x and y. This claim will be either true or false; we will not describe it as “having a result.”

In what follows we’re going to need to keep careful track of what domain of objects we’re working with at each moment. Though I’ve always said this was important, I was sometimes (deliberately) lax about it in homework problems. But we’ve got to start being more careful. One way to proceed would be to assume that whatever operation we’re working with has the relevant set “baked into it” as its codomain (and one-half of its domain). So then we could just talk about that operation, and the relevant set would always be recoverable from it. There’s nothing inherently wrong with going that way. However, things will be easier in some ways if we instead think of the operations as possibly being defined on larger domains than just the set we’re working with. For instance, suppose + is the familiar operation of addition, understood to be defined on all the natural numbers ℕ = {0, 1, 2, 3, 4, ...}. We might for some purposes want to work with not that set, but instead the set 𝔼 = {0, 2, 4, ...} of just the even natural numbers. We can take + to be an operation on this set too, because it is defined on every pair of 𝔼s, and the result is always itself a unique member of 𝔼s.

If in this way we permit operations on a set 𝔼 to also be defined over supersets of the domain we’re interested in (like ), we’ll need to keep more explicit track of which domain we’re working with at any moment.


Algebra is an umbrella term for a mathematical “package” including objects and operations with certain structures. Part of the package will be the domain of objects, which is often called the algebra’s “universe.” (Sometimes it’s called the algebra’s “underlying set.”) In some contexts mathemeticians allow in several universes, but we will stick to algebras with a single universe. Sometimes one or more members of the universe are designated as having special roles; we will see some examples of this shortly. The algebra will also come with one or more binary operations. Sometimes in generalized discussions mathematicians will work with functions that aren’t binary, or don’t count as operations, or will work with relations as well as or instead of what I’m calling operations. But we will stick to algebras where we’ve just got the universe, one or more operations on the universe. and zero or more objects from the universe playing special roles. Those roles will be defined in terms of the operations.

As shorthand, I will talk about the “elements of the algebra.” This means: objects that are members of the set that constitutes the algebra’s universe. Also, I will just say “operation” and leave it understood that we’re talking about binary operations on the algebra’s universe.

The simplest kind of algebra involves just the universe and a single operation on that set. Algebras of this kind are called magmas or groupoids; but this isn’t yet a very interesting kind of algebra, so I don’t expect you to remember its name. (Since all the algebras we’re talking about do involve a set and at least one operation on the set, they will be groupoids, but they will also have more interesting kinds of algebraic structure as well.)

More interesting kinds of algebras are defined by placing certain constraints on the relevant operation, perhaps positing the existence of some elements of the algebra that satisfy further constraints, perhaps positing additional operations that satisfy yet further constraints.

These constraints are presented in the form of equalities. For instance, we may want to talk about algebras ⟨Α, ★⟩ where for all elements x,y ∈ Α:

x ★ y = y ★ x

It’s conventional to leave the quantifiers off of these equations, but they are always to be understood as having all their free variables universally bound (restricted to whatever universe Α we’re working with).

Operations that satisfy the constraint just described (with respect to a set Α) are called commutative (wrt Α). (An operation might be commutative wrt some sets but fail to be commutative wrt other sets on which it’s defined.)

Later we’ll be talking about some algebras that do require their operations to be commutative. But I introduced this just as an example. For the time being, we don’t necessarily require this.


Sometimes when we’re working with a mathematical operation, we’ll want to talk about multiple applications of it in turn, and it can be cumbersome to explicitly parenthesize each of the applications to keep track of which turn they come in. So conventions develop that the operation is to be understood as “associating to the right” or as “associating to the left,” in the absence of explicit parentheses. For example, we understand exponentiation as associating to the right, that is:

234 = 2(34)

rather than equaling (23)4 (which would be the same as 23⋅4).

On the other hand, we understand subtraction as associating to the left, that is:

4 - 3 - 2 = (4 - 3) - 2

rather than equalling 4 - (3 - 2).

In some happy circumstances, though, we don’t need to make this choice, because whether you understood the operator as associating to the left, or to the right, you’d always get the same result. That is, some operators are such that (wrt certain sets), for every x,y,z in that set:

(x ★ y) ★ z = x ★ (y ★ z)

These operators are called associative (wrt the set in question). (An operation might be associative wrt some sets but fail to be associative wrt other sets on which it’s defined.) With such operators, it’s common to just omit the parentheses altogether and write: x ★ y ★ z.

Algebras ⟨Α, ★⟩ where the operation is associative wrt Α are called semigroups. This is a bit more interesting class of algebras than the class of all groupoids, but again it’s not yet too interesting, so I don’t expect you to remember its name. All of the algebras we go on to discuss will be more specialized versions of this: that is, they will all be algebras with associative operations.


Another term we can introduce at this point is idempotence. This term can be applied to unary functions and also to functions of higher arity, like binary operations. A unary function f is called idempotent when, for all x in f’s domain:

f(f(x)) = f(x)

That is, applying f multiple times is the same as applying f once. (But applying f once is allowed to make a difference.) For example, the absolute value function on the integers is idempotent.

A related but somewhat different idea is to count a binary operation as idempotent when the result of applying it to a pair of an argument and that same argument always returns that very argument. You proved in Homework Problem 12 that and are idempotent operations in this sense. Another example is the function max on the integers. This is idempotent, because for all z ∈ ℤ:

max(z,z) = z

If you have an algebra whose operation is associative (so it’s a semigroup) and also idempotent and commutative, it will count as a semilattice. You can call the operation either “meet” or “join.” If the operation also has an identity element (see below), then if you call the operation a meet, the identity element will be a top for the semilattice; and if you call the operation a join, the identity element will be a bottom for the semilattice. If the operation also has a zero element (see below), then if you call the operation a meet, the zero element will be a bottom for the semilattice; and if you call the operation a join, the zero element will be a top for the semilattice.


Monoids are an interesting class of algebras whose name and definition you should pay closer attention to. Monoids are semigroups with an identity element. We’ll explain what an identity element is momentarily. But let’s give a complete definition for monoids, rolling in the definition of simpler algebras like semigroups and groupoids that it’s a specialization of.

A monoid is defined as an algebra ⟨Α, ★⟩ where is an associative operation on Α, and where Α contains a special member such that for all x ∈ Α:

x ★ Ⓐ = x = Ⓐ ★ x

Note that it’s not required in general that x ★ y = y ★ x. It’s permitted but not required. But for the special element , x ★ Ⓐ always does equal Ⓐ ★ x, and these both equal just x itself. This special element is what we call the identity element of Α for .

In some contexts, mathematicians work with s that satisfy Ⓐ ★ x = x but not x = x ★ Ⓐ; these are called “left identities.” Analogously for “right identities.” But we are only concerned with objects that are identities both as left arguments to and as right arguments.

One paradigm example of a monoid is the algebra whose universe is the set of natural numbers and whose operation is +. The identity element for this operation is 0. Another example of a monoid is the algebra whose universe is the set of positive integers ℤ⁺ and whose operation is * (multiplication). The identity element for this operation is 1. Generally, when we’re talking about a monoid, we’ll explicitly list the identity element, like this: ⟨ℤ⁺, *, 1⟩.

Nothing in our definition of a monoid required its operation to be commutative. But for some monoids, their operation will be commutative. The two examples given in the previous paragraph are of that kind. You will explore more examples, including some whose operation is not commutative, in Homework 4.

Notice the difference in how we’re now talking about “identities”: in previous notes, we talked about identity functions and relations. Here it’s not the function or operation that’s the identity. Instead, it’s one of the operation’s arguments that is the identity. (Homework Problem 51 involves an interesting connection between these two kinds of “identities.”)

There is a general convention in mathematical discussions to symbolize monoid operations using + and 0 in the way I used and . That is, they’re not necessarily talking about addition and the number zero, but they use those symbols to talk about whatever associative operation they’re talking about, and its identity. There is another general convention to use multiplicative symbols instead of additive ones: that is, to use * and 1 in the way I used and . Again, they’re not necessarily talking about multiplication and the number one, but they use those symbols to talk about whatever associative operation they’re talking about, and its identity. Or instead of x*y they might just concatenate the variables x and y, in the same way we often use concatenation to express multiplication.

I won’t adopt those conventions myself, but you need to be aware of them because you may encounter them.

I think it’s especially annoying that concatenation is sometimes used to express genuine multiplication, sometimes used to express string concatenation (which I’ll symbolize with ), sometimes used to express function composition (our ), and sometimes used to express other associative operations. And sometimes used to express not function composition but function application. So you might see g f (x,y) where that means to take g ∘ f (rather than g(f), if that’s even defined), and to apply (rather than compose) the resulting function to the pair (x,y). Usually you can figure out from context what the authors mean. But it can be a non-trivial exercise.

Can a monoid have several distinct identities? Well, let’s suppose that and are an arbitrary pair of identity elements for a monoid ⟨Α, ★⟩. Then by the definition of an identity element, we have that for all x ∈ Α:

  1. Ⓐ ★ x = x = x ★ Ⓐ
  2. Ⓤ ★ x = x = x ★ Ⓤ

Now consider Ⓐ ★ Ⓤ. By virtue of the lhs (“left-hand side”) of (i), we know that this = Ⓤ. But by virtue of the rhs of (ii), we know that it = Ⓐ. Hence we’ve proved that Ⓐ = Ⓤ. So identity elements for a given operation and universe, when they exist, will be unique.

Another kind of special element an algebra might have will be an element satisfying the constraint that for every element x:

Ⓩ ★ x = Ⓩ = x ★ Ⓩ

When such an element exists, it’s called a zero of the algebra (wrt the operation ). Note that 0 is not a zero of the monoid ⟨ℕ, +, 0⟩, though it is an identity.

The algebra whose universe is the powerset of some set Β, and whose operation is , has the set Β as an identity element, and the set as a zero.


Suppose we have a monoid ⟨Α, ★, Ⓐ⟩ — I’m listing the monoid’s identity element (wrt ) explicitly, because of its special role. Given an element a ∈ Α, we say that another element b ∈ Α is an inverse of a (wrt the operation ) iff:

b ★ a = Ⓐ = a ★ b

When such a b exists, and stands in this relation to a, and no other element of Α also stands in that relation to a, b is sometimes written as -a and other times as a⁻¹. I will adopt a third convention: I will write it as . You can use any of these conventions you like.

Note that the question of an inverse can be raised for each element of the algebra. The identity element, on the other hand, will be unique for the whole algebra (if it exists).

Perhaps you’ve noticed that the identities of a monoid count as their own inverses (wrt the relevant operation — I won’t keep saying this when it’s clear from context). One question we might ask is whether any other elements of a monoid can be their own inverse. And the answer is yes, sometimes this is true for other elements as well. But in general when elements have inverses, they cannot be relied on to be the very same object.

When we have a monoid where every element in its universe has an inverse, that monoid is called a group.

Here are some facts about groups, that can be proven from the things we’ve already said:

I’ll illustrate how to prove the first of the above claims. Suppose that b and c are two arbitrary inverses of a. Then consider the equation:

(b ★ a) ★ c = b ★ (a ★ c)

We know this to be true because the group’s operation has to be associative. But then since b is an inverse of a, the parenthesized expression on the lhs has to equal the group’s identity element . Similarly, since c is an inverse of a, the parenthesized expression on the rhs also has to equal . So we get:

(Ⓐ) ★ c = b ★ (Ⓐ)

But then since is an identity for the operation , this implies:

c = b.

So the “two” inverses b and c cannot be distinct after all.

You should try to prove the other claims for yourself; none of the proofs is difficult. But I won’t make these explicit homework problems. The last of the claims is proved on p. 261 of the Partee reading.

As with monoids, nothing in our definition of a group requires its operation to be commutative. But for some monoids, their operation will be commutative. These are known as commutative or Abelian groups.

The algebra ⟨ℕ, +, 0⟩ isn’t a group, because most of its members don’t have inverses. But the algebra ⟨ℤ, +, 0⟩ is a group — more specifically, a commutative group. Another commutative group is ⟨ℚ⁺, *, 1⟩, where ℚ⁺ is the set of positive rational numbers. (We have to exclude 0, because it would interfere with 1’s ability to be an identity.)

Consider the algebra whose universe set is the natural numbers less than 6: {0,1,2,3,4,5}, and whose operation is addition mod 6. (4+1=5 (mod 6), 4+2=0 (mod 6), 4+3=1 (mod 6), ...) We’ll help ourselves to the observations that this operation is associative and commutative, and has 0 as an identity. A little more inspection will persuade us that every element of this algebra has an inverse: 0 is its own inverse (as identities always are), 1 and 5 are inverses of each other, 2 and 4 are inverses of each other, and 3 is its own inverse. So this algebra is a commutative group. It’s called the group ℤ₆. (Similarly for n for other numbers n.)


Groups are a very interesting kind of algebraic structure. You can find lots of math books and courses on “group theory”; I don’t think you can find any on “monoid theory.” Though a number of notions that are especially interesting for philosophers are monoids. (Also, a generalization of monoids called “monads” — no relation to Leibinz — have come to play a central role in recent computer science, linguistics, and philosophy of language.)

There are many more interesting algebraic structures. An algebra textbook I’m looking at estimates that there are more than 200 ones that have been seriously studied. We are obviously not going to attempt to familiarize ourselves with all that.

However, there is another more complex algebra that it will help to take a brief look at. This is the notion of a ring.

Like monoids and groups, rings have a universe set. But they have two operations, instead of a single one. Each of the operations has to satisfy certain constraints, and they also have to interact with each other in a specific way. There is some variation in how much is built into the definition of a ring, but we will use this definition:

A ring is defined as an algebra ⟨Α, ⊙, ★, ⓪⟩ where: (i) is an associative operation on Α; (ii) is an associative operation on Α with identity ; (iii) every element x ∈ Α has an -inverse ; (iv) is commutative; and (v) for all x,y,z ∈ Α:

x ⊙ (y ★ z) = (x ⊙ y) ★ (x ⊙ z)

(y ★ z) ⊙ x = (y ⊙ x) ★ (z ⊙ x)

Constraints (ii)–(iv) tell us that we have a commutative group wrt , and (v) tells us how the two operators interact: it’s summarized by saying that distributes over .

It can be proven that in any ring, the -identity will be a “zero” wrt the operation, in the sense we defined before, namely that for every element x:

⓪ ⊙ x = ⓪ = x ⊙ ⓪

This is what justifies calling it “”. This need not be the same thing as the number 0, though of course in some salient examples it will be.

The most familiar example of a ring is the algebra ⟨ℤ, *, +, 0⟩, where the universe is the set of integers, the operator required to distribute is multiplication, and the operator required to commute is addition with identity 0. However, it can be misleading to take that as a paradigm of a ring, since that particular algebra also has other special properties that other rings don’t share. For instance, multiplication is also commutative, but the definition of a ring does not require this. Also, multiplication itself has an identity in that algebra (the number 1), but again our definition of a ring does not require that. Rings with those further properties form interesting more specific algebras.

A Boolean ring is a ring where the operation is idempotent. That is, for all x in the algebra’s universe, x ⊙ x = x. It’s demonstrable that in any such ring, every element is its own -inverse. (See if you can prove this.)

Boolean rings are intertranslatable with what are called “Boolean algebras”; though the latter are introduced using lattice-based notions.

Another thing that can be proven about rings is that, when has an identity , it is equal to the -identity iff every element in the algebra’s universe is equal to the -identity. Rings with only such a small universe are called “trivial.”

In rings which have an identity for (a ), sometimes elements in the universe have -inverses. There are only two of these in the ring ⟨ℤ, *, +, 0⟩ (namely, 1 and -1), but there are many more in the ring ⟨ℚ, *, +, 0⟩. The never has an -inverse unless the ring is trivial, and it’s the only element. But some interesting rings have -inverses for every element other than their . When these rings also have commutative , they are called fields. The ring I just mentioned, whose universe is , is a field. There are also some fields with only finitely many elements.

We earlier listed ℤ₆, and more generally n as an example of a group. It is also an example of a ring, where the operation is multiplication mod n. The specific cases of this where n is not just a number but more specifically a prime number, turn out to be fields.

An integral domain is a kind of algebra in between rings and fields. (That is, every field is an integral domain, and every integral domain is a ring, but neither of the converse entailments hold.) This class of algebras is interesting because it comes closer to distinguishing the specific structure of the integers. It doesn’t yet quite capture just the integers: some interestingly different structures also count as integral domains. But when we add some extra constraints about how it’s possible to “order” the elements of an integral domain, then it turns out that only the integers satisfy these conditions. — Or more precisely, that any algebra that satisfies the condition is “isomorphic to” the integers. We will explain what “isomorphic” means in our next meeting.

Some more detailed comments about integral domains can be found on a separate web page.