The Central Idea
An algebraic structure begins with a set of objects and one or more rules for combining those objects.
The set tells us which objects are available. The operation tells us how those objects may be combined.
For example, the integers
\[ \mathbb{Z}=\{\ldots,-2,-1,0,1,2,\ldots\} \]form a set. If we equip that set with ordinary addition, we obtain the structure
\[ \boxed{(\mathbb{Z},+)}. \]The notation records both ingredients: the set \(\mathbb{Z}\) and the operation \(+\).
From a Collection to a Structure
A set by itself is simply a collection of distinct objects.
For example,
\[ A=\{0,1,2\} \]tells us which elements belong to \(A\), but it does not tell us how those elements should interact.
We might equip \(A\) with addition modulo \(3\), with multiplication modulo \(3\), with a custom operation, or with no operation at all.
Different operations placed on the same underlying set can create different algebraic structures.
What Is an Operation?
An operation is a rule that accepts one or more inputs and produces an output.
Familiar arithmetic operations include
\[ +,\qquad -,\qquad \times,\qquad \div. \]But generalized algebra does not restrict us to familiar arithmetic symbols. An operation may be defined by any rule that is mathematically precise.
We might define, for example,
\[ a\star b=a+b+1. \]The symbol \(\star\) has no universal meaning here. Its meaning comes entirely from the rule we assigned to it.
Unary, Binary, and Higher-Arity Operations
Operations can be classified by the number of inputs they accept.
- A unary operation takes one input.
- A binary operation takes two inputs.
- A ternary operation takes three inputs.
- More generally, an \(n\)-ary operation takes \(n\) inputs.
Negation is a familiar unary operation:
\[ x\longmapsto -x. \]Addition is a familiar binary operation:
\[ (a,b)\longmapsto a+b. \]Generalized algebra focuses heavily on binary operations because they are the foundation of structures such as semigroups, groups, rings, and fields.
What Is a Binary Operation?
A binary operation on a set \(S\) is a rule that combines any ordered pair of elements of \(S\) and produces exactly one element of \(S\).
Formally, a binary operation is a function
\[ \boxed{\star:S\times S\to S}. \]If \(a,b\in S\), then
\[ a\star b\in S. \]The notation \(S\times S\) is the Cartesian product of \(S\) with itself, so its elements are ordered pairs
\[ (a,b). \]Thus a binary operation is a special kind of function whose inputs are ordered pairs from the set and whose outputs remain in the same set.
The Three Requirements Hidden in the Definition
If \(\star\) is a binary operation on \(S\), three things are built into that statement.
- Every first input must come from \(S\).
- Every second input must come from \(S\).
- The output must be one well-defined element of \(S\).
In particular, the rule must work for every ordered pair in \(S\times S\).
A rule that fails for even one required pair is not a binary operation on that set.
Closure Is Built into a Binary Operation
The statement
\[ \star:S\times S\to S \]requires the output to remain in \(S\). This is the idea of closure.
If
\[ a,b\in S, \]then closure requires
\[ a\star b\in S. \]In elementary discussions we often ask, “Is this set closed under the operation?” That question tests whether a proposed rule really behaves as an internal binary operation on the chosen set.
Closure will be studied more systematically in the next lesson.
Example: Addition on the Integers
Consider ordinary addition on
\[ \mathbb{Z}. \]For any integers \(a\) and \(b\),
\[ a+b \]is again an integer.
For example,
\[ -7+12=5, \] \[ 9+(-14)=-5. \]Therefore,
\[ \boxed{+:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}} \]is a binary operation on \(\mathbb{Z}\).
Example: Multiplication on the Rational Numbers
Let
\[ a,b\in\mathbb{Q}. \]Their product
\[ ab \]is also rational.
For example,
\[ \frac{2}{3}\cdot\left(-\frac{9}{5}\right) = -\frac{6}{5}. \]Therefore multiplication is a binary operation on \(\mathbb{Q}\):
\[ \boxed{\cdot:\mathbb{Q}\times\mathbb{Q}\to\mathbb{Q}}. \]Example: Subtraction Depends on the Set
Subtraction is a binary operation on the integers because
\[ a,b\in\mathbb{Z} \quad\Longrightarrow\quad a-b\in\mathbb{Z}. \]For example,
\[ 3-8=-5\in\mathbb{Z}. \]But if we work with the nonnegative integers
\[ \mathbb{Z}_{\ge 0}=\{0,1,2,3,\ldots\}, \]then
\[ 3-8=-5\notin\mathbb{Z}_{\ge 0}. \]So subtraction is not a binary operation on \(\mathbb{Z}_{\ge 0}\).
The operation cannot be classified without also naming the set.
Example: Division on the Real Numbers
At first glance, division may seem like a binary operation on the real numbers.
But division by zero is undefined:
\[ \frac{a}{0} \]is not a real number.
Because a binary operation on \(\mathbb{R}\) must work for every ordered pair in
\[ \mathbb{R}\times\mathbb{R}, \]ordinary division is not a binary operation on all of \(\mathbb{R}\).
Changing the Set Can Change the Answer
Let
\[ \mathbb{R}^{\times}=\mathbb{R}\setminus\{0\}. \]If \(a,b\in\mathbb{R}^{\times}\), then \(b\ne0\), so
\[ \frac{a}{b} \]is defined. Because \(a\ne0\) and \(b\ne0\), the quotient is also nonzero.
Therefore,
\[ \boxed{\div:\mathbb{R}^{\times}\times\mathbb{R}^{\times} \to\mathbb{R}^{\times}} \]is a binary operation.
This illustrates a recurring idea: the same rule may be a valid binary operation on one set but not on another.
The Same Set Can Carry Several Operations
The integers support several familiar binary operations.
Both
\[ +:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z} \]and
\[ \cdot:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z} \]are binary operations.
So we may study
\[ (\mathbb{Z},+), \]or
\[ (\mathbb{Z},\cdot), \]or a structure that remembers both operations:
\[ \boxed{(\mathbb{Z},+,\cdot)}. \]The underlying set is the same, but the structure being studied is different.
Custom Binary Operations
A binary operation does not need to be one of the standard arithmetic operations.
Suppose we define
\[ a\star b=a+b+1 \]for integers \(a\) and \(b\).
Because \(a+b+1\) is an integer whenever \(a\) and \(b\) are integers, this rule defines a binary operation
\[ \boxed{\star:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}}. \]The symbol \(\star\) is simply a label for the rule.
Evaluating a Custom Operation
Let
\[ a\star b=a+b+1. \]To evaluate
\[ 3\star5, \]substitute \(a=3\) and \(b=5\):
\[ 3\star5 = 3+5+1 = \boxed{9}. \]Similarly,
\[ (-4)\star2 = -4+2+1 = \boxed{-1}. \]The unfamiliar symbol does not make the calculation mysterious. We simply apply its defining rule.
The Inputs Are Ordered
A binary operation receives an ordered pair
\[ (a,b). \]The first and second positions may matter.
Define
\[ a\diamond b=a+2b \]on \(\mathbb{R}\).
Then
\[ 3\diamond5 = 3+2(5) = 13, \]while
\[ 5\diamond3 = 5+2(3) = 11. \]Thus
\[ 3\diamond5\ne5\diamond3. \]A binary operation does not automatically allow its inputs to be reversed. Whether reversal is allowed is the separate property called commutativity.
Binary Does Not Mean Commutative
The word binary tells us only that the operation takes two inputs from the set and returns one output in the set.
It does not tell us whether
\[ a\star b=b\star a. \]Addition of real numbers is commutative:
\[ a+b=b+a. \]Subtraction of integers is generally not:
\[ 8-3=5 \]but
\[ 3-8=-5. \]Both addition and subtraction are binary operations on \(\mathbb{Z}\), but they obey different laws.
Binary Does Not Mean Associative
A binary operation also need not satisfy
\[ (a\star b)\star c = a\star(b\star c). \]For subtraction,
\[ (10-6)-2=2, \]while
\[ 10-(6-2)=6. \]So subtraction is a binary operation on \(\mathbb{Z}\), but it is not associative.
Generalized algebra studies exactly which laws an operation satisfies and what follows from those laws.
An Operation Must Be Well Defined
A binary operation is a function, so each permitted ordered pair must have exactly one output.
A rule such as
\[ a\star b=\text{either }a+b\text{ or }a-b \]does not define a binary operation unless another rule determines which output to use.
For example, with \(a=5\) and \(b=2\), the rule would allow both
\[ 7 \]and
\[ 3. \]A function cannot assign two unrelated outputs to the same input pair without an additional convention.
A Formula Can Define the Operation
One common way to define a binary operation is with a formula.
For example, on \(\mathbb{R}\), define
\[ a\circ b=a+b-ab. \]Then
\[ 2\circ3 = 2+3-(2)(3) = -1. \]Because sums and products of real numbers are real, this formula always produces an element of \(\mathbb{R}\).
Therefore \(\circ\) is a binary operation on \(\mathbb{R}\).
A Table Can Define the Operation
On a finite set, a binary operation can be specified by an operation table.
Let
\[ S=\{0,1,2\}, \]and define \(\oplus\) by addition modulo \(3\):
| \(\oplus\) | \(0\) | \(1\) | \(2\) |
|---|---|---|---|
| \(0\) | \(0\) | \(1\) | \(2\) |
| \(1\) | \(1\) | \(2\) | \(0\) |
| \(2\) | \(2\) | \(0\) | \(1\) |
For example, the row for \(2\) and the column for \(1\) meet at \(0\), so
\[ 2\oplus1=0. \]Operation tables will receive their own lesson later in this section.
Reading an Operation Table
An operation table is a compact representation of a function
\[ S\times S\to S. \]The row identifies the first input, and the column identifies the second input.
In the modulo-\(3\) table above,
\[ 1\oplus2=0 \]and
\[ 2\oplus2=1. \]Every cell contains an element of \(S\), which confirms closure for the displayed operation.
Example: Maximum as a Binary Operation
Not every binary operation resembles arithmetic.
On the real numbers, define
\[ a\star b=\max(a,b). \]Then
\[ 4\star9=9, \] \[ (-3)\star(-8)=-3. \]The maximum of two real numbers is always a real number, so
\[ \boxed{\max:\mathbb{R}\times\mathbb{R}\to\mathbb{R}} \]is a binary operation.
Example: Set Union as a Binary Operation
Binary operations can act on objects other than numbers.
Let \(\mathcal{P}(U)\) denote the power set of a set \(U\), meaning the set of all subsets of \(U\).
If
\[ A,B\in\mathcal{P}(U), \]then
\[ A\cup B \]is also a subset of \(U\).
Therefore union defines a binary operation
\[ \boxed{\cup:\mathcal{P}(U)\times\mathcal{P}(U)\to\mathcal{P}(U)}. \]This is an important reminder that abstract algebra studies operations on many kinds of mathematical objects, not only numbers.
Example: Composition of Functions
Functions themselves can be elements of a set.
Let \(F\) be a set of functions from a set \(X\) to itself:
\[ f:X\to X. \]For suitable \(f,g\in F\), their composition is
\[ (f\circ g)(x)=f(g(x)). \]If the set \(F\) has been chosen so that \(f\circ g\in F\) for every \(f,g\in F\), then composition is a binary operation on \(F\).
This gives a first glimpse of why the language of sets and operations is so general: numbers, matrices, transformations, functions, and symmetries can all be treated within the same framework.
Internal and External Operations
A binary operation on \(S\) is sometimes called an internal operation because both inputs and the output live in the same set:
\[ S\times S\to S. \]Other important operations use different sets for their inputs.
Scalar multiplication in a real vector space, for example, has the form
\[ \mathbb{R}\times V\to V. \]This is not a binary operation on \(V\) in the strict sense because the first input comes from \(\mathbb{R}\), not from \(V\).
This distinction will matter when we later study scalars, vectors, and vector spaces.
Why the Underlying Set Matters
When studying an operation, never look only at the formula or symbol.
Always ask:
- What is the underlying set?
- Which pairs are allowed as inputs?
- Is the rule defined for every required pair?
- Does every output remain in the underlying set?
These questions determine whether we actually have a binary operation.
A Binary Operation Is More Than a Calculation Rule
In elementary arithmetic, an operation is often introduced mainly as a procedure for getting an answer.
In generalized algebra, the operation becomes an object of study in its own right.
Instead of asking only
\[ \text{“What is }a\star b\text{?”} \]we also ask structural questions such as:
- Is the set closed under \(\star\)?
- Is \(\star\) associative?
- Is \(\star\) commutative?
- Does an identity element exist?
- Do elements have inverses?
- Which subsets preserve the operation?
Different answers to these questions lead to different classes of algebraic structures.
Notation for Algebraic Structures
A set together with an operation is commonly written as an ordered pair:
\[ (S,\star). \]A set with two operations may be written
\[ (S,\star,\circ). \]Familiar examples include
\[ (\mathbb{Z},+), \] \[ (\mathbb{R},+,\cdot), \]and, later,
\[ (V,+,\text{scalar multiplication}). \]The notation makes clear that an algebraic structure is not merely its underlying set.
Same Elements, Different Structure
Consider the set
\[ \mathbb{Z}. \]Under addition, \(0\) behaves in a special way:
\[ a+0=a. \]Under multiplication, \(1\) plays the analogous role:
\[ a\cdot1=a. \]The elements of the set have not changed, but the important structural features depend on the chosen operation.
This is one reason generalized algebra always names both the set and the operation.
Testing a Proposed Binary Operation
Suppose a rule is proposed on a set \(S\).
A reliable first test is:
- Take arbitrary \(a,b\in S\).
- Apply the proposed rule to form \(a\star b\).
- Check that the expression is defined.
- Check that the result lies in \(S\).
If both the definition and the output work for every possible pair, the rule is a binary operation on \(S\).
Example: A Rule That Works on \(\mathbb{R}\)
Define
\[ a\star b=a^2+b^2 \]for \(a,b\in\mathbb{R}\).
The expression \(a^2+b^2\) is defined for every pair of real numbers and is itself real.
Therefore,
\[ \boxed{\star:\mathbb{R}\times\mathbb{R}\to\mathbb{R}} \]is a binary operation.
Example: The Same Rule on a Smaller Set
Now use the same rule
\[ a\star b=a^2+b^2 \]on
\[ S=\{0,1\}. \]We have
\[ 1\star1=1^2+1^2=2. \]But
\[ 2\notin S. \]Therefore the rule is not a binary operation on \(S=\{0,1\}\).
A single counterexample is enough to show that closure fails.
Example: A Rule with a Domain Failure
Suppose we try to define
\[ a\star b=\frac{1}{a-b} \]on \(\mathbb{R}\).
If \(a=b\), then
\[ a-b=0, \]and the expression is undefined.
Therefore this formula does not define a binary operation on all of \(\mathbb{R}\).
The failure is not merely an output problem. The rule itself fails to produce any output for some required input pairs.
Binary Operations on Finite Sets
If a finite set \(S\) has \(n\) elements, then
\[ S\times S \]has
\[ n^2 \]ordered pairs.
A binary operation on \(S\) must assign one element of \(S\) to each of those \(n^2\) ordered pairs.
For a three-element set, that means an operation table contains
\[ 3^2=9 \]output entries.
This finite viewpoint makes the function definition of a binary operation especially concrete.
How Many Binary Operations Are Possible?
Suppose \(S\) has \(n\) elements.
There are \(n^2\) ordered input pairs, and each pair may be assigned any one of the \(n\) elements of \(S\).
Therefore the number of possible binary operations on \(S\) is
\[ \boxed{n^{\,n^2}}. \]For a two-element set,
\[ n=2, \]so there are
\[ 2^{2^2}=2^4=16 \]possible binary operations.
Only some of these operations will satisfy additional laws such as associativity or commutativity.
Why Abstract Symbols Are Useful
Symbols such as
\[ \star,\qquad\circ,\qquad\diamond,\qquad\oplus \]allow us to discuss the structure of an operation without assuming it is ordinary addition or multiplication.
For example, the statement
\[ a\star b=b\star a \]expresses commutativity for any operation \(\star\).
This abstraction lets one theorem apply to many different mathematical systems at once.
Generalized Algebra Looks for Reusable Patterns
The purpose of abstraction is not to make arithmetic more obscure. It is to identify patterns that occur repeatedly.
Addition of integers, addition of vectors, matrix addition, union of sets, and other operations can share structural properties even though their elements look very different.
Once a theorem is proved from the shared properties alone, it can be reused in every structure that satisfies those properties.
Common Error: Naming the Operation but Not the Set
A statement such as
\[ \text{“subtraction is a binary operation”} \]is incomplete.
Subtraction is a binary operation on \(\mathbb{Z}\), but not on \(\mathbb{Z}_{\ge0}\).
The correct question is always:
Is this rule a binary operation on this particular set?
Common Error: Checking Only a Few Examples
Several successful calculations do not prove that a rule is a binary operation.
To establish
\[ \star:S\times S\to S, \]the rule must work for every pair \(a,b\in S\).
Examples can suggest that closure holds, but a general argument is needed when the set is infinite.
Common Error: Confusing Closure with Commutativity
Closure asks whether the output stays in the set:
\[ a,b\in S \quad\Longrightarrow\quad a\star b\in S. \]Commutativity asks whether reversing the inputs changes the output:
\[ a\star b=b\star a. \]These are entirely different properties.
Subtraction on \(\mathbb{Z}\) is closed but not commutative.
Common Error: Treating Every Two-Input Rule as Binary
A rule may accept two inputs without being a binary operation on the set under discussion.
For example,
\[ a\star b=\sqrt{a-b} \]is not a binary operation on \(\mathbb{R}\), because \(a-b\) may be negative.
If \(a=2\) and \(b=5\), then
\[ \sqrt{2-5}=\sqrt{-3} \]is not real.
A Reliable Procedure
When you encounter a new operation, use the following workflow.
- Identify the underlying set \(S\).
- Write or locate the defining rule.
- Confirm that the rule accepts two inputs from \(S\).
- Check that the rule is defined for every pair in \(S\times S\).
- Check that every output lies in \(S\).
- Evaluate sample expressions to become comfortable with the notation.
- Only then investigate additional properties such as associativity, commutativity, identities, and inverses.
Example: Full Binary-Operation Check
On \(\mathbb{Z}\), define
\[ a\star b=a+b-ab. \]We test whether \(\star\) is a binary operation on \(\mathbb{Z}\).
Let
\[ a,b\in\mathbb{Z}. \]Since integers are closed under addition and multiplication,
\[ a+b\in\mathbb{Z} \]and
\[ ab\in\mathbb{Z}. \]Therefore,
\[ a+b-ab\in\mathbb{Z}. \]The formula is defined for every pair of integers, so
\[ \boxed{\star:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}} \]is a binary operation.
Practice 1: Evaluate a Custom Operation
On \(\mathbb{Z}\), define
\[ a\star b=2a+b. \]Find
\[ 4\star(-3). \]Practice 2: Check Closure
Is subtraction a binary operation on
\[ S=\{0,1,2,3,\ldots\}? \]Give a reason.
Practice 3: Check a Familiar Operation
Is multiplication a binary operation on the odd integers?
Practice 4: Find a Counterexample
On the positive real numbers, consider
\[ a\diamond b=a-b. \]Is \(\diamond\) a binary operation? If not, give a counterexample.
Practice 5: Formula-Defined Operation
On \(\mathbb{R}\), define
\[ a\circ b=a^2+b. \]Determine whether \(\circ\) is a binary operation on \(\mathbb{R}\).
Practice 6: Domain Failure
On \(\mathbb{R}\), consider
\[ a\star b=\frac{a}{b}. \]Explain why this is not a binary operation on all of \(\mathbb{R}\).
Practice 7: Read an Operation Table
Use the modulo-\(3\) table from this lesson to find
\[ 2\oplus2 \]and
\[ 1\oplus2. \]Practice 8: Same Rule, Different Set
Consider
\[ a\star b=a+b. \]Is this a binary operation on each of the following?
- \(\mathbb{Z}\)
- the even integers
- the odd integers
Practice 9: Ordered Inputs
Define
\[ a\diamond b=3a-b. \]Compute
\[ 2\diamond5 \]and
\[ 5\diamond2. \]Are they equal?
Practice 10: Identify the Structural Issue
A student says that
\[ a\star b=\sqrt{a+b} \]defines a binary operation on \(\mathbb{R}\) because it takes two real numbers as inputs.
Explain what the student has overlooked.
Practice Answers
Practice 1
\[ 4\star(-3) = 2(4)+(-3) = 8-3 = \boxed{5}. \]Practice 2
No. For example,
\[ 2-5=-3, \]and \(-3\notin S\). The set is not closed under subtraction.
Practice 3
Yes. The product of two odd integers is odd, so multiplication maps every pair of odd integers to another odd integer.
Practice 4
No. For example,
\[ 2\diamond5=2-5=-3, \]and \(-3\) is not a positive real number.
Practice 5
Yes. If \(a,b\in\mathbb{R}\), then \(a^2\in\mathbb{R}\) and \(a^2+b\in\mathbb{R}\). The rule is defined for every pair of real numbers.
Practice 6
The rule fails whenever \(b=0\). For example,
\[ \frac{4}{0} \]is undefined. Therefore the rule does not assign an output to every pair in \(\mathbb{R}\times\mathbb{R}\).
Practice 7
\[ \boxed{2\oplus2=1} \]and
\[ \boxed{1\oplus2=0}. \]Practice 8
Addition is a binary operation on \(\mathbb{Z}\) because the sum of two integers is an integer.
It is also a binary operation on the even integers because even plus even is even.
It is not a binary operation on the odd integers because odd plus odd is even. For example,
\[ 3+5=8. \]Practice 9
\[ 2\diamond5 = 3(2)-5 = 1, \]while
\[ 5\diamond2 = 3(5)-2 = 13. \]Therefore,
\[ \boxed{2\diamond5\ne5\diamond2}. \]Practice 10
The student checked the types of the inputs but not every output. If \(a+b<0\), then \(\sqrt{a+b}\) is not real.
For example,
\[ (-5)\star2 = \sqrt{-3}, \]which is not in \(\mathbb{R}\). Therefore the rule is not a binary operation on \(\mathbb{R}\).
What to Remember
A binary operation on a set \(S\) is a function
\[ \boxed{\star:S\times S\to S}. \]This means:
- the operation accepts two elements of \(S\);
- it is defined for every ordered pair in \(S\times S\);
- it assigns exactly one output to each pair;
- the output remains in \(S\).
The set and the operation must always be considered together. A rule may be a binary operation on one set and fail on another.
The notation
\[ \boxed{(S,\star)} \]is the first step from a collection of objects toward an algebraic structure.
Where We Go Next
Once an operation has been placed on a set, the next question is not merely how to calculate with it, but what laws it obeys.
The next lesson, Closure, Associativity, and Commutativity, examines three of the first structural properties used to classify operations and the algebraic systems they create.