# 1.1: Binary operations

- Page ID
- 7419

## Binary operation

#### Definition: *Binary operation*

Let \(S\) be a non-empty set, and \( \star \) said to be a binary operation on \(S\) , if \(a \star b \) is defined for all \(a,b \in S\). In other words, \( \star\) is a rule for any two elements in the set \(S\).

#### Example \(\PageIndex{1}\): Binary operations

The following are binary operations on \(\mathbb{Z}\):

- The arithmetic operations, addition \(+\) , subtraction \(-\), multiplication \( \times \) , and division \(\div \).
- Define an operation oplus on \(\mathbb{Z}\) by \(a \oplus b =ab+a+b, \forall a,b \in\mathbb{Z}\).
- Define an operation ominus on \(\mathbb{Z}\) by \(a \ominus b =ab+a-b, \forall a,b \in\mathbb{Z}\).
- Define an operation otimes on \(\mathbb{Z}\) by \(a \otimes b =(a+b)(a+b), \forall a,b \in\mathbb{Z}\).
- Define an operation oslash on \(\mathbb{Z}\) by \(a \oslash b =(a+b)(a-b), \forall a,b \in\mathbb{Z} \).
- Define an operation min on \(\mathbb{Z}\) by \(a \vee b =\min \{a,b\}, \forall a,b \in\mathbb{Z}\).
- Define an operation max on \(\mathbb{Z}\) by \(a \wedge b =\max \{a,b\}, \forall a,b \in\mathbb{Z}\).
- Define an operation defect on \(\mathbb{Z}\) by \(a \ast_3 b = a+b-3, \forall a,b \in\mathbb{Z}\).

Lets explore the binary operations, before we proceed:

Example \(\PageIndex{2}\):

- \(2 \oplus 3=(2)(3)+2+3=11\).
- \(2 \otimes 3=(2+3)(2+3)=25\) .
- \(2 \oslash 3=(2+3)(2-3)=-5\).
- \(2 \ominus 3=(2)(3)+2-3=5\).
- \(2 \vee 3= 2\).
- \(2 \wedge 3 =3\).

Exercise \(\PageIndex{2}\)

- \(-2 \oplus 3\).
- \(-2 \otimes 3\) .
- \(-2 \oslash 3\).
- \(-2 \ominus 3\).
- \(-2 \vee 3\).
- \(-2 \wedge 3 \).

**Answer**-
-5, 1,5,-2,3

### Properties:

#### Closure property

Definition : Closure property

Let \(S\) be a non-empty set. A binary operation \( \star \) on \(S\) is said to be a closed binary operation on \(S\) , if \(a \star b \in S, \forall a, b \in S\).

Below we shall give some examples of closed binary operations, that will be further explored in class.

##### Example \(\PageIndex{3}\): Closed binary operations

The following are closed binary operations on \(\mathbb{Z}\).

- The addition \(+\) , subtraction \(-\), and multiplication \( \times \).
- Define an operation oplus on \(\mathbb{Z}\) by \(a \oplus b =ab+a+b, \forall a,b \in\mathbb{Z}\).
- Define an operation ominus on \(\mathbb{Z}\) by \(a \ominus b =ab+a-b, \forall a,b \in\mathbb{Z}\).
- Define an operation otimes on \(\mathbb{Z}\) by \(a \otimes b =(a+b)(a+b), \forall a,b \in\mathbb{Z}\).
- Define an operation oslash on \(\mathbb{Z}\) by \(a \oslash b =(a+b)(a-b), \forall a,b \in\mathbb{Z} \).
- Define an operation min on \(\mathbb{Z}\) by \(a \vee b =\min \{a,b\}, \forall a,b \in\mathbb{Z}\).
- Define an operation max on \(\mathbb{Z}\) by \(a \wedge b =\max \{a,b\}, \forall a,b \in\mathbb{Z}\).
- Define an operation defect on \(\mathbb{Z}\) by \(a \ast_3 b = a+b-3, \forall a,b \in\mathbb{Z}\).

Exercise \(\PageIndex{1}\)

Determine whether the operation ominus on \(\mathbb{Z_+}\) is closed?

**Answer**-
The operation ominus on \(\mathbb{Z_+}\) is closed.

##### Example \(\PageIndex{4}\): Counter Example

Division (\( \div \) ) is not a closed binary operations on \(\mathbb{Z}\).

\( 2, 3 \in \mathbb{Z} \) but \( \frac{2}{3} \notin \mathbb{Z} \).

##### Summary of arithmetic operations and corresponding sets:

\(+\) | \(\times\) | \(-\) | \(\div\) | |

\(\mathbb{Z_+}\) | closed | closed | not closed | not closed |

\(\mathbb{Z}\) | closed | closed | closed | not closed |

\(\mathbb{Q}\) | closed | closed | closed | closed (only when \(0\) is not included) |

\(\mathbb{R}\) | closed | closed | closed | closed (only when \(0\) is not included) |

#### Associative property

Definition: Associative property

Let \(S\) be a subset of \(\mathbb{Z}\). A binary operation \( \star \) on \(S\) is said to be associative , if \( (a \star b) \star c = a \star (b \star c) , \forall a, b,c \in S\).

**You don't need to prove them!**).

Below is an example of proof when the statement is True.

##### Example \(\PageIndex{5}\): Associative

Determine whether the binary operation oplus is associative on \(\mathbb{Z}\).

We shall show that the binary operation oplus is associative on \(\mathbb{Z}\).

**Proof:**-
Let \(a,b,c \in \mathbb{Z}\). Then consider, \((a \oplus b) \oplus c = (ab+a+b) \oplus c = (ab+a+b)c+(ab+a+b)+c= (ab)c+ac+bc+ab+a+b+c\).

On the other hand, \(a \oplus (b \oplus c)=a \oplus (bc+b+c)= a(bc+b+c)+a+(bc+b+c)=a(bc)+ab+ac+a+bc+b+c. \)

Since multiplication is associative on \(\mathbb{Z}\), \((a \oplus b) \oplus c =a \oplus (b \oplus c). \)

Thus, the binary operation oplus is associative on \(\mathbb{Z}\). \( \Box\)

Below is an example of how to disprove when a statement is False.

##### Example \(\PageIndex{6}\): Not Associative

Determine whether the binary operation subtraction (\( -\)) is associative on \(\mathbb{Z}\).

Answer: The binary operation subtraction (\( -\)) is not associative on \(\mathbb{Z}\).

**Counter Example****:**-
Choose \( a=2,b=3, c=4,\) then \((2-3)-4=-1-4=-5 \), but \(2-(3-4)=2-(-1)=2+1=3\).

Hence the binary operation subtraction (\( -\)) is not associative on \(\mathbb{Z}\).

#### Commutative property

Definition: Commutative property

Let \(S\) be a non-empty set. A binary operation \( \star \) on \(S\) is said to be commutative, if \( a \star b = b \star a,\forall a, b \in S\).

We shall assume the fact that the addition (\(+\)) and the multiplication( \( \times \)) are commutative on \(\mathbb{Z_+}\). (**You don't need to prove them!**).

Below is the proof of subtraction (\( -\)) NOT being commutative.

#### Example \(\PageIndex{7}\): NOT Commutative

Determine whether the binary operation subtraction \( -\) is commutative on \(\mathbb{Z}\).

**Counter Example****:**-
Choose \(a=3\) and \(b=4\).

Then \(a-b=3-4=-1\), and \(b-a= 4-3=1\).

Hence the binary operation subtraction \( -\) is not commutative on \(\mathbb{Z}\).

#### Example \(\PageIndex{8}\): Commutative

Determine whether the binary operation oplus is commutative on \(\mathbb{Z}\).

We shall show that the binary operation oplus is commutative on \(\mathbb{Z}\).

**Proof:**-
Let \(a,b \in \mathbb{Z}\).

Then consider, \((a \oplus b) = (ab+a+b).\)

On the other hand, \( (b \oplus a) = ba+b+a. \)

Since multiplication is associative on \(\mathbb{Z}\), \((a \oplus b) = (b \oplus a). \)

Thus, the binary operation oplus is commutative on \(\mathbb{Z}\). \( \Box\)

#### Identity

Definition: Identity

A non-empty set \(S\) with binary operation \( \star \), is said to have an identity \(e \in S\), if \( e \star a=a\star e=a, \forall a \in S.\)

Note that \(0\) is called additive identity on \(( \mathbb{Z}, +)\), and \(1\) is called multiplicative identity on \(( \mathbb{Z}, \times )\).

#### Example \(\PageIndex{9}\): Is identity unique?

Let \(S\) be a non-empty set and let \(\star\) be a binary operation on \(S\). If \(e_1\) and \(e_2\) are two identities in \((S,\star) \) , then \(e_1=e_2\).

**Proof: **

Suppose that \(e_1\) and \(e_2\) are two identities in \((S,\star) \).

Then \(e_1=e_1 \star e_2=e_2.\)

Hence identity is unique. \( \Box\)

#### Example \(\PageIndex{10}\): Identity

Does \(( \mathbb{Z}, \oplus )\) have an identity?

**Answer:**-
Let \(e\) be the identity on \(( \mathbb{Z}, \oplus )\).

Then \( e \oplus a=a\oplus e=a, \forall a \in \mathbb{Z}.\)

Thus \(ea+e+a=a\), and \(ae+a+e=a\) \(\forall a \in \mathbb{Z}.\)

Since \(ea+e+a=a\) \(\forall a \in \mathbb{Z},\) \(ea+e=0 \implies e(a+1)=0\) \(\forall a \in \mathbb{Z}.\)

Therefore \(e=0\).

Now \( 0 \oplus a=a\oplus 0=a, \forall a \in \mathbb{Z}.\)

Hence \(0\) is the identity on \(( \mathbb{Z}, \oplus )\).

#### Example \(\PageIndex{11}\):

Does \(( \mathbb{Z}, \otimes )\) have an identity?

**Answer:**-
Let \(e\) be the identity on \(( \mathbb{Z}, \otimes )\).

Then \( e \otimes a=a \otimes e=a, \forall a \in \mathbb{Z}.\)

Thus \((e+a)(e+a)=(a+e)(a+e) =a, \forall a \in \mathbb{Z}.\)

Now, \( (a+e)(a+e) =a,\forall a \in \mathbb{Z}.\)

\(\implies a^2+2ea+e^2=a,\forall a \in \mathbb{Z}.\)

Choose \(a=0\) then \(e=0\).

If \(e=0\) then \( a^2=a,\forall a \in \mathbb{Z}.\)

This is a contradiction.

Hence, \(( \mathbb{Z}, \otimes )\) has no identity.

#### Distributive Property

Definition: Distributive property

Let \(S\) be a non-empty set. Let \(\star_1\) and \( \star_2\) be two different binary operations on \(S\).

Then \(\star_1\) is said to be distributive over \( \star_2\) on \(S \) if \( a \star_1 (b \star_2 c)= (a\star_1 b) \star_2 (a \star_1 c), \forall a,b,c,\in S \).

Note that the multiplication distributes over the addition on \(\mathbb{Z}.\) That is, \(4(10+6)=(4)(10)+(4)(6)=40+24=64\).

Further, we extend to \( (a+b)(c+d) =(ac+ad+bc+bd\) (FOIL).

F-First

O-Outer

I-Inner

L-Last

This property is very useful to find \((26)(27)\) as shown below:

#### Example \(\PageIndex{12}\): Find \((26)(27)\)

20 | 6 | |
---|---|---|

20 | 400 | 120 |

7 | 140 | 42 |

Hence \((26)(27) =400+120+140+42=702\).

Let's play a game!

#### Example \(\PageIndex{13}\):

Does multiplication distribute over subtraction?

#### Example \(\PageIndex{14}\):

Does division distribute over addition ?

**Answer:**-
**Counter Example:**Choose a = 2, b = 3, c = 4.

Then a \( \div \)(b + c) = 2\(\div\)(3+4)

= 2 \(\div\) 7.

= \(\frac{2}{7}\).

and (a \(\div\) b) + (a \(\div\) c) = \(\frac{2}{3}\) + \(\frac{2}{4}\).

= \(\frac{7}{6}\).

Since \(\frac{2}{7}\) ≠ \(\frac{7}{6}\), the binary operation \(\div\) is not distributive over +.

#### Example \(\PageIndex{15}\):

Does \( \otimes\) distribute over \(\oplus\) on \(\mathbb{Z}\) ?

**Answer:**-
**Counter Example:**Choose a = 2, b = 3, c = 4.

Then 2\(\otimes \)(3\(\oplus \)4) = 2\(\otimes \)[(3)(4)+3+4]

= 2\(\otimes \)19

= (2+19)(2+19)

= 441

and (2\(\otimes \)3)\(\oplus \)(2\(\otimes \)4)=[(2+3)(2+3)]\(\oplus \)[(2+4)(2+4)]

= 25\(\oplus \)36

= (25)(36)+25+36

= 961.

Since 441 ≠ 961, the binary operation \( \otimes\) is not distributive over \(\oplus \) on \(\mathbb{Z}\).

#### Summary

In this section, we have learned the following for a non-empty set \(S\):

- Binary operation,
- Closure property,
- Associative property,
- Commutative property,
- Distributive property, and
- Identity.