Wednesday, 1 May 2013

Relations and Functions


Trivial Relations
  • Trivial relations are of two types:
    • Empty relation
    • Universal relation
  • A relation in a set A is called an empty relation if no element of A is related to any element of A, i.e., R = Φ ⊂ A × A.
    • For example: Consider a relation R in set A = {2, 4, 6} defined by R = {(ab): a + b is odd, where ab ∈ A}. The relation R is an empty relation since for any pair (ab) ∈ A × Ab is always even.
  • A relation R in a set A is called a universal relation if each element of A is related to every element of A, i.e., R = A × A.
    • For example: Let A be the set of all students of class XI. Let R be a relation in set A defined by R = {(ab): the sum of the ages of a and b is greater than 10 years}
The relation R is a universal relation because it is obvious that the sum of the ages of two students of class XI is always greater than 10 years.
Equivalence Relation
  • A relation R in a set A is called reflexive if (aa) ∈ R for every a ∈ A.
    • For example: A relation R in set A defined by R = {sin a = sin bab ∈ A} is a reflexive relation since.
  • A relation R in a set A is called symmetric if (a1a2) ∈ R implies that (a2a1) ∈ R, for all a1a2 ∈A.
    • For example: A relation in the set defined by R = {sin a = sin bab ∈ A} is a symmetric relation. Since for ab ∈ A, sin a = sin b implies sin b = sin a. So, (ab) ∈ R ⇒ (b, a) ∈ R.
  • A relation R in a set A is called transitive if (a1a2) ∈ R, and (a2a3) ∈ R together imply that (a1,a3) ∈ R, for all a1a2a3 ∈ A.
    • For example: A relation in the set defined by R = {sin a = sin bab ∈ A} is a transitive relation. Since for abc ∈ A, let (ab), (bc) ∈ R.

                          ⇒ sin a = sin b and sin b = sin c
                          ⇒ sin a = sin c
                          ⇒ (ac) ∈ R
  • A relation R in a set A is said to be an equivalence relation if R is reflexive, symmetric and transitive.
    • For example: Relation R in the setdefined by R = {sin = sin bab ∈ A} is an equivalence relation.
  • To understand the concept of equivalence relation in a better way, let’s have a look at the following video.
Equivalence Classes
  • Every arbitrary equivalence relation R in a set X divides X into mutually disjoint subsets (Ai) called partitions or subdivisions of X satisfying the following conditions:
    • All elements of Ai are related to each other for all i
    • No element of Ai is related to any element of Aj whenever i ≠ j
    • A∪ Aj = X and Ai ∩ Aj = Φ, i ≠ j
                     These subsets (Ai) are called equivalence classes.
  • For an equivalence relation in a set X, the equivalence class containing a ∈ X, denoted by [a], is the subset of X containing all elements b related to a.
Solved Examples
Example 1
Check whether the relation R in the set of all vowels defined by R = {(uu), (ua), (au)} is reflexive, symmetric or transitive?
Solution:
The relation R is defined in the set {aeiou} as R = {(uu), (ua), (au)}.
The relation R is not reflexive as (aa), (ee) (ii), (oo) ∉ R.
Now, (ua) and (au) ∈ R
Hence, R is symmetric.
Now, (uu) (ua) ∈ R implies (ua) ∈ R
Also, (ua), (au) ∈ R implies (uu) ∈ R
Hence, R is transitive.
Thus, the relation R is symmetric and transitive but not reflexive.
Example 2
Show that the relation R defined in the set of real numbers as R = {(abb or a = −b for ab ∈R} is an equivalence relation. Also, find its equivalence classes.
Solution:
A relation R in R is defined as R = {(ab): a = b or a = −b, for ab ∈ R}
Clearly, (aa) ∈ R for every a ∈ R, since a = a.
∴ R is reflexive
Now, let (ab) ∈ R for ab ∈ R
⇒ a = b or a = − b
⇒ b = a or b = − a
⇒ (ba) ∈ R
∴ R is symmetric
Now, let (ab), (bc) ∈ R, for abc ∈ R
∴ a = b or = − b and b = c or = − c
Case I
a = bb = c
⇒ a = c
⇒ (ac) ∈ R
Case II
a = bb = − c
⇒ a = − c
⇒ (ac) ∈ R
Case III
= − bb = c
⇒ a = − c
⇒ (ac) ∈ R
Case IV
a = − bb = − c
⇒ a = c
⇒ (ac) ∈ R
Thus, (ab), (bc) ∈ R ⇒ (ac) ∈ R
∴ R is transitive.
Hence, R is an equivalence relation.
Equivalence class of 0 = [0] = {0}
Equivalence class of 1 = [1] = {1, − 1}
Equivalence class of 2 = [2] = {2, − 2} and so on…
There are an infinite number of equivalence classes.
For every a ∈ R, [a] = {a, − a}.


Example :
Show that the relation ‘congruence module m’ on the set Z+ of all positive integers is an equivalence relation.
 
Reflexive:
Let a be an arbitrary positive integer.
⇒ a − a is divisible by m
⇒ a ≡ a (mod m) for all a ∈ Z+.
Symmetric:
Let ab ∈ Zsuch that a ≡ (mod m)
⇒ a − b is divisible by m
⇒ a − b = λ m, for an integer λ
⇒ b − a = −λ m
⇒ b ≡ a (mod m) for all a, b ∈ Z+.
Transitive:
Let abc ∈ Z+ such that a ≡ b (mod m) and b ≡ c (mod m)
⇒ a − k m and b − c = l m for integers kl.
⇒ a − b + b − c = (k + lm
⇒ a − c = (k + lm
⇒ a ≡ c (mod m), as (k + l) is also an integer.
Thus, the relation congruence module m is an equivalence relation on all positive integers as it is reflexive, symmetric and transitive.


Example :
Show that a relation R on the set of all non-zero complex numbers defined by z1 R z2 iff  is real is a transitive relation.
 
Let z1 = a + ibz2 = c + idz3 = e + if be any three complex numbers, where ebcdef are real.
z1 R z2 iff  is real
⇒ Iff  is real
⇒ Iff  is real
⇒ Iff  is real
⇒ Iff 
Now,  and 
When cd ≠ 0⇒ z1 R z3
And when cd = 0 the transitivity is obvious.
Hence, R is transitive relation.

  • A function fX → Y is said to be one-one (or injective) if the images of distinct elements of Xunder f are distinct. In other words, a function f is one-one if for every x1x2 ∈ X(x1) = f (x2) implies x1 = x2.
             An example of a one-one function from X to Y is shown in the following diagram.
A function fX → Y is said to be many-one if the image of distinct elements of X under f are not distinct i.e., a function that is not one-one is called a many-one function.
An example of a many-one function from X to Y is shown in the following diagram.
In this case, two elements f(d) = f(e) = s.
  • A function fX → Y is defined as onto (or surjective) if every element of Y is the image of some element of x in X under f. In other words, f is onto if &mnForE; y ∈ Y, there exist ∈ Xsuch that (x) = y.
    • fX → Y is onto if and only if the range of f = Y.
    • An example of an onto function from X to Y is shown in the following diagram.
  • A function from X to Y that is not onto is shown in the following diagram.
  • A function fX → Y is said to be bijective if it is both one-one and onto.
             A bijective function from X to Y is shown in the following diagram.
  • Let us have a look at the following video to understand the different types of functions:
Solved Examples
Example 1
Check whether the function hR → defined by h(x) =  is an injective function.
Solution:
The given function i.e., hR → isdefined by
h(x) = 
It can be observed that 5, 0 ∈ (considering domain). Hence, we have
h(5) = 
h(0) = 
h(5) = h(0).
Hence, the given function i.e., h(x) is not an injective function.
Example 2
Check whether the function fR → defined by f(x) = x5 + 4 is a bijective function.
Solution:
We know that a function is bijective if it is both one-one and onto.
Now, let x1x2 ∈ R such that (x1) = f (x2). Accordingly,
(x1) = f (x2)
Therefore, the function f is a one-one function.
It is clear that for every ∈ R, there exists ∈ R such that
Therefore, the function f is an onto function.
Hence, the given function f is a bijective function.
Example 3
Check whether the function fN → N defined by f(x) = 4x is an onto function.
Solution:
The given function fN → N is defined by
f(x) = 4x
We can clearly observe that 2 ∈ N (codomain). However, there does not exist any element y ∈ N(domain) whose image is 2.
Hence, the given function f is not an onto function.


Example :
If f: A→B is a mapping defined by f(x) = , where A = R − {4} and B = R − {1} then show that is bijective.
 
Injective:
Let xy be any two elements of A.
Thus, f is an injective mapping.
Surjective:
Let y be any element of B.
If  then 3 = 4, which is not possible
Thus, every element y in B has its pre-image x in A, where x = 
Thus, f is a surjective mapping.
Hence, f is a bijective mapping.


Example :
Show that the function f : R→R defined by  is onto for every 
 
Let the function f : R→R is an onto function.
∴ Range of f = R
⇒  assumes all real values for real values of x
Let y = 
Thus, f : R→R is onto for a ∈ [2, 14].
  • Let fA → B and gB → C be two functions. Accordingly, the composition of f and g is denoted by gof and is defined as the function gof: A → C given by gof(x) = g(f(x)), for all x∈A.
  • For example: If fN → N is defined by f(x) = x + 1 for all xN and gN → N is defined by g(x) = x2for all xN, then gof : N → N is given by
            gof(x) = g(f(x)) = g(x + 1) = (x + 1)2, where xN.
            Also, fog(x) = f(g(x)) = f(x2) = x2 + 1 for all xN
  • If fA → B and gB → C are one-one, then gofA → C is also one-one.
  • To know the proof of this result, look at the following video.
  • If fA → B and gB → C are onto, then gofA → C is also onto.
  • To know the proof of this result, look at the following video.
  • If the composite function gof is one-one, then the function f is also one-one. However, the function g may or may not be one-one.
  • If the composite function gof is onto, then the function g is also onto. However, the function f may or may not be onto.
Solved Examples
Example 1
Let fR → R be given by f(x) = 12x2 − x − 11 and gR → R be given by g(x) = x2. Find fo(gog).
Solution:
It is given that
fR → R is defined by f(x) = 12x2 − x − 11
gR → R is defined by g(x) = x2
Now, (gog) (x) = g(g(x))
g(x2)
= (x2)2 = x4
(fo(gog))(x) = f((gog)(x))
f(x4)
= 12(x4)2 = x4 − 11
= 12x8 − x4 − 11
Example 2
Let fR −  → R −  be defined by and gR − → R − be defined by g(x) =. Show that fog = IA and gof = IB, where IA and IB are identity functions on A and B respectively and A = R −  and B = R −.
Solution:
(fog)(x) = f(g(x))
(gof)(x) = g(f(x))
Thus, (fog)(x) = for all ∈ A ⇒ fog = IA and (gof) (x) = for all ∈ B ⇒ gof = IB.
Hence, proved.
Example 3
Let fR → R be defined as f(x) =gR → R be defined as g(x) = x + 2 and hR → R be defined as h(x) = 4x + 9. Find fo(g + h) and (fog) + (foh).
Solution:
(g + h): R → R is given by:
(g + h)(x) = g(x) + h(x)
= (x + 2) + (4x + 9) = 5x + 11
∴ (fo(g + h)) (x) = f((g + h) (x))
f(5x + 11)
Now, (fog)(x) = f(g(x))
f(x + 2) = 
(foh)(x) = f(h(x))
f(4x + 9)
∴(fog + foh) (x) = (fog)(x) + (foh)(x)


Example :
then find gof(x).
 


Example :
Find the value of gof(x) if.
 

Key Concepts
  • A function fX → Y is said to be invertible if there exists a function gY→ X such that gof = IXand fog = IY.
    • The function g is called the inverse of f and it is denoted by f−1.
  • A function f is invertible if and only if f is one-one and onto.
  • If fX → and gY → are invertible functions, then gof is also invertible and (gof)−1 = f−1 og−1
  • To understand the proof of the above mentioned result, related to the inverse of a composite function, let’s look at the following video.
Solved Examples
Example 1
Determine whether the following functions have inverse or not. Find the inverse, if it exists.
(i) f : {10, 12, 15} → {3, 7, 9, 10, 14}is defined as f = {(12, 9), (15, 7), (10, 10)}.
(ii) g : {2, 4, 6, 8} → {1, 3, 5} is defined as g : {(4, 3), (8, 3), (2, 1), (6, 5)}.
(iii) h : {11, 16}→ {7, 14} is defined as h :{(11, 7), (16, 14)}.
Solution:
(i) The given function f is one-one. However, f is not onto since the elements 3, 14 ∈ {3, 7, 9, 10, 14} are not the image of any element in {10, 12, 15} under f.
Hence, function f is not invertible.
(ii) The given function g is onto. However, g is not one-one since, g(4) = g(8) = 3.
Hence, the function g is not invertible.
(iii) Clearly, the given function h is both one-one and onto. Hence, h is invertible.
The inverse of h is given by h−1 = {(7, 11), (14, 16)}.
Example 2
Determine whether the functions f and g, defined below, are inverses of each other or not.
f : R − {4} → − {−3} is given as , and
gR − {−3} → R − {4} is given as 
Solution:
We have 
Thus,  where B = R −{−3} and A = R −{4}.
gof IA and fog = IB.
Thus, functions and g are the inverses of each other.
Example 3
Let fR→ [−3, ∞) be defined as f (x) = 4x2 − 5x − 3 where Ris the set of all positive real numbers. Show that f is invertible and find the inverse of f.
Solution:
fR→ [−3, ∞) is defined as (x) = 4x2 − 5x − 3.
Let y be an arbitrary element of [−3, ∞).
Let y = 4x2 − 5x − 3
f is onto.
Hence, Range f = [−3, ∞).
Let us define g: [−3, ∞) → R+ as
Now, we have
Thus, f is invertible and its inverse is given by


Example :
Show that f is invertible function if f : R→R is defined by f(x) = (x + 2)2 − 4, x ≥ −2.
 
Injectivity:
For any xy ∈ R such that x ≥ −2, ≥ −2
So, f(x) is injective.
Surjectivity:
For all y ≥ −2 there exists x such that f(x) = y.
So, f(x) is surjective.
Hence, is a bijective function and thus, f is invertible.


Example :
Find the inverse of the function.
 
f : x → is invertible if it is both one-one and onto.
One-one :
For f(x) to be onto, Y = [0, 4]
∴ f1(x) will exist and domain of f1 = y and range of fX.

Definition and Properties
  • A binary operation * on a set A is a function * from A × A → A. We denote *(a, b) by a * b.
For example, the operation * defined on N as a * b = a2b is a binary operation since * carries each pair (a, b) to a unique    element a2b in N.
  • A binary operation * on a set A is called commutative, if a * b = b * a, for every a, b ∈ A.
 For example, *: R × R → R defined by a * b = 11 (a + b + ab) is commutative since a * b = 11(a + b + ab) and b * a = 11(b + a +  ba) and therefore, a * b = b * a
  • A binary operation * on a set A is called associative, if (a * b) * c = a * (b * c), &mnForE ab∈ A.
For example, *: N × N → N defined by a * b = 5 + a + b is associative since
a * (b * c) = 10 + a + b + c = 5 + (5+ a + b) + c = ((a * b) * c
  • For a binary operation *: A × A → A, an element ∈ A, if it exists, is called its identity element, if a *e = a = e * a &mnForE ∈ A.
For example: 1 is the identity for multiplication on R.
  • Given a binary operation *: A × A → A with the identity element e in A, an element ∈ A is said to be invertible with respect to the operation *, if there exists an element bA, such that a * b = e = b *a, and b is called the inverse of a and is denoted by −1.
For example: −a is the inverse of a for the addition operation on R,where 0 is the identity element.

Binary Operation Table
  • When the number of elements in set A is small, we can express a binary operation * on A through a table called operation table.
  • For an operation *: A × A → A, if A = {a1a2… an}, then the operation table will have n rows and ncolumns with (ij)th entry being ai * aj.
  • Given any operation with n rows and n columns with each entry being an element of A = {a1a2 …an}, we can define a binary operation * on A given by ai aj = entry in ith row and jth column of the operation table
Example: We can define a binary operation * on A = {a, b, c} as follows:
*
a
b
c
a
a
b
c
b
b
a
c
c
c
c
c
Here, * b = b = b * a
a * c = c = c * a
b * c = c = c * b
∴ The operation * is commutative.
To understand this concept better, let us look at the following video.

 
Solved Examples
Example 1:
A binary operation A × A → A, where A = {a, b, c}, is defined as follows:
*
a
b
c
a
a
a
a
b
a
b
c
c
a
c
b
Determine whether the operation * is commutative and associative. Also, find the identity for the operation *, if it exists.
Solution:
From the table, it can be observed that
*= a = b * a
* c = a = c * a 
* c = c = c * b
The given binary operation * is commutative since for all x, y, ∈ A = {a, b, c},
x * y = y * x
Now, consider a * (* c) = a * c = a
(a * b) * c = a * c = a
Thus, a * (* c) = (a * b) * c
Similarly, we can prove that (x * y) * x *(y * z) for all xyz ∈ A.
Thus, the given binary operation * is associative.
Also, we can observe that for any element xA, we have x * a = x = a * x
Thus, a is the identity element for the given binary operation *.
Example 2:
Determine whether the binary operation on the set R, defined by a * b = ab ∈ R, is commutative or not.
Solution:
We have *: R × R → R defined by ab ∈ R.
We know that a binary operation * defined on set A is commutative, if a * b = b * a &mnForE a, b ∈A.
Now, a * b =  and b * a = 
∴ a * b ≠ b * a
Hence, the given binary operation * is not commutative.
Example 3:
A binary operation * on the set {5, 6, 9} is defined by the following table:
*
5
6
9
5
5
6
9
6
6
9
5
9
9
5
6
Compute (5 * 9) * 6 and 5 * (9 * 6). Are they equal?
Solution:
From the given binary operation table, we have (5 * 9) = 9
∴(5 * 9) * 6 = 9 * 6 = 5
Then, (9 * 6) = 5
∴5 * (9 * 6) = 5 * 5 = 5
Thus, (5 * 9) * 6 = 5 * (9 * 6)


Example :
What is the total number of non-commutative binary operations on a finite set S having 10 elements?
 
A binary operation on set S with n elements is a function from S × S to S.
∴ Total number of binary operations on S = 
Total number of commutative binary operations on S = 
∴ Total number of non-commutative binary operations on S = 


Example :
If * is a binary operation on the set Q+ of all positive rational numbers such that a * b =  for all a,b ∈ Q+, find the identity and inverse.
 
Identity element:
Let e be the identity element in Qwith respect to *.
∴ 4 is the identity element for * in Q+.
Inverse element:
Let b be the inverse of a ∈ Q+.
∴ a * e = b * a
Thus, for every element a ∈ Q+ has  is its inverse.


Example :
Show that * is commutative and associative on the set N of all natural numbers defined by m * n = l.c.m. (mn) for all mn ∈ N.
 
Commutative:
For all mn ∈ N
m * n = l.c.m. (mn)
= l.c.m. (nm)
n * m.
So, * is commutative on N.
Associative:
For all mnp ∈ N
(m * n) * p = {l.c.m. (mn)}* p
= l.c.m. {l.c.m. (mn), p}
= l.c.m. {m, l.c.m. (np)}
= l.c.m. (mn * p)
m * (n * p)
So, * is associative on N.