The Central Idea

Algebraic structures are classified by the laws their operations satisfy.

Three of the first properties we examine are:

These properties are independent. An operation may satisfy all three, some of them, or only one of them.

Start with the Set and the Operation

A structural question is never about a symbol alone.

We must specify both:

\[ \boxed{(S,\star)}. \]

The same operation can behave differently on different sets.

For example, subtraction is closed on the integers,

\[ \mathbb{Z}, \]

but not on the nonnegative integers,

\[ \mathbb{Z}_{\ge0}. \]

Therefore every property must be interpreted relative to the structure being studied.

Closure

A set \(S\) is closed under an operation \(\star\) if combining any two elements of \(S\) produces another element of \(S\).

Symbolically,

\[ \boxed{ a,b\in S \quad\Longrightarrow\quad a\star b\in S }. \]

Closure asks whether the operation keeps us inside the set.

Closure and the Definition of a Binary Operation

In the previous lesson, a binary operation on \(S\) was defined as a function

\[ \star:S\times S\to S. \]

Under that formal definition, closure is already built in: the codomain is \(S\).

In practice, however, we often begin with a familiar or proposed rule and ask whether \(S\) is closed under it.

If closure fails, then the proposed rule is not an internal binary operation on \(S\).

Example: Integers Are Closed Under Addition

Let

\[ a,b\in\mathbb{Z}. \]

The sum of two integers is always an integer:

\[ a+b\in\mathbb{Z}. \]

For example,

\[ -8+13=5, \] \[ 7+(-19)=-12. \]

Therefore,

\[ \boxed{\mathbb{Z}\text{ is closed under addition}}. \]

Example: Nonnegative Integers Are Not Closed Under Subtraction

Consider

\[ \mathbb{Z}_{\ge0}=\{0,1,2,3,\ldots\}. \]

Although many subtractions remain in the set, closure requires every permitted pair to work.

For example,

\[ 3-8=-5. \]

Since

\[ -5\notin\mathbb{Z}_{\ge0}, \]

we conclude

\[ \boxed{\mathbb{Z}_{\ge0}\text{ is not closed under subtraction}}. \]

One Counterexample Is Enough to Disprove Closure

Closure is a universal claim:

\[ \text{for every }a,b\in S,\quad a\star b\in S. \]

To disprove a universal claim, we need only one counterexample.

If we can find

\[ a,b\in S \]

such that

\[ a\star b\notin S, \]

closure fails.

Examples of Closure

Several familiar number systems are closed under familiar operations.

Division requires more care because division by zero is undefined.

Closure Can Depend on the Chosen Subset

Let \(E\) be the set of even integers.

If

\[ a=2m,\qquad b=2n, \]

then

\[ a+b=2m+2n=2(m+n), \]

which is even.

Therefore \(E\) is closed under addition.

It is also closed under multiplication because

\[ (2m)(2n)=4mn=2(2mn). \]

This type of reasoning will later help us identify substructures.

Odd Integers Give a Useful Contrast

Let \(O\) be the set of odd integers.

If

\[ a=2m+1,\qquad b=2n+1, \]

then

\[ a+b = 2m+2n+2 = 2(m+n+1), \]

which is even.

Therefore the odd integers are not closed under addition.

But they are closed under multiplication:

\[ (2m+1)(2n+1) = 2(2mn+m+n)+1, \]

which is odd.

Associativity

An operation \(\star\) on \(S\) is associative if

\[ \boxed{ (a\star b)\star c = a\star(b\star c) } \]

for all

\[ a,b,c\in S. \]

Associativity says that when the order of the elements stays fixed, changing the grouping does not change the result.

Associativity Is About Grouping

Compare

\[ (a\star b)\star c \]

with

\[ a\star(b\star c). \]

The elements still appear in the same order:

\[ a,\ b,\ c. \]

Only the parentheses have moved.

This distinction is important because associativity is often confused with commutativity.

Example: Addition Is Associative

For real numbers,

\[ (a+b)+c=a+(b+c). \]

For example,

\[ (2+5)+9 = 7+9 = 16, \]

while

\[ 2+(5+9) = 2+14 = 16. \]

Therefore addition is associative.

Example: Multiplication Is Associative

Ordinary multiplication satisfies

\[ (ab)c=a(bc). \]

For example,

\[ (2\cdot3)\cdot4 = 6\cdot4 = 24, \]

and

\[ 2\cdot(3\cdot4) = 2\cdot12 = 24. \]

Thus multiplication is associative.

Example: Subtraction Is Not Associative

Consider

\[ (10-6)-2. \]

Evaluating from the parentheses,

\[ (10-6)-2 = 4-2 = 2. \]

But

\[ 10-(6-2) = 10-4 = 6. \]

Since

\[ 2\ne6, \]

subtraction is not associative.

Example: Division Is Not Associative

Consider nonzero real numbers.

We have

\[ (24\div6)\div2 = 4\div2 = 2, \]

while

\[ 24\div(6\div2) = 24\div3 = 8. \]

Therefore division is not associative.

Why Associativity Matters

If an operation is associative, long expressions can be regrouped without ambiguity.

For example, because addition is associative,

\[ a+b+c+d \]

can be interpreted as

\[ ((a+b)+c)+d, \] \[ (a+b)+(c+d), \]

or any other grouping that preserves the order.

Associativity is what allows us to omit many parentheses safely.

Associativity Does Not Permit Reordering

Associativity allows

\[ (a\star b)\star c \longleftrightarrow a\star(b\star c). \]

It does not automatically allow

\[ a\star b \longleftrightarrow b\star a. \]

Reordering is a different property: commutativity.

Commutativity

An operation \(\star\) on \(S\) is commutative if

\[ \boxed{ a\star b=b\star a } \]

for all

\[ a,b\in S. \]

Commutativity says that reversing the order of two inputs does not change the result.

Example: Addition Is Commutative

Ordinary addition satisfies

\[ a+b=b+a. \]

For example,

\[ 4+11=15 \]

and

\[ 11+4=15. \]

Therefore addition is commutative.

Example: Multiplication Is Commutative

For ordinary real-number multiplication,

\[ ab=ba. \]

For example,

\[ 3\cdot7=21 \]

and

\[ 7\cdot3=21. \]

Thus multiplication of real numbers is commutative.

Example: Subtraction Is Not Commutative

We have

\[ 8-3=5, \]

but

\[ 3-8=-5. \]

Since

\[ 5\ne-5, \]

subtraction is not commutative.

Example: Division Is Not Commutative

For nonzero real numbers,

\[ 12\div3=4, \]

while

\[ 3\div12=\frac14. \]

Therefore division is not commutative.

Commutativity Is About Order, Not Parentheses

Compare the two laws:

\[ \boxed{a\star b=b\star a} \]

is commutativity, while

\[ \boxed{(a\star b)\star c=a\star(b\star c)} \]

is associativity.

Commutativity changes the order of elements. Associativity changes only their grouping.

An Operation Can Be Associative but Not Commutative

Function composition provides an important example.

Composition satisfies

\[ (f\circ g)\circ h = f\circ(g\circ h), \]

so it is associative whenever the compositions involved are defined within the function set under consideration.

But in general,

\[ f\circ g\ne g\circ f. \]

Thus associativity does not imply commutativity.

Example: Function Composition Is Usually Not Commutative

Let

\[ f(x)=x+1 \]

and

\[ g(x)=2x. \]

Then

\[ (f\circ g)(x) = f(2x) = 2x+1. \]

But

\[ (g\circ f)(x) = g(x+1) = 2x+2. \]

Therefore,

\[ \boxed{f\circ g\ne g\circ f}. \]

Matrix Multiplication Gives the Same Contrast

For square matrices of the same size, matrix multiplication is closed and associative.

In general,

\[ (AB)C=A(BC), \]

but

\[ AB\ne BA. \]

Thus matrix multiplication is another important operation that is associative but generally not commutative.

Set Union Is Associative and Commutative

Let \(A\), \(B\), and \(C\) be subsets of a universe \(U\).

Union satisfies

\[ (A\cup B)\cup C = A\cup(B\cup C), \]

so it is associative.

It also satisfies

\[ A\cup B=B\cup A, \]

so it is commutative.

Since the union of two subsets of \(U\) is again a subset of \(U\), \(\mathcal{P}(U)\) is closed under union.

Set Intersection Is Also Associative and Commutative

Intersection satisfies

\[ (A\cap B)\cap C = A\cap(B\cap C) \]

and

\[ A\cap B=B\cap A. \]

Therefore intersection is both associative and commutative on \(\mathcal{P}(U)\).

A Custom Operation: First Check Closure

On \(\mathbb{Z}\), define

\[ a\star b=a+b+1. \]

If \(a,b\in\mathbb{Z}\), then

\[ a+b+1\in\mathbb{Z}. \]

Therefore the integers are closed under \(\star\).

Testing the Custom Operation for Commutativity

Using

\[ a\star b=a+b+1, \]

compute

\[ a\star b=a+b+1 \]

and

\[ b\star a=b+a+1. \]

Since ordinary addition is commutative,

\[ a+b+1=b+a+1. \]

Therefore,

\[ \boxed{a\star b=b\star a}. \]

The operation is commutative.

Testing the Custom Operation for Associativity

Again let

\[ a\star b=a+b+1. \]

First compute

\[ (a\star b)\star c. \]

Since

\[ a\star b=a+b+1, \]

we get

\[ (a\star b)\star c = (a+b+1)+c+1 = a+b+c+2. \]

Now compute

\[ a\star(b\star c). \]

Since

\[ b\star c=b+c+1, \]

we obtain

\[ a\star(b\star c) = a+(b+c+1)+1 = a+b+c+2. \]

Therefore,

\[ \boxed{(a\star b)\star c=a\star(b\star c)}. \]

The operation is associative.

A Custom Operation That Is Not Commutative

On \(\mathbb{R}\), define

\[ a\diamond b=a+2b. \]

Then

\[ a\diamond b=a+2b, \]

while

\[ b\diamond a=b+2a. \]

These are not equal for all real numbers.

For example,

\[ 1\diamond3=7, \]

but

\[ 3\diamond1=5. \]

Therefore \(\diamond\) is not commutative.

The Same Custom Operation Is Not Associative

Continue with

\[ a\diamond b=a+2b. \]

Then

\[ (a\diamond b)\diamond c = (a+2b)+2c = a+2b+2c. \]

But

\[ a\diamond(b\diamond c) = a+2(b+2c) = a+2b+4c. \]

These expressions are not equal for all \(a,b,c\).

Therefore \(\diamond\) is not associative.

How to Prove Commutativity

To prove that \(\star\) is commutative on \(S\):

  1. Let \(a,b\in S\) be arbitrary.
  2. Compute or simplify \(a\star b\).
  3. Compute or simplify \(b\star a\).
  4. Show that the two expressions are equal.

Because \(a\) and \(b\) were arbitrary, the conclusion then holds for all elements of the set.

How to Disprove Commutativity

To show that an operation is not commutative, one counterexample is enough.

Find \(a,b\in S\) such that

\[ a\star b\ne b\star a. \]

For subtraction, \(a=8\) and \(b=3\) already provide such a counterexample.

How to Prove Associativity

To prove associativity:

  1. Let \(a,b,c\in S\) be arbitrary.
  2. Compute \((a\star b)\star c\).
  3. Compute \(a\star(b\star c)\).
  4. Show that the two expressions are equal.

Associativity usually requires more algebra than commutativity because three arbitrary inputs are involved.

How to Disprove Associativity

To disprove associativity, find one triple \(a,b,c\in S\) for which

\[ (a\star b)\star c \ne a\star(b\star c). \]

For subtraction, the triple

\[ 10,\ 6,\ 2 \]

works.

Testing Commutativity in an Operation Table

For a finite operation table, commutativity has a convenient visual test.

If

\[ a\star b=b\star a, \]

then the entry in row \(a\), column \(b\) must match the entry in row \(b\), column \(a\).

Therefore a commutative operation table is symmetric across its main diagonal.

Example: A Commutative Operation Table

Let \(S=\{0,1,2\}\) with addition modulo \(3\):

\(\oplus\) \(0\) \(1\) \(2\)
\(0\) \(0\) \(1\) \(2\)
\(1\) \(1\) \(2\) \(0\)
\(2\) \(2\) \(0\) \(1\)

The table is symmetric across the main diagonal, reflecting

\[ a\oplus b=b\oplus a. \]

Closure in an Operation Table

If a table is intended to define a binary operation on a finite set \(S\), every entry must belong to \(S\).

If the table for

\[ S=\{a,b,c\} \]

contains an output \(d\notin S\), then closure fails.

In that case the table does not describe an internal binary operation on \(S\).

Associativity Is Harder to See in a Table

Commutativity can often be seen from symmetry, but associativity requires checking triples.

For each

\[ a,b,c\in S, \]

one must compare

\[ (a\star b)\star c \]

with

\[ a\star(b\star c). \]

For a finite set, an operation table makes these calculations possible, but there is no equally simple diagonal-symmetry test for associativity.

Closure Does Not Imply Associativity

Subtraction on \(\mathbb{Z}\) is closed:

\[ a,b\in\mathbb{Z} \quad\Longrightarrow\quad a-b\in\mathbb{Z}. \]

But subtraction is not associative.

Therefore closure does not imply associativity.

Closure Does Not Imply Commutativity

Subtraction on \(\mathbb{Z}\) is again a useful example.

It is closed, but

\[ a-b\ne b-a \]

in general.

Therefore closure does not imply commutativity.

Associativity Does Not Imply Commutativity

Function composition and matrix multiplication are both standard counterexamples.

Each is associative in its appropriate setting, but neither is generally commutative.

Thus

\[ \text{associative} \]

does not mean

\[ \text{commutative}. \]

Commutativity Does Not Automatically Give Associativity

The two properties are logically independent.

For example, on \(\mathbb{R}\), define

\[ a\star b=\frac{a+b}{2}. \]

Since

\[ \frac{a+b}{2} = \frac{b+a}{2}, \]

the operation is commutative.

But

\[ (a\star b)\star c = \frac{a+b+2c}{4}, \]

while

\[ a\star(b\star c) = \frac{2a+b+c}{4}. \]

These are not equal for all \(a,b,c\), so the operation is not associative.

Example: Average Is Commutative but Not Associative

Using

\[ a\star b=\frac{a+b}{2}, \]

take

\[ a=0,\qquad b=0,\qquad c=8. \]

Then

\[ (0\star0)\star8 = 0\star8 = 4. \]

But

\[ 0\star(0\star8) = 0\star4 = 2. \]

Thus

\[ 4\ne2. \]

This provides a concrete counterexample to associativity.

A Three-Property Checklist

Given a set \(S\) and a proposed operation \(\star\), ask:

  1. Closure: Is \(a\star b\in S\) for every \(a,b\in S\)?
  2. Associativity: Is \((a\star b)\star c=a\star(b\star c)\) for every \(a,b,c\in S\)?
  3. Commutativity: Is \(a\star b=b\star a\) for every \(a,b\in S\)?

These three questions form an early structural profile of the operation.

Structural Comparison of Familiar Operations

Structure Closed? Associative? Commutative?
\((\mathbb{Z},+)\) Yes Yes Yes
\((\mathbb{Z},-)\) Yes No No
\((\mathbb{Z},\cdot)\) Yes Yes Yes
\((\mathbb{R}^{\times},\div)\) Yes No No
\((\mathcal{P}(U),\cup)\) Yes Yes Yes
Function composition on all maps \(X\to X\) Yes Yes Not generally

Why These Properties Matter Later

The classification of algebraic structures builds layer by layer.

For example, an associative binary operation is the central ingredient of a semigroup.

Adding an identity element leads to a monoid.

Adding inverses leads to a group.

If the group operation is also commutative, the result is an abelian group.

Thus the properties studied here are not isolated facts. They become the defining architecture of later structures.

Common Error: Testing Closure with Only One Example

A successful example such as

\[ 8-3=5 \]

does not show that the nonnegative integers are closed under subtraction.

Closure requires every pair to remain in the set.

The counterexample

\[ 3-8=-5 \]

proves that closure fails.

Common Error: Confusing Associativity with Commutativity

These two statements describe different changes:

\[ (a\star b)\star c=a\star(b\star c) \]

changes grouping, while

\[ a\star b=b\star a \]

changes order.

Always inspect what actually moved.

Common Error: Checking Associativity with Two Inputs

Associativity requires three inputs.

Comparing

\[ a\star b \]

and

\[ b\star a \]

tests commutativity, not associativity.

The associative comparison is

\[ (a\star b)\star c \]

versus

\[ a\star(b\star c). \]

Common Error: Assuming Familiar Symbols Keep Familiar Properties

A custom operation symbol may look like addition, multiplication, or another familiar operation, but its properties must come from its actual definition.

Even if we use a symbol such as

\[ \oplus, \]

we cannot assume commutativity or associativity until they have been established.

Common Error: Assuming Closure Is Independent of the Set

The expression

\[ a-b \]

behaves differently depending on the set under consideration.

Subtraction is closed on

\[ \mathbb{Z}, \]

but not on

\[ \mathbb{Z}_{\ge0}. \]

Closure is always a property of a set-operation pairing.

A Reliable Procedure

  1. Identify the set \(S\) and operation \(\star\).
  2. Check that the proposed rule is defined for every required pair.
  3. Test closure: determine whether \(a\star b\in S\) for arbitrary \(a,b\in S\).
  4. Test commutativity by comparing \(a\star b\) with \(b\star a\).
  5. Test associativity by comparing \((a\star b)\star c\) with \(a\star(b\star c)\).
  6. Use a general symbolic argument to prove a property.
  7. Use a single counterexample to disprove a universal property.
  8. Record each property separately rather than assuming one from another.

Example: Full Structural Test

On \(\mathbb{R}\), define

\[ a\star b=a+b-ab. \]

Closure

If \(a,b\in\mathbb{R}\), then

\[ a+b-ab\in\mathbb{R}. \]

So the operation is closed on \(\mathbb{R}\).

Commutativity

\[ a\star b=a+b-ab, \]

while

\[ b\star a=b+a-ba. \]

Since

\[ a+b=b+a \]

and

\[ ab=ba, \]

we have

\[ \boxed{a\star b=b\star a}. \]

Associativity

First,

\[ (a\star b)\star c = (a+b-ab)+c-(a+b-ab)c. \]

Expanding,

\[ (a\star b)\star c = a+b+c-ab-ac-bc+abc. \]

Next,

\[ a\star(b\star c) = a+(b+c-bc)-a(b+c-bc). \]

Expanding,

\[ a\star(b\star c) = a+b+c-ab-ac-bc+abc. \]

Therefore,

\[ \boxed{(a\star b)\star c=a\star(b\star c)}. \]

This custom operation is closed, associative, and commutative on \(\mathbb{R}\).

Practice 1: Closure

Determine whether the even integers are closed under subtraction.

Practice 2: Closure Counterexample

Determine whether the positive integers are closed under division. If not, give a counterexample.

Practice 3: Associativity

Determine whether ordinary subtraction is associative by comparing

\[ (9-4)-2 \]

and

\[ 9-(4-2). \]

Practice 4: Commutativity

Determine whether ordinary division is commutative by comparing

\[ 12\div4 \]

and

\[ 4\div12. \]

Practice 5: Custom Operation

On \(\mathbb{R}\), define

\[ a\star b=a+b+5. \]

Determine whether \(\star\) is commutative.

Practice 6: Associativity of a Custom Operation

On \(\mathbb{R}\), define

\[ a\star b=a+b+5. \]

Determine whether \(\star\) is associative.

Practice 7: Commutative but Not Associative

On \(\mathbb{R}\), define

\[ a\diamond b=\frac{a+b}{2}. \]

Verify that

\[ 2\diamond6=6\diamond2. \]

Then compare

\[ (0\diamond0)\diamond8 \]

with

\[ 0\diamond(0\diamond8). \]

Practice 8: Set Operation

Let

\[ A=\{1,2\}, \qquad B=\{2,3\}. \]

Compute

\[ A\cup B \]

and

\[ B\cup A. \]

What property does the comparison illustrate?

Practice 9: Identify the Property

Name the property illustrated by

\[ (a\star b)\star c=a\star(b\star c). \]

Practice 10: Identify the Error

A student says:

“Multiplication is associative because \(3\cdot7=7\cdot3\).”

Explain the error.

Practice Answers

Practice 1

Yes. If

\[ a=2m,\qquad b=2n, \]

then

\[ a-b=2m-2n=2(m-n), \]

which is even.

Practice 2

No. For example,

\[ 1\div2=\frac12, \]

and \(\frac12\) is not a positive integer.

Practice 3

\[ (9-4)-2 = 5-2 = 3, \]

while

\[ 9-(4-2) = 9-2 = 7. \]

Since \(3\ne7\), subtraction is not associative.

Practice 4

\[ 12\div4=3, \]

while

\[ 4\div12=\frac13. \]

Therefore division is not commutative.

Practice 5

\[ a\star b=a+b+5 \]

and

\[ b\star a=b+a+5. \]

Since addition is commutative,

\[ \boxed{a\star b=b\star a}. \]

Therefore \(\star\) is commutative.

Practice 6

\[ (a\star b)\star c = (a+b+5)+c+5 = a+b+c+10, \]

while

\[ a\star(b\star c) = a+(b+c+5)+5 = a+b+c+10. \]

Therefore,

\[ \boxed{(a\star b)\star c=a\star(b\star c)}. \]

The operation is associative.

Practice 7

\[ 2\diamond6 = \frac{2+6}{2} = 4, \]

and

\[ 6\diamond2 = \frac{6+2}{2} = 4. \]

This agrees with commutativity.

For associativity,

\[ (0\diamond0)\diamond8 = 0\diamond8 = 4, \]

but

\[ 0\diamond(0\diamond8) = 0\diamond4 = 2. \]

Therefore the operation is not associative.

Practice 8

\[ A\cup B = \{1,2,3\}, \]

and

\[ B\cup A = \{1,2,3\}. \]

This illustrates commutativity:

\[ A\cup B=B\cup A. \]

Practice 9

The property is associativity.

Practice 10

The equation

\[ 3\cdot7=7\cdot3 \]

demonstrates commutativity because the order of the two factors was reversed.

Associativity requires three factors and compares different groupings:

\[ (a\cdot b)\cdot c = a\cdot(b\cdot c). \]

What to Remember

Closure asks whether the result remains in the set:

\[ \boxed{ a,b\in S \Longrightarrow a\star b\in S }. \]

Associativity asks whether regrouping changes the result:

\[ \boxed{ (a\star b)\star c = a\star(b\star c) }. \]

Commutativity asks whether reversing the order changes the result:

\[ \boxed{ a\star b=b\star a }. \]

These are separate properties. None should be assumed merely because another one holds.

To prove a universal property, use arbitrary elements. To disprove one, find a single counterexample.

Where We Go Next

Closure tells us whether an operation stays inside the set, while associativity and commutativity describe how repeated uses of that operation behave.

The next lesson, Identity and Inverse Elements, introduces special elements that leave other elements unchanged and elements that can undo one another under an operation.