A relation R from a non-empty set B is a subset of the cartesian product A × B. The subset is derived by describing a relationship between the first element and the second element of the ordered pairs in A × B.
A relation f from a set A to a set B is said to be a function if every element of set A has one and only one image in set B. In other words, no two distinct elements of B have the same pre-image.
Relations and functions can be represented in different forms such as arrow representation, algebraic form, set-builder form, graphically, roster form, and tabular form. Define a function f: A = {1, 2, 3} → B = {1, 4, 9} such that f(1) = 1, f(2) = 4, f(3) = 9. Now, represent this function in different forms.