function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A...
Transcript of function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A...
![Page 1: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/1.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)}d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 2: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/2.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)}d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 3: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/3.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)}d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 4: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/4.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)}d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 5: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/5.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)}d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 6: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/6.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)}d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 7: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/7.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)}d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 8: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/8.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)} Not a function from A to B
d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 9: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/9.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)} A function from {1, 2, 4} to B
d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 10: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/10.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)} A function from {1, 2, 4} to B
d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 11: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/11.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)} A function from {1, 2, 4} to B
d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 12: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/12.jpg)
Definition 1
A function or a mapping from A to B , denoted by f : A→ B is arelation from A to B in which every element from A appears exactlyonce as the first component of an ordered pair in the relation.
Let A = {1, 2, 3, 4} and B = {2, 4, 5}.a) R1 = {(1, 2), (2, 4), (3, 4), (4, 5)} A function from A to B
b) R2 = {(1, 2), (2, 4), (2, 5), (4, 5)} Not a function
c) R3 = {(1, 2), (2, 4), (4, 5)} A function from {1, 2, 4} to B
d) R4 = A× B Not a function
Notation
We write f (a) = b when (a, b) ∈ f where f is a function.We say that b is the image of a under f , and a is a preimage of b.
() October 31, 2007 1 / 7
![Page 13: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/13.jpg)
Notation
Let f : A→ B be a function from A to B . The set A is called thedomain of f , and the set B is called the codomain of f . The setf (A) = {f (x) | x ∈ A} is called the range of f .
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.Let f : A→ B be f = {(1, w), (2, y), (3, y), (4, z)}.
a) The domain of f is {1, 2, 3, 4}.b) The codomain of f is {v , w , x , y , z}.c) The range of f is
f (A) = f ({1, 2, 3, 4})= {f (1), f (2), f (3), f (4)}= {w , y , y , z} = {w , y , z}
◦◦◦◦
◦◦◦◦◦
1
2
3
4
v
w
x
y
z
,,ZZZZZZZZZZ
''OOOOOOOOOOO
,,ZZZZZZZZZZ
,,ZZZZZZZZZZ
() October 31, 2007 2 / 7
![Page 14: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/14.jpg)
Notation
Let f : A→ B be a function from A to B . The set A is called thedomain of f , and the set B is called the codomain of f . The setf (A) = {f (x) | x ∈ A} is called the range of f .
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.Let f : A→ B be f = {(1, w), (2, y), (3, y), (4, z)}.
a) The domain of f is {1, 2, 3, 4}.b) The codomain of f is {v , w , x , y , z}.c) The range of f is
f (A) = f ({1, 2, 3, 4})= {f (1), f (2), f (3), f (4)}= {w , y , y , z} = {w , y , z}
◦◦◦◦
◦◦◦◦◦
1
2
3
4
v
w
x
y
z
,,ZZZZZZZZZZ
''OOOOOOOOOOO
,,ZZZZZZZZZZ
,,ZZZZZZZZZZ
() October 31, 2007 2 / 7
![Page 15: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/15.jpg)
Notation
Let f : A→ B be a function from A to B . The set A is called thedomain of f , and the set B is called the codomain of f . The setf (A) = {f (x) | x ∈ A} is called the range of f .
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.Let f : A→ B be f = {(1, w), (2, y), (3, y), (4, z)}.
a) The domain of f is {1, 2, 3, 4}.b) The codomain of f is {v , w , x , y , z}.c) The range of f is
f (A) = f ({1, 2, 3, 4})= {f (1), f (2), f (3), f (4)}= {w , y , y , z} = {w , y , z}
◦◦◦◦
◦◦◦◦◦
1
2
3
4
v
w
x
y
z
,,ZZZZZZZZZZ
''OOOOOOOOOOO
,,ZZZZZZZZZZ
,,ZZZZZZZZZZ
() October 31, 2007 2 / 7
![Page 16: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/16.jpg)
Notation
Let f : A→ B be a function from A to B . The set A is called thedomain of f , and the set B is called the codomain of f . The setf (A) = {f (x) | x ∈ A} is called the range of f .
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.Let f : A→ B be f = {(1, w), (2, y), (3, y), (4, z)}.
a) The domain of f is {1, 2, 3, 4}.b) The codomain of f is {v , w , x , y , z}.c) The range of f is
f (A) = f ({1, 2, 3, 4})= {f (1), f (2), f (3), f (4)}= {w , y , y , z} = {w , y , z}
◦◦◦◦
◦◦◦◦◦
1
2
3
4
v
w
x
y
z
,,ZZZZZZZZZZ
''OOOOOOOOOOO
,,ZZZZZZZZZZ
,,ZZZZZZZZZZ
() October 31, 2007 2 / 7
![Page 17: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/17.jpg)
Notation
Let f : A→ B be a function from A to B . The set A is called thedomain of f , and the set B is called the codomain of f . The setf (A) = {f (x) | x ∈ A} is called the range of f .
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.Let f : A→ B be f = {(1, w), (2, y), (3, y), (4, z)}.
a) The domain of f is {1, 2, 3, 4}.b) The codomain of f is {v , w , x , y , z}.c) The range of f is
f (A) = f ({1, 2, 3, 4})= {f (1), f (2), f (3), f (4)}= {w , y , y , z} = {w , y , z}
◦◦◦◦
◦◦◦◦◦
1
2
3
4
v
w
x
y
z
,,ZZZZZZZZZZ
''OOOOOOOOOOO
,,ZZZZZZZZZZ
,,ZZZZZZZZZZ
() October 31, 2007 2 / 7
![Page 18: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/18.jpg)
Let P = {Justin, Britney , Joey , Christina, Jessica, Kevin, Kelly , Nick ,Sarah} and let S = {man, woman}.
Let Gender : P → S be
Justin
Joey
Kevin
Nick
Britney
Christina
Jessica
Kelly
Sarah
man
woman
**TTTTTTTTTTTTTTTTTTTTTT
// 77ooooooooooooooooooooooo
<<zzzzzzzzzzzzzzzzzzzzzzzzzzz
""DDDD
DDDD
DDDD
DDDD
DDDD
DDDD
DDD
''OOOOOOOOOOOOOOOOOOOOOOO
**TTTTTTTTTTTTTTTTTTTTTT
// 44jjjjjjjjjjjjjjjjjjjjjj
() October 31, 2007 3 / 7
![Page 19: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/19.jpg)
Let P = {Justin, Britney , Joey , Christina, Jessica, Kevin, Kelly , Nick ,Sarah} and let S = {man, woman}.
Let Gender : P → S be
Justin
Joey
Kevin
Nick
Britney
Christina
Jessica
Kelly
Sarah
man
woman
**TTTTTTTTTTTTTTTTTTTTTT
// 77ooooooooooooooooooooooo
<<zzzzzzzzzzzzzzzzzzzzzzzzzzz
""DDDD
DDDD
DDDD
DDDD
DDDD
DDDD
DDD
''OOOOOOOOOOOOOOOOOOOOOOO
**TTTTTTTTTTTTTTTTTTTTTT
// 44jjjjjjjjjjjjjjjjjjjjjj
() October 31, 2007 3 / 7
![Page 20: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/20.jpg)
Theorem 2
For any sets A and B, the number of functions from A to B is |B ||A|
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Afunction f assigns each element ai of A an element bj = f (ai) of B ;there are m possibilities for each element of A, hence by the rule ofproduct, we have m ·m · . . . ·m︸ ︷︷ ︸
n
= mn = |B ||A| possible functions. �
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.a) There are ? relations from A to B .
b) There are ? functions from A to B .
() October 31, 2007 4 / 7
![Page 21: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/21.jpg)
Theorem 2
For any sets A and B, the number of functions from A to B is |B ||A|
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Afunction f assigns each element ai of A an element bj = f (ai) of B ;there are m possibilities for each element of A, hence by the rule ofproduct, we have m ·m · . . . ·m︸ ︷︷ ︸
n
= mn = |B ||A| possible functions. �
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.a) There are ? relations from A to B .
b) There are ? functions from A to B .
() October 31, 2007 4 / 7
![Page 22: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/22.jpg)
Theorem 2
For any sets A and B, the number of functions from A to B is |B ||A|
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Afunction f assigns each element ai of A an element bj = f (ai) of B ;there are m possibilities for each element of A, hence by the rule ofproduct, we have m ·m · . . . ·m︸ ︷︷ ︸
n
= mn = |B ||A| possible functions. �
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.a) There are ? relations from A to B .
b) There are ? functions from A to B .
() October 31, 2007 4 / 7
![Page 23: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/23.jpg)
Theorem 2
For any sets A and B, the number of functions from A to B is |B ||A|
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Afunction f assigns each element ai of A an element bj = f (ai) of B ;there are m possibilities for each element of A, hence by the rule ofproduct, we have m ·m · . . . ·m︸ ︷︷ ︸
n
= mn = |B ||A| possible functions. �
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.a) There are 2|A||B| = 220 = 1, 048, 576 relations from A to B .
b) There are ? functions from A to B .
() October 31, 2007 4 / 7
![Page 24: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/24.jpg)
Theorem 2
For any sets A and B, the number of functions from A to B is |B ||A|
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Afunction f assigns each element ai of A an element bj = f (ai) of B ;there are m possibilities for each element of A, hence by the rule ofproduct, we have m ·m · . . . ·m︸ ︷︷ ︸
n
= mn = |B ||A| possible functions. �
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.a) There are 2|A||B| = 220 = 1, 048, 576 relations from A to B .
b) There are ? functions from A to B .
() October 31, 2007 4 / 7
![Page 25: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/25.jpg)
Theorem 2
For any sets A and B, the number of functions from A to B is |B ||A|
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Afunction f assigns each element ai of A an element bj = f (ai) of B ;there are m possibilities for each element of A, hence by the rule ofproduct, we have m ·m · . . . ·m︸ ︷︷ ︸
n
= mn = |B ||A| possible functions. �
Let A = {1, 2, 3, 4} and B = {v , w , x , y , z}.a) There are 2|A||B| = 220 = 1, 048, 576 relations from A to B .
b) There are |B ||A| = 54 = 625 functions from A to B .
() October 31, 2007 4 / 7
![Page 26: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/26.jpg)
Definition 3
A function f : A→ B is one-to-one or injective if each element of Bappears at most once as the image of an element of A.A function f : A→ B is onto or surjective if f (A) = B , that is, eachelement of B appears at least once as the image of an element of A.
Let f : Z→ Z be a function defined as f (x) = 3x + 7.
f = {. . . , (−3,−2), (−2, 1), (−1, 4), (0, 7), (1, 10), (2, 13), . . .}
a) f is injective
Suppose otherwise, i.e., f (x) = f (y) for x 6= yf (x) = f (y) =⇒ 3x + 7 = 3y + 7 =⇒ 3x = 3y =⇒ x = y �
b) f is not surjective
For b = 2 there is no a such that f (a) = b, that is, 2 = 3a + 7holds for a = −5
3which is not in Z.
() October 31, 2007 5 / 7
![Page 27: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/27.jpg)
Definition 3
A function f : A→ B is one-to-one or injective if each element of Bappears at most once as the image of an element of A.A function f : A→ B is onto or surjective if f (A) = B , that is, eachelement of B appears at least once as the image of an element of A.
Let f : Z→ Z be a function defined as f (x) = 3x + 7.
f = {. . . , (−3,−2), (−2, 1), (−1, 4), (0, 7), (1, 10), (2, 13), . . .}
a) f is injective
Suppose otherwise, i.e., f (x) = f (y) for x 6= yf (x) = f (y) =⇒ 3x + 7 = 3y + 7 =⇒ 3x = 3y =⇒ x = y �
b) f is not surjective
For b = 2 there is no a such that f (a) = b, that is, 2 = 3a + 7holds for a = −5
3which is not in Z.
() October 31, 2007 5 / 7
![Page 28: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/28.jpg)
Definition 3
A function f : A→ B is one-to-one or injective if each element of Bappears at most once as the image of an element of A.A function f : A→ B is onto or surjective if f (A) = B , that is, eachelement of B appears at least once as the image of an element of A.
Let f : Z→ Z be a function defined as f (x) = 3x + 7.
f = {. . . , (−3,−2), (−2, 1), (−1, 4), (0, 7), (1, 10), (2, 13), . . .}
a) f is injective
Suppose otherwise, i.e., f (x) = f (y) for x 6= yf (x) = f (y) =⇒ 3x + 7 = 3y + 7 =⇒ 3x = 3y =⇒ x = y �
b) f is not surjective
For b = 2 there is no a such that f (a) = b, that is, 2 = 3a + 7holds for a = −5
3which is not in Z.
() October 31, 2007 5 / 7
![Page 29: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/29.jpg)
Definition 3
A function f : A→ B is one-to-one or injective if each element of Bappears at most once as the image of an element of A.A function f : A→ B is onto or surjective if f (A) = B , that is, eachelement of B appears at least once as the image of an element of A.
Let f : Z→ Z be a function defined as f (x) = 3x + 7.
f = {. . . , (−3,−2), (−2, 1), (−1, 4), (0, 7), (1, 10), (2, 13), . . .}
a) f is injective
Suppose otherwise, i.e., f (x) = f (y) for x 6= yf (x) = f (y) =⇒ 3x + 7 = 3y + 7 =⇒ 3x = 3y =⇒ x = y �
b) f is not surjective
For b = 2 there is no a such that f (a) = b, that is, 2 = 3a + 7holds for a = −5
3which is not in Z.
() October 31, 2007 5 / 7
![Page 30: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/30.jpg)
Definition 3
A function f : A→ B is one-to-one or injective if each element of Bappears at most once as the image of an element of A.A function f : A→ B is onto or surjective if f (A) = B , that is, eachelement of B appears at least once as the image of an element of A.
Let f : Z→ Z be a function defined as f (x) = 3x + 7.
f = {. . . , (−3,−2), (−2, 1), (−1, 4), (0, 7), (1, 10), (2, 13), . . .}
a) f is injective
Suppose otherwise, i.e., f (x) = f (y) for x 6= yf (x) = f (y) =⇒ 3x + 7 = 3y + 7 =⇒ 3x = 3y =⇒ x = y �
b) f is not surjective
For b = 2 there is no a such that f (a) = b, that is, 2 = 3a + 7holds for a = −5
3which is not in Z.
() October 31, 2007 5 / 7
![Page 31: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/31.jpg)
Definition 3
A function f : A→ B is one-to-one or injective if each element of Bappears at most once as the image of an element of A.A function f : A→ B is onto or surjective if f (A) = B , that is, eachelement of B appears at least once as the image of an element of A.
Let f : Z→ Z be a function defined as f (x) = 3x + 7.
f = {. . . , (−3,−2), (−2, 1), (−1, 4), (0, 7), (1, 10), (2, 13), . . .}
a) f is injective
Suppose otherwise, i.e., f (x) = f (y) for x 6= yf (x) = f (y) =⇒ 3x + 7 = 3y + 7 =⇒ 3x = 3y =⇒ x = y �
b) f is not surjective
For b = 2 there is no a such that f (a) = b, that is, 2 = 3a + 7holds for a = −5
3which is not in Z.
() October 31, 2007 5 / 7
![Page 32: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/32.jpg)
Theorem 4
For any finite sets A and B, the number of one-to-one functions fromA to B is |B|!
(|B|−|A|)! = P(|B |, |A|)
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Aone-to-one function f assigns each element ai of A a distinct elementbj = f (ai) of B ; for a1 there are m choices, for a2 there are m − 1choices,. . . , for an there are (m − (n − 1)) choices.
Hence by the rule of product, we have
m(m − 1) . . . (m − (n − 1))︸ ︷︷ ︸n
=m!
(m − n)!=
|B |!(|B | − |A|)!
= P(|B |, |A|)
injective functions from A to B . �
() October 31, 2007 6 / 7
![Page 33: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/33.jpg)
Theorem 4
For any finite sets A and B, the number of one-to-one functions fromA to B is |B|!
(|B|−|A|)! = P(|B |, |A|)
Proof. Let A = {a1, a2, . . . , an} and B = {b1, b2, . . . , bm}. Aone-to-one function f assigns each element ai of A a distinct elementbj = f (ai) of B ; for a1 there are m choices, for a2 there are m − 1choices,. . . , for an there are (m − (n − 1)) choices.
Hence by the rule of product, we have
m(m − 1) . . . (m − (n − 1))︸ ︷︷ ︸n
=m!
(m − n)!=
|B |!(|B | − |A|)!
= P(|B |, |A|)
injective functions from A to B . �
() October 31, 2007 6 / 7
![Page 34: function mapping A B A B A f g B f g - University of Torontostacho/macm101-2.pdf · De nition 1 A function or a mapping from A to B, denoted by f : A !B is a relation from A to B](https://reader030.fdocuments.in/reader030/viewer/2022020302/5a796d467f8b9ab45c8b4567/html5/thumbnails/34.jpg)
Formal notation (optional - good for proofs)
A relation f from A to B is a function if∀x ∈ A ∃y ∈ B [ (x , y) ∈ f ]
∀x ∈ A ∀y , z ∈ B [ (x , y) ∈ f ∧ (x , z) ∈ f =⇒ y = z ]
A function f : A→ B is injective if∀x , y ∈ A [ f (x) = f (y) =⇒ x = y ]
A function f : A→ B is surjective if∀y ∈ B ∃x ∈ A [ f (x) = y ]
() October 31, 2007 7 / 7