Welcome to Binary Operations!

Welcome to one of the most interesting parts of Discrete Mathematics! Don't be intimidated by the name "Binary Operations." You have actually been doing binary operations since primary school without even knowing it. Whenever you add, subtract, or multiply two numbers, you are performing a binary operation.

In this chapter, we are going to look at these "rules" more closely. We’ll learn how to test their properties and how they work with different sets of things, like matrices or "clock arithmetic" (modular arithmetic). Let's dive in!


1. What Exactly is a Binary Operation?

A binary operation (often shown with symbols like \(\ast, \oplus, \text{ or } \otimes\)) is simply a rule that takes two elements from a set and combines them to produce a single result.

For a rule to be a binary operation on a specific set, it usually needs to be well-defined. This means that for any two elements you pick from your set, the result must also be in that same set.

Common Examples in the Syllabus:

  • Modular Arithmetic: This is like "clock math." For example, in Modulo 5 (\(\pmod 5\)), the only numbers we care about are \(\{0, 1, 2, 3, 4\}\). If we do \(4 + 2\), the answer is \(6\), but since \(6 \div 5\) leaves a remainder of \(1\), we say \(4 + 2 \equiv 1 \pmod 5\).
  • Matrix Multiplication: Taking two matrices and following the "row by column" rule to get a new matrix.
  • Algebraic Rules: Sometimes, the exam will just give you a random rule, like \(a \ast b = 2a + b\).

Quick Review: A binary operation takes two inputs and gives one output. If the result stays within the original set, we say the set is closed under that operation.


2. Commutativity: Does Order Matter?

An operation is commutative if the order in which you combine the elements doesn't change the result.

The Definition: \(a \ast b = b \ast a\)

Real-World Analogy:

Think about putting on your clothes. Putting on your left sock and putting on your right sock is commutative—it doesn't matter which one you do first! However, putting on your socks and putting on your shoes is NOT commutative. The order definitely matters there!

How to prove it:

To prove an operation is commutative, you must show that the algebraic expression for \(a \ast b\) is identical to \(b \ast a\).

Example: Is \(a \ast b = a + b + ab\) commutative?
1. Write down \(a \ast b = a + b + ab\).
2. Write down \(b \ast a = b + a + ba\).
3. Since addition and normal multiplication are commutative (\(a+b = b+a\) and \(ab = ba\)), then \(a \ast b = b \ast a\). It is commutative.

Common Mistake: Many students assume matrix multiplication is commutative. It is not! Usually, \(AB \neq BA\).


3. Associativity: Does Grouping Matter?

An operation is associative if the way you group three elements (using brackets) doesn't change the result.

The Definition: \((a \ast b) \ast c = a \ast (b \ast c)\)

Step-by-Step Explanation:

To prove associativity, you have to work out the Left Hand Side (LHS) and the Right Hand Side (RHS) separately:

  1. LHS: Calculate \((a \ast b)\) first, then use that result to operate with \(c\).
  2. RHS: Calculate \((b \ast c)\) first, then operate \(a\) with that result.
  3. If LHS = RHS, the operation is associative.

Did you know? Subtraction is not associative. Try it: \((10 - 5) - 2 = 3\), but \(10 - (5 - 2) = 7\). The brackets change everything!


4. Cayley Tables

When we have a small, finite set, we can draw a Cayley Table (basically a multiplication table) to show every possible result of the operation.

How to construct one:

Imagine the set \(\{0, 1, 2\}\) under addition modulo 3 (\(+_3\)):

\(\ast\) | 0 | 1 | 2
--- | --- | --- | ---
0 | 0 | 1 | 2
1 | 1 | 2 | 0
2 | 2 | 0 | 1

Tricks for reading Cayley Tables:

  • Check for Commutativity: If the table is symmetrical across the leading diagonal (the line from top-left to bottom-right), the operation is commutative.
  • Check for closure: If every result inside the table is one of the original elements of the set, the set is closed.

5. The Identity Element

The identity element (often called \(e\)) is the "do-nothing" element. When you combine any element with \(e\), the element stays exactly the same.

The Definition: \(a \ast e = a\) and \(e \ast a = a\)

How to find it:

  • In Algebra: Set \(a \ast e = a\) and solve for \(e\). For example, if \(a \ast b = a + b - 5\), then \(a + e - 5 = a\). Solving this gives \(e = 5\).
  • In a Cayley Table: Look for the row that looks exactly like the header row, and the column that looks exactly like the header column. The element where they meet is your identity.

Key Takeaway: An identity element must be unique for the whole set. You can't have two different "do-nothing" elements!


6. Inverses

An inverse of an element \(a\) (written as \(a^{-1}\)) is the element you combine with \(a\) to get back to the identity.

The Definition: \(a \ast a^{-1} = e\)

How to find an inverse:

  1. First, find the identity (\(e\)). You cannot find an inverse without knowing what the identity is!
  2. In a Cayley Table: Find your element in the left column, move across its row until you find the identity (\(e\)), then look up to the top of that column to see which element you are under. That is the inverse.
  3. In Algebra: Solve the equation \(a \ast x = e\) for \(x\).

Memory Aid: Think of the inverse as the "undo" button. If the operation moves you away from the identity, the inverse brings you right back to it.


Summary: The "Big Four" Checklist

When you are faced with a Binary Operations question, run through this checklist:

  • Commutative? Does \(a \ast b = b \ast a\)?
  • Associative? Does \((a \ast b) \ast c = a \ast (b \ast c)\)?
  • Identity? Is there an element \(e\) such that \(a \ast e = a\)?
  • Inverse? For each \(a\), is there an \(a^{-1}\) such that \(a \ast a^{-1} = e\)?

Don't worry if this seems tricky at first! Practising with Cayley tables is the best way to make these concepts feel "real." Once you can find the identity in a table, the rest usually falls into place!