A function \(f:A \rightarrow B\) is called one to one, often written 1 - 1, if and only if for all \(x_{1},x_{2} \in A\text{,}\)\(f(x_{1}) = f(x_{2})\) implies \(x_{1} = x_{2}\text{.}\) In words, no two elements of \(A\) are mapped to one element of \(B\text{.}\)
If we consider the sets \(A = \left\{ 1,2,3,\cdots,6 \right\}\) and \(B = \left\{ 7,a,b,c,d,8,e \right\}\) and if \(f =\)\((2,a),\)\((3,b)\text{,}\)\((4,b),(5,c),(6,8)\) and \(g = \left\{ (1,7),(2,a),(3,b),(4,c),(5,8),(6,d) \right\}\text{,}\) then both \(f\) and \(g\) are functions from \(A\) into \(B\text{.}\) Observe that \(f\) is not a \(1 - 1\) function because \(f(3) = f(4)\) but \(3 \neq 4\text{.}\) However, \(g\) is a \(1 - 1\) function.
Let \(f\) be a function from a set \(A\) into a set \(B\text{.}\) Then \(f\) is called an onto function(or\(f\)maps onto\(B)\) if every element of \(B\) is an image of some element in \(A\text{,}\) i.e, \(\text{Range}(f) = B\text{.}\)
Let \(A = \left\{ 1,2,3 \right\}\)and \(B = \left\{ 1,4,5 \right\}\text{.}\) The function \(f:A \rightarrow B\) defined by \(f(1) = 1\text{,}\)\(f(2) = 5\text{,}\)\(f(3) = 1\) is not onto because there is no element in \(A\text{,}\) whose image under \(f\) is 4. The function \(g:A \rightarrow B\) given by \(g = \left\{ (1,4),(2,5),(3,1) \right\}\) is onto because each element of \(B\) is an image of at least one element of \(A\) .
Note that if \(A\) is a non-empty set, the function \(i_{A}:A \rightarrow A\) defined by \(i_{A}(x) = x\) for all \(x \in A\) is a 1 – 1 function from \(A\) onto \(A\text{.}\)\(i_{A}\) is called the identity map on \(A\text{.}\)
Consider the relation \(f\) from \(Z\) into \(Z\) defined by \(f(n) = n^{2}\) for all \(n \in Z\text{.}\) Now, domain of \(f\) is \(Z\text{.}\) Also, if \(n = n^{'}\text{,}\) then \(n^{2} = (n^{'})^{2}\text{,}\) i.e. \(f(n) = f(n^{'})\text{.}\) Hence, \(f\) is well defined and is a function. However, \(f(1) = 1 = f( - 1)\) and \(1 \neq - 1\text{,}\) which implies that \(f\) is not 1 – 1. For all \(n \in Z\text{,}\)\(f(n)\) is a non-negative integer. This shows that a negative integer has no preimage. Hence, \(f\) is not onto. Note that \(f\) is onto \(\left\{ 0,1,4,9,\cdots \right\}\text{.}\)
Consider the relation \(f\) from \(Z\) into \(Z\) defined by \(f(n) = 2n\) for all \(n \in Z\text{.}\) As in the previous example, we can show that \(f\) is a function. Let \(n,n^{'} \in Z\) and suppose that \(f(n) = f(n^{'})\text{.}\) Then \(2n = 2n^{'}\) and thus \(n = n^{'}\text{.}\) Hence, \(f\) is 1 – 1. Since for all \(n \in Z\text{,}\)\(f(n)\) is an even integer; we see that an odd integer has no preimage. Therefore, \(f\) is not onto.
Let \(A = \left\{ 0,\ 1,\ 2,\ 3,\ 4,\ 5 \right\}\) and \(B = \left\{ 0,\ 5,\ \text{10},\ \text{15},\ \text{20},\ \text{25} \right\}\text{.}\) Suppose \(f:A \rightarrow B\) given by \(f(x) = 5x\) for all \(x \in A\text{.}\) One can easily see that every element of \(B\) has a preimage in \(A\) and hence \(f\) is onto. Moreover, if \(f(x) = f(y)\text{,}\) then \(5x = 5y\text{,}\) i.e. \(x = y\text{.}\) Hence, \(f\) is 1 - 1. Therefore, \(f\) is a 1 - 1 correspondence between \(A\) and \(B\text{.}\)
Let \(A = \left\{ a_{1},a_{2},\cdots,a_{n} \right\}\text{.}\) Then \(\text{Range}(f) = \left\{ f(a_{1}),f(a_{2}),\cdots,f(a_{n}) \right\}\text{.}\) Since \(f\) is onto we have \(\text{Range}(f) = A\text{.}\)Thus, \(A = \left\{ f(a_{1}),f(a_{2}),\cdots,f(a_{n}) \right\}\text{,}\) which implies that \(f(a_{1})\text{,}\)\(f(a_{2})\text{,}\)\(\cdots\text{,}\)\(f(a_{n})\) are all distinct. Hence, \(a_{i} \neq a_{j}\) implies \(f(a_{i}) \neq f(a_{j})\) for all \(1 \leq i,j \leq n\text{.}\) Therefore, \(f\) is 1 - 1.
For instance, if \(f = \left\{ (2,4),(3,6),(1,7) \right\}\text{,}\) then \(f^{- 1} = \left\{ (4,2),(6,3),(7,1) \right\}\text{.}\) Note that the inverse of a function is not always a function. To see this consider the function \(f =\)\((5,4)\text{.}\) Then, \(f^{- 1} = \left\{ (4,2),(6,3),(4,5) \right\}\text{,}\) which is not a function.
As we have seen above not all functions have an inverse, so it is important to determine whether or not a function has an inverse before we try to find the inverse. If the function does not have an inverse, then we need to realize that it does not have an inverse so that we do not waste our time trying to find something that does not exist.
A one to one function is special because only one to one functions have inverse. If a function is one to one, to find the inverse we will follow the steps below:
Interchange \(x\) and \(y\) in the equation \(y = f(x)\)
Note that the domain of the inverse function is the range of the original function and the range of the inverse function is the domain of the original function.
Even though, in general, we use an exponent of \(- 1\) to indicate a reciprocal, inverse function notation is an exception to this rule. Please be aware that \(f^{- 1}(x)\) is not the reciprocal of \(f\text{.}\) That is,
Consider the function \(f = \left\{ (x,x^{2}):x \in S \right\}\) from \(S = \left\{ - 3, - 2, - 1,0,1,2,3 \right\}\) into \(Z\text{.}\) Is \(f\) one to one? Is it onto?
Let \(A = \left\{ x \in \Re:0 \leq x \leq 1 \right\}\) and \(B = \left\{ x \in \Re:5 \leq x \leq 8 \right\}\text{.}\) Show that \(f:A \rightarrow B\) defined by \(f(x) = 5 + (8 - 5)x\) is a 1 - 1 function from \(A\) onto \(B\text{.}\)