5 Binary Operations
Definition 5.1. A binary operation, denoted ‘\(\circ \)’ or ‘\(*\)’, on a non-empty set \(G\) is a rule which associates to each ordered pair of elements \(a,b\) in \(G\) a unique element \(a*b\) of \(G\).
Three words in that definition are doing work.
Each pair: the rule must give an answer for every pair, with none left out. This is where division fails on \(\mathbb {R}\) — there is no answer for \(a\div 0\).
Unique: one answer, not a choice of several. This is where ”\(a*b=\) a square root of \(ab\)” fails.
Of \(G\): the answer must land back inside \(G\). This is closure, and it is the condition most often overlooked, because it depends on the set as much as on the rule. Subtraction is a perfectly good operation, but it is not a binary operation on \(\mathbb {N}\), since \(6-9=-3\) escapes the set.
Note 5.2. “Binary” refers to the two inputs, nothing else. Ordinary addition, multiplication and subtraction are binary operations; so is \(a*b=2^{a^{2}+b}\); so is ”the larger of \(a\) and \(b\)”. Taking a square root is not, since it has only one input.
- 1.
- Addition \((+)\) is a binary operation on a set of natural numbers \(\mathbb {N}\), since if \(m\) and \(n\) are natural
numbers then \(m+n\) is also a natural number.
However, subtraction is not a binary operation on the set of natural numbers since \(m-n\) may not be a natural number. e.g \(6-9=-3\) and \(-3\) is not a natural number. - 2.
- Both addition and subtraction are binary operation on \(\mathbb {Z}\) the set of integers.
Whenever \(*\) is binary of a set \(G\) we say \(G\) is closed under the operation \(*\) or we say the closure property is satisfied in \(G\) with respect to the operation \(*\).
Let \(X=\{-1,0,1\}\) be a set. Determine whether each of the following operations is binary on \(X\) or not
- (a).
- addition
- (b).
- subtraction
- (c).
- multiplication
- (d).
- division
Solution.
- (a).
- Addition is Not. e.g \(1+1=2\not \in X.\)
- (b).
- Subtraction is Not. e.g \(-1-1=-2\not \in X\).
- (c).
- Multiplication is binary on \(X\).
- (d).
- Division is Not, you cannot divide by zero.
Let the operation \(*\) be defined by \(a*b=2^{a^2+b}\) where \(a,b \in \mathbb {R}\).
- (i).
- Is the operation binary on \(\mathbb {R}\)
- (ii).
- Evaluate \(3*2\)
Solution.
The operation is evidently binary, since if \(a\in \mathbb {R}\) and \(a^2\in \mathbb {R}\) and \(b\in \mathbb {R}\) then \(a^2+b\in \mathbb {R}\) which implies that \(2^{a^2+b}\in \mathbb {R}.\)
\(3*2=2^{3^2+2}=2^{9+2}=2^{11}\)
The binary \(*\) on \(G\) is
- (i).
- commutative if for every pair \(a,b\in G\),
\(a*b=b*a\) - (ii).
- associative if for all \(a,b,c\in G\),
\(a*(b*c)=(a*b)*c\)
Note 5.7. Associativity is what makes the expression \(a*b*c\) meaningful without brackets. If an operation is not associative, \(a*b*c\) is ambiguous and must be bracketed — as the subtraction example below shows, the two readings give different answers.
Commutativity and associativity are independent: an operation can have either without the other. Neither is automatic, and both must be checked rather than assumed. Most operations met in ordinary arithmetic happen to have both, which is why their absence is easy to overlook.
Example 5.8. Let \(G=\mathbb {Z}\) be the set of integers. Both addition and subtraction are binary on \(\mathbb {Z}\).
- (1).
- Are they both commutative?
- (2).
- Are they both associative?
Solution. Write \(a*b=a-b\) for subtraction, so that both operations can be handled the same way.
(1) Commutativity. Addition is commutative on \(\mathbb {Z}\): \(a+b=b+a\) for all integers \(a\) and \(b\). Subtraction is not, and one pair of values settles it: \[7*2=7-2=5,\qquad 2*7=2-7=-5,\] and \(5\neq -5\). So the answer to “are they both commutative” is no — addition is, subtraction is not.
(2) Associativity. Addition is associative on \(\mathbb {Z}\): \((a+b)+c=a+(b+c)\) for all integers. Subtraction is not: \begin {align*} 13*(7*2) & = 13*(7-2) = 13*5 = 13-5 = 8,\\ (13*7)*2 & = (13-7)*2 = 6*2 = 6-2 = 4, \end {align*}
and \(8\neq 4\). So again the answer is no — addition is, subtraction is not.
Note 5.9. Notice the difference between the two halves of each answer. To show an operation fails a law, one pair or triple of values is enough, and the counterexamples above do the whole job. To show an operation satisfies one, no list of examples will do — \(-3+5=5+(-3)\) confirms commutativity for one pair and says nothing about the rest. The properties of \(+\) on \(\mathbb {Z}\) are quoted here as known; where an operation is newly defined, as in the next example, the general case has to be argued with letters.
Let \(a*b\) be a binary operation on the set of integers \(\mathbb {Z}\) defined by \(a*b=a^2b-4\).
Evaluate:
- (i).
- \((1*-3)*2\) and \(1*(-3*2)\)
- (ii).
- Determine whether \(*\) is associative or commutative.
Solution.
(i). Work from the inside out, applying \(a*b=a^{2}b-4\) at each step: \begin {align*} \left (1*(-3)\right )*2 & = \left (1^{2}(-3)-4\right )*2\\ & = (-3-4)*2 = (-7)*2\\ & = (-7)^{2}(2)-4 = 98-4 = 94,\\[4pt] 1*\left ((-3)*2\right ) & = 1*\left ((-3)^{2}(2)-4\right )\\ & = 1*(18-4) = 1*14\\ & = 1^{2}(14)-4 = 10 . \end {align*}
(ii). The two results in (i) already settle associativity: \[\left (1*(-3)\right )*2 = 94 \neq 10 = 1*\left ((-3)*2\right ),\] so \(*\) is not associative. For commutativity one more pair suffices: \[3*5 = 3^{2}(5)-4 = 41,\qquad 5*3 = 5^{2}(3)-4 = 71,\] and \(41\neq 71\), so \(*\) is not commutative either.
An operation \(*\) is defined by \(a*b=a^b\) for \(a,b \in \mathbb {R}\).
- (i).
- Is \(*\) a binary operation on \(\mathbb {R}\).
- (ii).
- Evaluate \((3*-2)*3\)
Solution.
(i). No. To be a binary operation on \(\mathbb {R}\), \(a*b\) must be a real number for every choice of real \(a\) and \(b\), and it is not: \[(-4)*\tfrac {1}{2} = (-4)^{1/2} = \sqrt {-4},\] which is not real. So \(*\) is not closed on \(\mathbb {R}\), and one such pair is enough to show it.
(ii). Working outwards from the bracket, \begin {align*} \left (3*(-2)\right )*3 & = 3^{-2}*3\\ & = \frac {1}{9}*3\\ & = \left (\frac {1}{9}\right )^{3} = \frac {1}{729} . \end {align*}
Note 5.12. Part (ii) has to be bracketed, and the brackets matter. Exponentiation is not associative: \[(3*(-2))*3=\frac {1}{729},\qquad 3*((-2)*3)=3*(-2)^{3}=3^{-8}=\frac {1}{6561},\] which are different numbers. Nor is it commutative — \(2*3=8\) but \(3*2=9\). The familiar rules of arithmetic are properties of particular operations, not guarantees that come free with the notation.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.