What are relations and functions in maths?
A relation in mathematics is a connection or association between elements of two sets. A relation $R$ from a non-empty set $A$ to a non-empty set $B$ is a subset of the cartesian product $A \times B$.
A relation from a set $A$ to a set $B$ is said to be a function from $A$ to $B$ if every element of set $A$ has one and only one image in set $B$.