Chapter 7 begins with a change in viewpoint.
Set theory lets us compare sets by functions, relations, and cardinalities. But many mathematical objects are not interesting merely because of which elements they contain. They are interesting because the set carries extra structure.
For example, from the point of view of bare cardinality, the set {5, dog} and
the set both have two elements. But also supports familiar
operations such as addition and multiplication modulo , while 5 + dog is
not meaningful unless extra structure has been specified.
The point of this chapter is to make that extra structure explicit.
Sets with structure
Many mathematical objects can be read as sets with additional data: natural numbers with addition and multiplication, the plane with vector addition, and permutations with composition.
The common pattern is:
- start with a set;
- specify some operation, relation, function, or distinguished element on that set;
- state axioms that this extra data must satisfy;
- prove theorems from those axioms.
This is one of the central habits of modern mathematics. Instead of proving the same fact separately for many examples, define a structure once and prove what all examples of that structure must satisfy.
Binary operations
Definition
Binary operation
Let be a set. A binary operation on is a function
For , we usually write instead of .
There are two important parts to this definition.
First, the operation takes two inputs from . Second, the output must again belong to . That second requirement is often called closure, although in this course it is already built into the function type .
Common mistake
A formula is not automatically a binary operation on every set
Subtraction is a binary operation on , because whenever . But subtraction is not a binary operation on if is required to stay closed under the operation, because is not a natural number.
Boolean integers
Define
On this set, addition is given by
and multiplication is given by
Definition
Boolean integers
The Boolean integers are the triple
where and , are the two binary operations displayed above.
The main point is not the name. The point is that a small set can carry nontrivial structure once operations are specified.
Worked example
Solving in
A useful exercise is to prove
Check the two possible values of .
If , choose , since .
If , choose , since .
Thus every element of has an additive inverse with respect to this addition rule.
More examples of binary operations
The familiar examples are:
- and are binary operations on ;
- and are binary operations on ;
- for any set , composition is a binary operation on the set of all functions .
The last example is worth reading carefully. If and , then
So composition combines two elements of and returns another element of .
Worked example
Composition as a binary operation
Let . An element of is a function from to itself.
If , then is again a function from to itself. Hence composition defines
The elements being combined are functions, not elements of .
Monoids
The first structure studied in Chapter 7 is a monoid.
Definition
Monoid
A monoid is a set together with a binary operation
such that:
-
for all ,
(associativity);
-
there exists such that for all ,
(existence of an identity element).
Associativity tells us that parentheses do not matter when multiplying three elements in a row. The identity element tells us that there is an element that does nothing when combined on either side.
The standard examples are:
- is a monoid with identity ;
- is a monoid with identity ;
- is a monoid with identity ;
- is a monoid with identity ;
- for any set , under composition is a monoid with identity ;
- is a monoid;
- is a monoid.
Worked example
Checking that is a monoid
The operation is a binary operation on .
Associativity holds:
for all natural numbers .
The identity is , because
Therefore is a monoid.
Worked example
Checking the composition monoid
Let be any set. The elements of are functions .
Composition is associative:
The identity function satisfies
Therefore under composition is a monoid.
Non-examples of monoids
It is just as important to see operations that fail the definition.
Worked example
is not a monoid
If denotes the positive integers, then addition is closed and associative. But there is no identity element inside .
The additive identity would have to be , because . But . So is not a monoid.
Worked example
is not a monoid
Subtraction is a binary operation on , but it is not associative. For example,
while
Since these are not equal, associativity fails. Therefore is not a monoid.
Common mistake
Having an identity is not enough
An operation can have a plausible identity and still fail to be a monoid if it is not associative. Associativity and identity are separate requirements.
The identity element is unique
Theorem
Uniqueness of identity
A monoid has exactly one identity element.
Proof
Suppose and are both identity elements. Since is an identity,
Since is an identity,
Therefore
so the identity element is unique.
The proof is short because the identity law works on both sides. Each identity must leave the other one unchanged, forcing them to be equal.
Groups
Monoids are useful but weak. A group adds the requirement that every element can be undone.
Definition
Group
A group is a set equipped with an element and a binary operation
such that:
-
for all ,
-
for all ,
-
for every , there exists an inverse element satisfying
Groups are a natural way to formalize symmetry. A symmetry operation should be composable, have a do-nothing operation, and be reversible.
Under this standard reading, every group is a monoid after forgetting the inverse axiom. What makes a group stronger is not a different identity or a different associativity law, but the existence of inverses.
Common mistake
A group is not just any set with a binary operation
The operation must be associative, there must be a two-sided identity, and every element must have an inverse. If any one of these fails, the structure is not a group.
Examples of groups
The basic examples are:
- ;
- ;
- , where denotes the positive rationals.
Worked example
Why is a group
The identity element is .
For every integer , the inverse is , since
Addition is associative, so is a group.
Worked example
Why is a group
The identity element is .
For every positive rational , the inverse is , which is again a positive rational. Then
Multiplication is associative, so is a group.
Common mistake
is a monoid but not a group
The identity for multiplication on is , and multiplication is associative. But most integers do not have multiplicative inverses in . For example, there is no integer such that .
Uniqueness of inverses
Theorem
Uniqueness of inverses
For each , the inverse is unique.
Proof
Suppose and are both inverses of . Then
and
Using the identity and associativity,
So .
The proof shows why inverse notation is legitimate. If an inverse exists, there is only one such element, so writing is unambiguous.
Socks-shoes property
The inverse-of-a-product rule is often called the socks-shoes property: to undo two operations, undo the second one first.
Theorem
Socks-shoes property
For elements in a group,
Proof
Compute:
By uniqueness of inverses, the inverse of must be .
The order reversal is essential. In a non-commutative group, need not undo .
Cancellation laws
Theorem
Cancellation laws
In a group:
- if , then ;
- if , then .
Left cancellation
Assume
Multiply on the left by :
By associativity,
Since , this becomes
and hence .
The proof of right cancellation is analogous, multiplying on the right by .
One-sided inverses and noncommutativity
The group axioms require a two-sided inverse, but in a finite-dimensional setting one-sided identities can be decisive. For functions, a left inverse gives injectivity and a right inverse gives surjectivity; both are needed for a genuine inverse function. In an arbitrary monoid, one-sided inverses need not automatically coincide, so the side on which an equation is multiplied must be recorded.
Theorem
Two opposite-sided equations identify the inverse
If in a monoid, then ; no separate two-sided-inverse assumption is needed because the displayed equations already provide the needed sides. The proof is . In a group every element therefore has one well-defined inverse, and both left and right cancellation follow by multiplying on the corresponding side.
Theorem
Right inverses everywhere force a group
Let be a monoid. If every has a right inverse, choose with and . Then
so . Thus each right inverse is also a left inverse, and is a group. The opposite-sided identity is derived from associativity.
Worked example
The group is noncommutative
is the set of real matrices with nonzero determinant, under matrix multiplication. Let
Both determinants equal , so both matrices lie in . But
which are different. Thus associativity does not imply commutativity. The identity is the identity matrix, and each matrix has its usual inverse, so the group axioms still hold.
Common mistake
Boolean multiplication is not a group
The Boolean multiplication monoid has identity , but has no inverse: for both possible , never . Therefore is not a group.
Homomorphisms and isomorphisms
Definition
Group homomorphism
For groups and , a function is a homomorphism if
for all . It preserves the operation, but it need not be injective or surjective.
Theorem
Homomorphisms preserve identity and inverses
If is a homomorphism, then and .
Proof
Since , multiply by the inverse of in to obtain . Also, , and the same calculation in the opposite order gives the other side. Uniqueness of inverses in proves the claim.
Definition
Isomorphism
An isomorphism is a bijective group homomorphism. If one exists, write ; the groups have the same operation structure after relabelling.
Symmetric groups and
For a finite set , is the group of bijections under composition. Let act on . Its elements are the identity and the transposition , with .
Worked example
The composition table for
Define by and . The table shows . It is bijective, hence .
For a group and elements , define if there exists such that . This is conjugacy. Reflexivity follows from . If , then , proving symmetry. If also , then , proving transitivity. Thus conjugacy is an equivalence relation on .
The dihedral group
Label the square's vertices by , , , and . Let be the quarter-turn and let be reflection in the diagonal . We compose permutations rightmost first. The eight symmetries are
The action on makes the geometric description explicit:
| symmetry | image tuple |
|---|---|
Here , , and the geometric reflection relation is . These relations describe every product after moving a power of to the left and using .
Worked example
Conjugacy classes in
Conjugating a rotation by sends to , so and form one class. The element is fixed by both rotations and reflections, so it forms its own class. Conjugating reflections by powers of gives two families, according to parity of the exponent:
For example, and , while conjugation by reverses the rotation exponent. Conjugation by each generator and preserves each displayed set. Since every group element is a product of these generators, no conjugation can move an element into a different displayed set. The calculations above also connect the two members of each two-element set. Thus these sets are exactly the conjugacy classes.
Two homomorphisms involving and
There is an inclusion obtained by letting a permutation of fix : and . Composition is unchanged, so is a homomorphism.
For the reverse direction, put and in . Direct composition gives and . The six distinct permutations are : the last three are respectively . Thus each element has a unique form with and . From ,
where powers of are reduced modulo three and powers of modulo two. Define in . The formula shows that the exponent of adds modulo two, exactly as the exponent of does. Hence . This is the parity homomorphism; the elements mapped to the identity are precisely , often denoted .
Check laws interactively
The checker below is a support tool for the definitions: use it to test closure, associativity, identity, and inverse behavior for small operation tables. The mathematics remains the axioms above.

Figure. The distinction between monoid and group is not a naming convention: it is controlled by identity and inverse laws in addition to associativity.
Read and try
Check monoid and group laws
This comparison tests binary operations against the exact laws needed for monoids and groups.
This is a group.
Associative
Yes
(a+b)+c = a+(b+c).
Identity
Yes
0 is the identity.
Inverse
Yes
The inverse of a is -a.
Quick checks
Checkpoint
What must be true for a rule to be a binary operation on a set ?
State the input and output requirement.
Solution · Answer
It must be a function . Thus it takes two elements of as input and returns an element of .
Checkpoint
Why is not a monoid?
Name the failed axiom and give a concrete calculation.
Solution · Answer
Subtraction is not associative. For instance,
but
Since the two results differ, is not a monoid.
Checkpoint
Why is not a group?
Focus on inverses.
Solution · Answer
Although multiplication on is associative and has identity , not every integer has a multiplicative inverse in . For example, no integer satisfies .
Checkpoint
What is the inverse of in a group?
Pay attention to the order.
Solution · Answer
The inverse is
The order reverses.
Exercises
Exercise 1
Show directly that is a monoid using the Boolean addition rule above.
Solution · Hint
Check associativity and identify the identity.
Solution · Guided solution
The identity is , since , , , and therefore for both .
Associativity can be checked by the finite cases . Boolean addition is addition modulo , so both and record the parity of the number of s among . Hence they agree.
Exercise 2
A binary operation on X has a left identity e and a right identity f. Prove that e=f and that this common element is a two-sided identity. Is associativity needed?
Solution · Hint
Evaluate e*f using each identity property separately.
Solution · Model solution
Because e is a left identity, . Because f is a right identity, . Hence . The common element inherits both identity properties. Associativity is not used: the argument evaluates one product, without regrouping.
Exercise 3
Let a be an element of a monoid with a left inverse h, so . Prove that implies . Explain why a right inverse is not needed.
Solution · Hint
Multiply both sides on the left by h, keeping the order fixed.
Solution · Model solution
From , left multiplication by h and associativity give . Since , this reduces to , hence . Only the equation is used; no equation for is needed.
Related notes
Read this after 2.2 Functions and relations and 6.4-6.7 Intervals, Cantor set, density, and well-ordering. It also uses proof habits from 1.2 Quantifiers and negation and 3.4 Rationals and well-defined operations.