Many things around us in our daily lives are somehow related to one another through some kind of relationship or connection. Such associations in mathematics are described using functions and relations.
Relation:
Let \(A\) and \(B\) be any two non-empty sets. A ‘relation’ \(R\) from \(A\) to \(B\) is a subset of \(A×B\) satisfying some specified conditions. If \(x ∈ A\) is related to \(y ∈ B\) through \(R\) , then we write it as \(x R y\). \(x R y\) if and only if \((x,y) ∈ R\).
Domain:
The domain is the set used as an input in a function.
Here, the domain of the relation , for some \(y ∈ B\}\)
Co-domain:
A co-domain is a set that includes all the possible values of a given function.
The co-domain of the relation \(R\) is \(B\)
Range:
The range is the set of values that actually do come out. Range is the co-domain's subset. Remember, all ranges are co-domains but not all the co-domains are ranges.
The range of the relation , for some \(y ∈ A\}\)
From these definitions, we note that domain of , co-domain of \(R = B\) and range of .
Cartesian Product:
The cartesian product of the sets \(A\) and \(B\) is the set \(A×B = {(a,b)|a∈A,b∈B}\).
Arrow diagram:
An arrow diagram is a diagram that represents a relation graphically by drawing arrows from elements of the domain to their corresponding images in the co-domain. It helps in clearly identifying the domain, co-domain, and range.
Example:
\(A × B =\) \(\{(k, e), (v, e), (r, e), (n, e), (k, m), (v, m), (r, m), (n, m), (k, s), (v, s), (r, s), (n, s)\}\).
Function:
A relation \(f\) between two non-empty sets \(X\) and \(Y\) is called a function from \(X\) to \(Y\) if, for each \(x \in X\), there exists only one \(y \in Y\) such that \((x, y) \in f\).
That is, \(f\) \(=\) \(\{(x, y)\)\(|\) for all \(x \in X\),\(y \in Y\).
Relationship between a function and a relation:
A function is made of relations, but all relations are not functions.
1. Functions are subsets of relations.
2. Relations are subsets of cartesian products.
Let us look at the representation given below for a better understanding.
Types of functions:
- One-to-one function
Let \(f : A \rightarrow B\) be a one-one function. Then, each distinct element in \(A\) will have a distinct image in \(B\).
Let us look at the representation given below for a better understanding.
In other words, if for all \(a_1\), \(a_2\) \(\in A\), \(f(a_1) = f(a_2)\) implies \(a_1 = a_2\), \(f\) is a one-to-one function.
A one-to-one function is otherwise called an injection.
- Many-to-one function
Let \(f : A \rightarrow B\) be a many-to-one function. Then, two or more elements in \(A\) will have a distinct image in \(B\).
- Onto function
A function \(f : A \rightarrow B\) is said to be onto function if the range of \(f\) is equal to the co-domain of \(f\).
That is, every co-domain will have a preimage.
An onto function is also called a surjection.
- Into function
A function \(f : A \rightarrow B\) is called an into a function if there exists at least one element in \(B\) which is not the image of any element of \(A\).