- Practice
- About 16 min
- 5 practice questions
Binary operations and the closure property
Define a binary operation on a non-empty set, test the closure property, and decide which of +, −, × and ÷ are binary operations on ℕ, ℤ, ℚ, ℝ and ℂ.
If something looks wrong, please tell us.
By the end of this lesson you can
- Explain what continuous and discrete mathematics are and where this chapter fits.
- State the definition of a binary operation and of an algebraic structure.
- Check the closure property for a given rule on a given set, or show it fails with one counterexample.
- Say which usual arithmetic operations are binary on each number system.
Mathematics can be split roughly into two kinds. Continuous mathematics works with the real numbers, where between any two numbers there are uncountably many others and graphs can be drawn without a break. Discrete mathematics works with sets that are finite or countably infinite, like ℕ, whose elements can be listed one after another. Computers handle only discrete data, which is why this subject matters so much today. Combinatorics, logic, Boolean algebra and graph theory are parts of it; this chapter studies two: binary operations and mathematical logic.
Unary, binary and n-ary operations
An operation processes elements of a set. Taking the negative of a number uses one element at a time, so it is a unary operation. Adding two numbers uses two elements at a time, so it is a binary operation; in general an operation on n elements at a time is n-ary. When we add or multiply two natural numbers, two things happen: exactly two elements of ℕ are processed, and the result is again in ℕ. These two observations are the heart of the definition.
Definition of a binary operation
An operation ∗ on a non-empty set S is a binary operation on S if (i) a ∗ b is defined for every ordered pair (a, b) ∈ S × S, and (ii) it assigns a unique element a ∗ b of S to each such pair. So ∗ is a function ∗ : S × S → S, (a, b) ↦ a ∗ b. The requirement that a ∗ b always lands back in S is the closure property: we say "S is closed under ∗". Every binary operation is closed by definition. A non-empty set with one or more binary operations is called an algebraic structure, written for example (ℤ, +, ×).
∗ is a binary operation on S when, for all a, b ∈ S, a ∗ b is defined, unique, and belongs to S.
To prove closure you must argue for all pairs. To disprove it, one pair is enough, because the opposite of "for every" is "there exists one that fails". For example, − is not binary on ℕ since 3 − 4 = −1 ∉ ℕ, and ÷ is not binary on ℤ since 1 ÷ 2 = 1/2 ∉ ℤ. These failures are why ℕ is extended to ℤ (to allow subtraction) and ℤ to ℚ (to allow division), and why division by 0 forces us to remove 0. Adding irrational numbers gives ℝ, and adding roots of equations like x² + 1 = 0 gives ℂ, the largest system here.
| Operation | ℕ | ℤ | ℚ | ℝ | ℂ | ℚ \ {0}, ℝ \ {0}, ℂ \ {0} |
|---|---|---|---|---|---|---|
| + | Binary | Binary | Binary | Binary | Binary | Not binary (e.g. 2 + (−2) = 0) |
| − | Not binary | Binary | Binary | Binary | Binary | Not binary (e.g. 2 − 2 = 0) |
| × | Binary | Binary | Binary | Binary | Binary | Binary |
| ÷ | Not binary | Not binary | Not binary (÷ 0) | Not binary (÷ 0) | Not binary (÷ 0) | Binary |
Testing a rule for closure
-
Is a ∗ b defined for every pair?
If some pair gives no value (like a ÷ 0), it is not binary.
- Check zero, negatives, equal elements
- Is the value unique? One pair must not give two answers.
-
Is the value inside S?
Find one pair whose value leaves S to disprove; argue in general to prove.
- 3 − 4 = −1 ∉ ℕ
- a + b + ab ∈ ℕ for a, b ∈ ℕ
Worked example 1: a ∗ b = 2a + 3b − ab on ℤ
Let a, b ∈ ℤ. Since × is binary on ℤ, ab ∈ ℤ, 2a = 2 × a ∈ ℤ and 3b ∈ ℤ. Since + and − are binary on ℤ, 2a + 3b ∈ ℤ and then 2a + 3b − ab ∈ ℤ. The value is computed uniquely from a and b. So ∗ is a binary operation on ℤ. For instance 4 ∗ 5 = 8 + 15 − 20 = 3 and 5 ∗ 4 = 10 + 12 − 20 = 2.
Worked example 2: a ∗ b = |a − b|
On ℕ, take a = b = 3: 3 ∗ 3 = |0| = 0, and 0 ∉ ℕ = {1, 2, 3, …}. So ∗ is not binary on ℕ. On ℤ, |a − b| is always an integer, so ∗ is binary on ℤ. The same rule can be binary on one set and not on another: the set matters as much as the rule.
Worked example 3: odd integers
Let O be the set of odd integers. Under +, O is not closed: 3 + 5 = 8 is even. Under ×, O is closed: if x = 2m + 1 and y = 2n + 1 then xy = 4mn + 2m + 2n + 1 = 2(2mn + m + n) + 1, which is odd. So × is a binary operation on O but + is not.
Worked example 4: a ∗ b = a + b + ab on ℕ
For a, b ∈ ℕ, ab ∈ ℕ and sums of natural numbers are natural, so a + b + ab ∈ ℕ. Hence ∗ is binary on ℕ. For instance 2 ∗ 3 = 2 + 3 + 6 = 11.
Key takeaways: a binary operation on S takes every ordered pair of S to a single element of S; closure is built into the definition. One counterexample is enough to show that a rule is not binary. Whether a rule is binary depends on the set: − is binary on ℤ but not on ℕ, and ÷ is binary on ℝ \ {0} but not on ℝ.
Check your understanding
-
1. Which of these rules defines a binary operation on ℕ?
- a ∗ b = a − b
- a ∗ b = a ÷ b
- a ∗ b = a + b + ab
- a ∗ b = |a − b|
Show answer
Answer: C. For natural numbers a and b, a + b + ab is again a natural number, so the rule is binary on ℕ. The others fail for some pair: 1 − 2 = −1, 1 ÷ 2 = 1/2 and |3 − 3| = 0 are not natural numbers.
-
2. On ℤ, a ∗ b = 2a + 3b − ab. What is 4 ∗ 5?
- 23
- −3
- 3
- 13
Show answer
Answer: C. 4 ∗ 5 = 2(4) + 3(5) − 4 × 5 = 8 + 15 − 20 = 3.
-
3. On which of these sets is subtraction a binary operation?
- ℕ
- ℤ
- The set of odd integers
- The set of positive rational numbers
Show answer
Answer: B. The difference of two integers is always an integer, so − is binary on ℤ. On ℕ and on the positive rationals, 1 − 2 = −1 leaves the set; for odd integers, 5 − 3 = 2 is even.
-
4. Division is a binary operation on which set?
- ℤ
- ℝ
- ℝ \ {0}
- ℕ
Show answer
Answer: C. On ℝ \ {0}, a ÷ b is defined (b ≠ 0) and a ÷ b is a non-zero real number, so the set is closed. On ℝ, a ÷ 0 is not defined; on ℤ and ℕ, 1 ÷ 2 is not in the set.
-
5. The set of odd integers is closed under which operation?
- Addition
- Subtraction
- Division
- Multiplication
Show answer
Answer: D. (2m + 1)(2n + 1) = 2(2mn + m + n) + 1 is odd. But 3 + 5 = 8 and 5 − 3 = 2 are even, and 3 ÷ 5 is not an integer.
Sign in to keep track of the lessons you finish.