Definition: Let X and Y be two nonempty sets. A function f from X to Y is a rule that associates each element x of the set X, the domain of the function, to a unique
element y of Y (possibly the same set), the codomain of the function.
If the function is called f, this relation is denoted y = f (x).
The above is a diagram of a function, with domain X = {1, 2, 3} and codomain Y = {A, B, C, D}, which is defined by the set of ordered pairs {(1, D), (2, C), (3, C)}.
The image/range is the set {C, D}.
This diagram, representing the set of pairs {(1,D), (2,B), (2,C)}, does not define a function.
One reason is that 2 is the first element in more than one ordered pair, (2, B) and (2, C), of this set.
Two other reasons, also sufficient by themselves, is that neither 3 nor 4 are first elements (input) of any ordered pair therein.
Injective function : A function f from a set X to a set Y is said to be injective function (also known as one-to-one function) if it maps distinct elements of its domain to distinct elements of its codomain.
In other words, every element of the function's codomain is the image of at most one element of its domain.
Surjective function: A function f from a set X to a set Y is surjective (also known as onto), if for every element y in the codomain Y of f, there is at least one element x in the domain X of f such that f(x) = y.
It is not required that x be unique; the function f may map one or more elements of X to the same element of Y.
An injective non-surjective function An injective surjective function (bijection)
A non-injective surjective function
A non-injective non-surjective function
Examples:
1. The function f : R → R defined by f(x) = 2x + 1 is injective.
2. The function g : R → R defined by g(x) = x2 is not injective, because (for
example) g(1) = 1 = g(−1). It is not surjective, since there is no real number x such that x2 = −1.
3. The function f : R → R defined by f(x) = 2x + 1 is surjective (and even bijective), because for every real number y, we have an x such that f(x) = y: such an
appropriate x is (y − 1)/2.
Equipotent Set: Two sets A and B are said to be equipotent if there exists a bijective mapping between A and B and we write A ~ B.
Enumerable Set: A set A is said to be enumerable or denumerable if A is equipotent with N. That is there is a bijection f : N → A.
Countable Set: A set which is either finite or enumerable is said to be a countable set.
Uncountable Set: A set which is not countable is said to be a uncountable set.
The cardinality or number of element of a set is said to be cardinal number of the set.
3. The set Z is enumerable as the mapping f: N → Z defined by f(n) = n/2, if n be even
= (1-n)/2 if n be odd is a bijection.
4. The set Q is enumerable.
5. The set R is not enumerable.
Some Important Theorems
Theorem 1: An infinite subset of an enumerable set is enumerable.
Theorem 2: The union of a finite set and an enumerable set is enumerable.
Theorem 3: The union of two enumerable sets is enumerable.
Theorem 4: The union of an enumerable number of enumerable sets is enumerable.
Proof: Refer to textbooks.