Learn the difference between a relation and a function, then practice telling them apart.
Every function is a relation, but every relation is not a function.
For example:
R = {(1, 2), (1, 3), (2, 4)}
This is a relation but not a function, because input 1 has two outputs: 2 and 3.
Whereas:
f = {(1, 2), (2, 3), (3, 4)}
is a function, because each input has exactly one output.
| Relation | Function |
|---|---|
| A relation is a subset of the Cartesian product of two sets. | A function is a special type of relation in which every element of the domain has a unique association with exactly one element of the co-domain. |
| A relation between two sets A and B is denoted by R : A → B. Here, the domain of the relation can also be a subset of A. | If A and B are considered as domain and co-domain respectively, then a function from A and B is denoted by f : A → B. Here, the domain of the function is the set A itself. |
| Example: R = {(1, 1), (1, −1), (4, 2), (4, −2)} |
Example: f = {(1, 1), (2, 4), (3, 9)} |