DM2021 Binary Operations
DM2021 Binary Operations
(x, y) ∈ Z × Z and x × y ∈ Z
We write *: Z × Z → Z; (x, y) → x × y
Binary Operations
Take the addition operation
on the set of integers, Z =
{0, ±1, ±2, ±3,…}:
x = +3 and y = -4
x + y = +3 + (-4) = -1∈ Z
(x, y) ∈ Z × Z and x + y ∈ Z
We write *: Z × Z → Z; (x, y) → x × y
Binary Operation:
: (x, y ) → f(x, y)
That is a calculation that combines two elements
of the set (called operands) to produce another
element of the set. It maps elements of the
Cartesian product A × A into A itself. i.e. f: A × A
→ A. We call the operation multiplication!
Binary Operation notation
• x * y = x + 2y + 3
• x * y = 1 + xy
• x * y = 3x + y
or even
• x*y=x+y
Binary Operation Examples
Binary Operations Examples
Binary Operations Examples
Are these binary operations?
Given a, b ∈ Z. Consider the operations *: Z × Z → Z
as follows:
1. a*b=a+b–1
2. a * b = 1 – 2ab
3. a * b = a/b
4. a * b = a/b on Z \{0}
5. For a, b ∈ A, a * b = a + b where A is the set A
= {1, 2, 3, 4}.
Example: Closure
Binary
Operati
on
Some interesting questions?
Binary
Operati
on
Addition: +: R × R → R; (x, y) → x + y
Multiplication:*: R × R → R; (x, y)→ x × y
Multiplication:*: R × R → R; (x, y)→ x × y
Subtraction: *: R × R → R; (x, y) → x - y
Subtraction: *: R × R → R; (x, y) → x - y
Division: *: R\{0} × R\{0} → R\{0}; (x, y) → x / y
Division: *: R\{0} × R\{0} → R\{0}; (x, y) → x / y
Define an identity element for a binary operation.
Identity Element
Binary
Operati
on
The Identity Element is Unique
Binary
Operati
on
Identity Element
Is there an identity element for
this binary operation?
• Let * be the binary operation on S * 1 -1 i -i
by a * b = a x b. -1 -1 1 -i i
i i -i -1 1
• Is there an identity element for *? -i -i i 1 -1
Identity Element
• For the set Z, the integer 1 is an identity w. r. t.
“”, but not w. r. t. “+”.
• The number 0 is an identity w. r. t. “+”.
• Let “” be the operation defined on Z, x y = x
+ y 1. Then is there an identity?
Binary
Operati
on
Identity Element
Binary
Operati
on
Let “∆” be the operation defined on Z, x ∆ y = 1 + xy.
Then the operation has no identity element in Z
Binary
Operati
on
SOLUTION
Let “∆” be the operation defined on Z, x ∆ y = 1 + xy.
Then the operation has no identity element in Z.
SOLUTION
Assume there is an identity element e, then
x ∆ e = 1 + xe = x
⇒ xe = x - 1
⇒ e = (x – 1)/x = 1 - 1/x ∉ Z
Binary
Operati
on
A binary operation which is NOT commutative?
A binary operation which is NOT associative?
Explanation
Using a table to represent a Binary operation
Binary
Operati
on
SOLUTION
Binary
Operati
on
Show: x y = x + 2y. This operation is neither
commutative, nor associative.
Binary
Operati
on
Show: x y = x + 2y. This operation is neither
commutative, nor associative.
• Commutative:
x * y = x + 2y ≠ y + 2x = y * x
So, it is not commutative.
• Associative:
x * (y * z) = x * (y + 2z)
= x + 2(y + 2z) = x + 2y + 4z
(x * y) * z = (x + 2y) * z = x + 2y + 2z
So, * is not associative Binary
Operati
on
Consider the Binary Operation * as given by…
Hence y = z.
Thus, if x has an inverse, that inverse is unique.
Let * be an associative binary operation on a set A with identity
e. If x has an inverse, show that this inverse is unique.
Binary
Operati
on
2 x 2 Matrices with real coefficients under
component wise addition
Binary
Operati
on
Example – Power Set
• The intersection and union of two subsets of a set A are both
binary operations on the power set of A, P(A).
• If A = {1, 2} what would be the identity element for each of these
operations?
SOLUTION
A= {1, 2} and P(A) = {{}, {1}, {2}, {1, 2}}
• Intersection: ∩: P(A) × P(A) → P(A)
– {1} ∩ {1, 2} = {1} ∈ P(A)
Binary
Operati
on
Symmetric Difference
Symmetric Difference
Does this remind us of the Exclusive OR in
propositional logic?
Given sets A, B and C. Show that ∆ is associative…
Similarly,
Some Past Paper Questions
https://www.youtube.com/watch?v=RkBl7WKzzRw
Given a binary operation x y = x + 2y.This
operation has no identity, thus no inverse.
Try…
x*e=
e*x=
Binary
Operati
on
Given a binary operation x y = x + 2y.This
operation has no identity, thus no inverse.
Consider:
x * e = x + 2e = x ⇒ e = 0
e * x = e + 2x = x ⇒ e = -x
Binary
Operati
on
Question
Question May 2017
a) Commutative:
• 3 * 4 = 3 × 3 + 4 × 4 – 3 × 4 = 25 – 12 = 13
• 4 * 3 = 3 × 4 + 4 × 3 – 4 × 3 = 24 – 12 = 12
So it is not commutative.
b) Identity: If there is an identity e, then n * e = n = e * n ⇒ 3n + 4e – ne = n
then 2n = e(4 – n) and e = 2n/(4 – n). Now for n = 1 e = 2/3 ∉ Z and hence this
operation does not have an identity element. Also 4e + 3n – en = 3e + 4n – ne
So 3n + 4e = 3e + 4n and n = e but the identity is unique so there is no identity.
c) Inverse: Since it does not have an identity, it has no inverses.
Past Paper Question
Questions