Let us recall what is relation.
Function
![]() | Formal Definition of a FunctionA function relates each element of a set with exactly one element of another set (possibly the same set). |
he Two Important Things!
1. | "...each element..." means that every element in X is related to some element in Y. We say that the function covers X (relates every element of it). (But some elements of Y are not related to at all, which is fine.) |
2. | "...exactly one..." means that a function is single valued. It will not give back 2 or more results for the same input. So "f(2) = 7 or 9" is not right! |
![]() | ![]() | |
(one-to-many) | (many-to-one) | |
This is NOT OK in a function | But this is OK in a function |
Check out this exercise
0 comments:
Post a Comment