Let A and B be two non-empty sets. Then a function ‘f’ from set A to set B is a rule or method or correspondence which associates elements of set A to elements of set B such that
i) All elements of set A are associated to elements in set B.
ii) An element of set A is associated to a unique element in set B.
In other words, a function ‘ f ‘ from a set A to a set B associates each element of set A to a unique element of set B.
If an element a ϵ A is associated to an element b ϵ B, then b is called the ‘f – image of a’ or ‘image of a under f’ or ‘the value of the function f at a’. Also, a is called the pre – image of b under the function f. we write it as b = f (a).
Illustration: Let A = {1, 2, 3, 4} and B = {a, b, c, d, e} be two sets and let f₁, f₂, f₃ and f₄ be rules associating elements (A to elements of) B as shown in the following figures:
We observe that f₁ is not a function from set A to set B, since there is an element 3 ϵ A which is not associated to any element of B. Also, f₂ is not a function from A to B because an element 4 ϵ A is associated to two elements c and e in B. But, f₃ and f₄ are functions from A to B. because under f₃ and f₄ each element in A is associated to a unique element in B.
Kinds of Functions: One – One Function (Injection): A function f : A → B is said to be a one-one function or an injection if different elements of A have different images in B.
Thus, f : A → B is one-one.
⇔ a ≠ b ⇒ f (a) ≠ f (b) for all a, b ϵ A
⇔ f (a) = f (b) ⇒ a = b for all a, b ϵ A
ALGORITHM:
STEP 1: Take two arbitrary elements x, y (say) in the domain of f.
STEP 2: Put f (x) = f (y)
STEP 3: Solve f (x) = f (y)
If f (x) = f (y) gives x = y only, then f : A → B is a one-one function (or an injection). Otherwise it is not.
Number of one – one functions: If A and B are finite sets having m and n elements respectively, then number of one – one functions from A to B is the number of arrangements of n items by taking m at a time i.e., ⁿPm.
Thus, number of one – one functions from A to B \(=\left\{ \begin{align}&^{n}{{P}_{m}},\,\,\,\,if\,\,\,\,n\ge m \\ & 0,\,\,\,\,\,\,\,\,\,if\,\,\,\,n<m \\\end{align} \right.\)
Many – One Function: A function f : A → B is said to be a many-one function if two or more elements of set A have the same image inB.
Thus, f : A → B is a many – one function if there exists x, y ϵ A such that x ≠ y but f (x) = f (y).
Onto Function (Surjection): A function f : A → B is said to be an onto function or a surjection if every element of B is the f – image of some element of A i.e., if f (A) = B, or range of f is the co – domain of f.
Thus, f : A → B is a surjection if for each b ϵ B, Ǝ a ϵ A such that f (a) = b.