Scribe Notes On Functions
Scribe Notes On Functions
Lecture 2 Function
Scribed by: Raghav Dev (2020EEZ8440)
Instructors: Sandeep Kumar and Jayadeva
2.2 Function
Definition 2.2.1 (Function): Let X and Y be two non-empty sets (i.e. X 6= φ and Y 6= φ),
then, we define a rule f from X to Y (denoted as f : X → − Y ), such that, every element x ∈ X, is
mapped uniquely to a element y ∈ Y (denoted as y = f (x)).
Basically function consist of two constituents: (a) Two non-empty sets (say, X and Y ), (b) A
rule to bridge them (say, f ).
Figure 1: (a) Unmapped y3 ∈ Y is allowed in the definition of a function; (b) NOT A FUNCTION:
x3 ∈ X is not mapped to any element in Y ; (c) NOT A FUNCTION: x2 is not mapped uniquely.
1
The only constraint is that f must map every element of X, uniquely to Y . Figure 1 explains
what is NOT a function, since in Fig 1(b) not all the elements in X is mapped to Y , as x3 is not
mapped to any element in Y . In Fig (c), x2 is not uniquely mapped, since it is mapped to y2 and
y3 .
3. Range: The range of the function denoted as R(f ) is defined as set R(f ) = {y ∈ Y : ∃ x ∈
X : y = f (x)}.
Figure 3: (a) Image and pre-image of a object; (b) Image of a set A ∈ X; (c) Pre-image of B ∈ Y .
2
Remarks
• The range of a function is subset of co-domain i.e. R(f ) ⊆ C (f ). (See the Figure 2)
Proof: !
[
(a) Let t ∈ f Ai , then, by definition,
i∈I
( )
[
=⇒ t ∈ y ∈ Y |y = f (x), where, x ∈ Ai , (1)
i∈I
[
=⇒ t ∈ {y ∈ Y |y = f (x), where, x ∈ Ai } , (3)
i∈I
[
=⇒ t ∈ f (Ai ). (4)
i∈I
!
[ [
=⇒ f Ai ⊆ f (Ai ). (5)
i∈I i∈I
3
( )
[ [
Similarly, let p ∈ f (Ai ). from, eq (2), p ∈ y ∈ Y |y = f (x), where, x ∈ Ai , =⇒ p ∈
! i∈I i∈I
[
f Ai ,
i∈I !
[ [
=⇒ f (Ai ) ⊆ f Ai . (6)
i∈I i∈I
!
[ [
Hence, from eqs (5) and (6), f Ai = f (Ai )
! i∈I i∈I
\
(b) Let t ∈ f Ai , then by definition,
i∈I
( )
\
=⇒ t ∈ y ∈ Y | y = f (x), x ∈ Ai , (7)
i∈I
=⇒ t ∈ {y ∈ Y | y = f (x), x ∈ Ai ∀ i ∈ I} , (8)
=⇒ t ∈ {y ∈ Y | y = f (x), x ∈ Ai } , ∀ i ∈ I, (9)
\
=⇒ t ∈ f (Ai ) (10)
i∈I
!
\ \
=⇒ f Ai ⊆ f (Ai ). (11)
i∈I i∈I
!
\
Now, let I = {1, 2}, such that A1 ∩ A2 = φ, =⇒ f Ai = φ. Now let x1 ∈ A1 , x2 ∈
\ i∈I \
A2 , and, f (x1 ) = f (x2 ) = y, =⇒ y ∈ f (Ai ) 6= φ, =⇒ , there may exist elements in f (Ai ),
! ! i∈I i∈I
\ \ \
but not in f Ai , =⇒ f Ai ⊂ f (Ai ). This explanation is shown in Figure 4
i∈I i∈I i∈I
!
\ \
Figure 4: Exemplifying that f Ai 6= f (Ai ).
i∈I i∈I
4
! !
\ \ \ \
Hence, in full generality f Ai 6= f (Ai ). Henceforth, from eq (11), f Ai ⊆ f (Ai )
i∈I i∈I i∈I i∈I
Proof of (c), (d), and (e) is on the same line as (a). Just definition chasing of union and intersection
of sets. It need to be shown LHS is contained in RHS and vice-versa, as in (a).
Examples of function:
− R, y = f (x) = x2
1. f : R →
2. f : R →
− R, y = f (x) = 3x + 5
n
X
3. f : Rn →
− R, f (x) = x2k ; where, x = [x1 , x2 , ..., xn ]T
k=1
√
4. f : R2 →
− C, y = f (a, b) = a + ib, where, i = −1
Remarks
• In examples, 1 and 2 domain and co-domain are same, but, in examples 3 and 4, the domain
is different than co-domain.
1. Injective or one-one function: A function f which have exactly one pre-image of every
element of R(f ) is called injective or one-one or one to one function. In other words,
∀ x1 , x2 ∈ X, f (x1 ) = f (x2 ) =⇒ x1 = x2 .
Example 1: f : R → − R, y = f (x) = 3x + 5 (Proof 1, after the definitions.);
+ √
Example 2: g : R → − R, y = f (x) = x (Proof 2, after the definitions.);
Example 3: NOT an INJECTIVE function: h : R → − R+ , y = g(x) = x2 , because, y = 1 have
two pre-image −1 anad 1.
2. Surjective or onto fucntion: A function f is called surjective or onto if range and co-
domain are same i.e. R(f ) = C (f ). For surjective function f (X) = Y . In other words,
∀ y ∈ Y, ∃ x ∈ X s.t. f (x) = y
Examples: functions f and h are surjective ((Proof 1 and 3, after the definitions.)), but, g is
NOT surjective. Since, in g, −1 ∈ C (g), but , −1 ∈
/ R(g)
5
(a) (b)
Figure 5: Pictorial representation of definition of injective function: (a) An injective function ; (c)
Not an injective function.
(a) (b)
6
Proof 1 (f is a bijective function): Let x1 , x2 ∈ R, such that , x1 6= x2 , =⇒ 3x1 + 5 6=
3x2 + 5 =⇒ f (x1 ) 6= f (x2 ) =⇒ f is injective function. Now, suppose y ∈ C (f ) =⇒ y =
3x + 5 =⇒ x = 13 (y − 5), =⇒ ∃ x ∈ R s.t. y = 3x + 5 ∀ y ∈ R =⇒ f is surjective. Hence, f is
bijective function
√
Proof 2 (g is an injective function): Let x1 , x2 ∈ D(g). Now, if, , g(x1 ) = g(x2 ) =⇒ x1 =
√
x2 =⇒ x1 = x2 (squaring on both side). Hence, g is an injective function
√
Proof 3 (h is a surjective function): Let y ∈ C (h) (i.e.R+ ) =⇒ y = x2 =⇒ x = ± y, =⇒
∃ x ∈ R s.t. y = x2 ∀ y ∈ R+ =⇒ h is surjective
Definition 2.2.4 (Composition of Functions): Let two functions defined as: f : A → B and g :
C → D, such that R(f ) ⊆ C, then, a new function called as composition g ◦ f of functions f and
g is defined as: g ◦ f : A → D : g ◦ f (x) = g(f (x)). The constraint R(f ) ⊆ C have been explained
in Figure 8.
(a) (b)
In general g ◦ f 6= f ◦ g, but it may be equal. Also, in general, one of the f ◦ g and g ◦ f can exist,
and other may not exist. These properties can be proved just by examples. To do it, examples
have been given after definitions 5 and 6. However, if both exists, f ◦ (g ◦ h) = (f ◦ g) ◦ h always
holds. It has been proved after the definitions 2.2.5, and 2.2.6.
7
Definition 2.2.6 (Inverse Function): Let a function f : X → Y , then, a function defined as
f −1 : Y → X, f −1 (y) = {x ∈ X : f (y) = x} is called inverse function. Condition of existence of
f −1 is that, f must be a bijective function and f −1 ◦ F = f ◦ F −1 = IX (x).
Example 1: Let f : R → R, and g : R → R s.t. f (x) = 2x, and g(t) = t2 . Find composite
functions f ◦ g and g ◦ f , and show they are not equal.
Solution: f ◦ g(x) = f (g(x)) = 2x2 clearly, range of g non-negative real is subset of domain of f ,
which is real numbers. Hence, f ◦ g exists.
On the other hand, g ◦ f (x) = g(f (x)) = (2x)2 = 4x2 6= f ◦ g, again, since, range of f is real
number is equal to of domain of g, which is again real numbers, hence, g ◦ f also exists.
Example 2: Let f : R → R, and g : R → R s.t. f (x) = 2x, and g(t) = t. Find composite
functions f ◦ g and g ◦ f , and show they are equal.
Solution: f ◦ g(x) = f (g(x)) = 2x, since, range of g is real and equal to the of domain of f , which
is also real numbers, hence, f ◦ g exists.
Now, g ◦ f (x) = g(f (x)) = 2x = f ◦ g, again, since, range of f is real number is equal to of
domain of g, which is again real numbers, hence, g ◦f also exists. Also, in this example, g ◦f = f ◦g.
√
Example 3: Let f : R → R, and g : R+ → R s.t. f (x) = x, and g(t) = t. Can composite
functions f ◦ g and g ◦ f , be found?
√
Solution: f ◦ g(x) = f (g(x)) = x, since, range of g is real positive and subset of the domain of
f , which is real numbers, hence, f ◦ g exists.
But, since, range of f is real number is superset of domain of g, which is positive real numbers,
hence, g ◦ f cant exist. One example where g ◦ f is not defined is −1 which is in the domain of f .
8
Find f ◦ g and specify how many discontinuities are there.
Solution:
(
1 |g(x)| ≤ 1,
f ◦ g(x) = (14)
0 |g(x)| > 1,
(
1 −1 ≤ g(x) ≤ 1,
=⇒ f ◦ g(x) = (15)
0 −1 > g(x) > 1,
Now, g(x) > 1 =⇒ 2 − x2 > 1 =⇒ −1 < x < 1., Similarly, g(x) < −1 =⇒ 2 − x2 < −1 =⇒
√ √
3 < x < 2 and − 3 > x > −2. This have been plotted in Figure 10.
Figure 9: Function g(x): It can be seen that g(x) > 1 on blue line and corresponding x. In red,
g(x) ≤ 1.
0 |x| < 1,
1 1 ≤ |x| ≤ √3,
=⇒ f ◦ g(x) = √ (16)
0 3 < |x| < 2,
1 |x| ≥ 2,
9
Example 7 Let f , g and h are function from R → R such that
f (x) = x2 − 1,
p
g(x) = x2 + 1, and
(
1 x ≥ 0,
h(x) =
0 x < 0.
Then find the composite function h ◦ f ◦ g and determine whether the function f ◦ g is invertible.
√ √
Solution Since, R(g) = [1, ∞) ⊂ D(f ) = R, f ◦ g(x) = ( x2 + 1)2 − 1 for x2 + 1 ≥ 1. Hence,
f ◦ g(x) = x2 . Clearly, f ◦ g(x) is not an injective function (-1 is not mapped to any x ∈ R), hence
it is NOT invertible. Now, since, f ◦ g(x) ≥ 0 ∀ x ∈ R, h ◦ f ◦ g(x) = 1.
Example 8 The following functions f and g are defined from R → R by the equations given. In
each case where the composite function g ◦ f can be formed, give the domain of g ◦ f and a formula
(or formulas) for g ◦ f (x).
Solution
1: Since, R(f ) = R ⊆ D(g) = R, g ◦ f (x) is defined as g ◦ f (x) = (1 − x)2 + 2(1 − x) =
x2 + 1 − 2x + 2 − 2x = x2 − 4x + 3.
2: Since, R(f ) = R ⊆ D(g) = R, again, constituting g ◦ f possible. It can be constructed as below:
( |1−x|
1−x 1 − x 6= 0,
g ◦ f (x) = (17)
1 1 − x = 0.
( |1−x|
1−x x 6= 1,
=⇒ g ◦ f (x) = (18)
1 x = 1.
3: Again R(f ) = R ⊆ D(g) = R. The composition hence can be defined as below:
(
(2x)2 0 ≤ 2x ≤ 1,
g ◦ f (x) = (19)
1 otherwise.
(
4x2 0 ≤ x ≤ 0.5,
=⇒ g ◦ f (x) = (20)
1 otherwise.
10
Example 9 let f : A → B and g : C → D be functions and let H ⊂ D, then prove (g ◦ f )−1 (H) =
f −1 (g −1 (H)).
Solution
g −1 (H) = {c ∈ C| g(c) ∈ H}, (21)
Definition 2.3.3 (Infinite set): A set is called infinite set if, it is non-empty and there is no
bijection possible with Jn for any finite n.
Example: N is an infinite set. Since, for any bijection f : N → Jn , ∃ n + 1 ∈ N, ∀ n.
Definition 2.3.4 (Countably Infinite and Uncountable set): An infinite set is called count-
ably infinite set if there exist a bijection between N and the set. Examples: Z, collection of even
numbers, rational numbers,
11
On the other hand, an infinite set is called as uncountable if bijection between N and the set is
not possible.
Properties of Numerical Equivalence: If A, B, and C are three sets, then, followings holds:
1. A ≈ B, B ≈ C =⇒ A ≈ C
2. A ≈ B =⇒ B ≈ A
Theorem 2.3.1: Let two finite sets A and B such that A ⊂ B, then there is no bijection between
A and B. (Proper subset of a finite set can not be numerically equivalent to the original set itself.)
Proof: Let A ≈ Jn and B ≈ Jm , but since, A ⊂ B, m < n hence, it is not possible to find a
bijection, since, one-one correspondence can not be possible for all of the elements in co-domain
Theorem 2.3.2: There exists a proper subset of every countably infinite set which is numerically
equivalent to it.
Proof: Let E = {2n : n ∈ N} set of even numbers. f (n) = 2n is bijection function f : N → E.
Now, clearly, we can always find a proper subset to any countably infinite set, which is numerically
equivalent to E
Theorem 2.3.3: There exists a proper subset of every infinite set which is countably infinite.
Proof: Let S0 is an arbitrary infinite set. Let a1 ∈ S0 is an arbitrary element. Now, consider,
S1 = S0 − {a1 },
Theorem 2.3.4: There exists a proper subset of every infinite set which is numerically equivalent
to it.
Proof: Let A is an arbitrary infinite set, B ⊂ A is an countable infinite subset (Theorem 3), and
C ⊂ B is also a countably infinite subset (Theorem 2).
Now, suppose Y = C ∪ (A − B). We can see that, we can have a bijection between Y and
A. Since, cardinality of C and B are same, hence, subtracting B and, unioning C with A will not
change cardinality
Theorem 2.3.5:(Canter’s Theorem) Cardinality of power set of a set is strictly more than that
of set i.e. |X| < |2X | for any set X.
12
Proof: Suppose |X| ≈ |2X | for a set X. So we must be able to find a bijection f : X → 2X . For
that f has to be surjective.
Let B is Canter’s diagonal set of f . i.e B = {x ∈ X|x ∈
/ f (x)}. Now, since, B ⊂ A, there should
be a f −1 (B) say p. Now, if p ∈ X =⇒ p ∈ f (p) =⇒ p ∈ / X, and this is contradiction. Hence, it is
not possible to get any surjection between X and 2X . Clearly, f (x) = {x} is an injection between
X and 2X , hence, |X| < |2X |
The Canter’s diagonal set is demonstrated in eqn 18 for set X = N and Canter’s diagonal set
is T .
Remarks
• For all finite set (say X), we can easily see that |X| > |2X |: Let a set Y = {x| {x} ∈ 2X },
clearly Y ⊂ 2X and there is a bijection f : X → Y s.t .f (x) = x. Hence, bijection can not be
possible between X and 2X .
• For all the countably finite set X: We can find a bijection from X to N . Then, make a
Canter’s diagonal set exactly as in eq 18 to face a contradiction that a surjective function
can’t be possible between X and 2X .
• When a set X is uncountable: Find a countably infinite subset (as per theorem 2.3.3). Repeat
the second remark to see that again bijection is not possible.
• 2N is uncountable set. To prove a set uncountable, it takes just to establish a bijection with
the set and 2N .
13
Solution As given F is countable, hence, we can write F = {Ai | i ∈ N}. Now, since Ai ∀ i ∈ N are
also countable, we can write Ai = {ai,j | j ∈ N}. Henceforth we can write,
[
Ai = {ai,j ∈ Ai | i, j ∈ N} (27)
i∈I
[
Let a function f : Ai → N such that,
i∈I
f (ai,j ) = i + j − 1. (28)
[ [
It can be clearly seen that, the function f is bijection from Ai to N, hence Ai is countable.
i∈I i∈I
Figure
[ 10: Representation of function f (ai,j ) = i + j − 1: It can be seen that f is bijection from
Ai to N.
i∈I
Example 3 Show that any collection of disjoint intervals of positive length is a countable set.
Solution Let J is an arbitrary collection of disjoint intervals of positive length. It can be written
as,
14
Now, again as in Example 1, we can constrict a bijection F : J → N as f (Amn ) = m + n − 1.
Hence J is countable.
Example 4 The set S of intervals with rational endpoints is a countable set, prove that the union
of all sets in S is also a countable set.
Solution Let L is the set of intervals with rational endpoints. From example 3, we can see that
L ⊂ J, hence L is also countable. Now let,
( let L = {An | A
Now, n = Aij , n = i + j −)
n−1
1, Aij ∈ L, n ∈ N}. We can see that L = L. Suppose,
0
[
M = B n | B n = An − Ai , Ai ∈ L , n ∈ N . Now, we need to establish followings:
i=1
1. M is countable (proof 1)
n−1 m−1
! !
[ \ [
=⇒ x ∈ An − Ai Am − Ai (31)
i=1 i=1
n−1 m−1
! !
\ \ \
=⇒ x ∈ (An − Ai ) (Am − Ai ) (32)
i=1 i=1
=⇒ x ∈ ((An − A1 ) & (An − A2 ) & · · · & (An − Am ) & · · · & (An − An−1 )) &
=⇒ x ∈
/ Am & ∈ Am (34)
which is contradiction. Hence Bm and Bn are disjoint for all m and n.
15
n n
!
[ [
Proof 3 Bn = An ∀ n ∈ N : It is definition chasing of sets. We need to show LHS con-
i=1 i=1
tained in RHS and vice-versa.
Example 5 Prove that the set of all algebraic numbers is countable over the field Q.
Solution Let P (x) = a1 x + a2 x + ... + an = 0 is an algebraic equation. We can convert it to all
integer coefficient by multiplying LCM of coefficient. Say Q(x) = L.C.M.(ai i = 1, 2, 3, ...n)P (x).
Which means, Q(x) have only integers as coefficient.
Xn
Now, we can see that ∃ N ∈ N, s.t. |ak | = N . We can also see that for each such N there
k=1
can be only finite number of polynomials possible. Hence, collection of all the algebraic numbers
is equivalent to countable collection of all the finite sets which is countable (Example 1)
References
[1] Tom M. Apostol, [Book] Mathematical Analysis, . Second Edition, 1974.
16