We learned that a function is a rule that assigns one and only one value to each element of its domain. However a function may assign the same value to two or more elements in its domain. For example $f(x)=x^{2}$ assigns 4 to both $x=2$ and $x=-2$. Or $f(x)=|x|$ assigns the same value to both $x=a$ and $x=-a$. Or $f(x)=c$ where $c$ is a constant, takes on the same value $c$ at all $x$. But some functions assign distinct values to distinct elements of their domains. For example, $f(x)=2x+3$ takes on a different value at each value of $x$. Such functions are called one-to-one or 1-1 functions.
$x_{1},x_{2}$ in $A$
\[
f(x_{1})=f(x_{2})\qquad\text{implies}\qquad x_{1}=x_{2}.\qquad{\small (\text{a})}
\]
- Equivalently we can say that a function is one-to-one whenever $x_{1}\neq x_{2}$ in $A$, then $f(x_{1})\neq f(x_{2})$.
\[
x_{1}\neq x_{2}\Rightarrow f(x_{1})\neq f(x_{2}).\qquad\quad{\small (\text{b})}
\] - The above definition states that a one-to-one function $y=f(x)$ takes on each value in its range only once. If the graph of the function is cut by a horizontal line $y=c$ at more than one point, the value
$y=c$ will correspond to more than one value of $x$, and the function will not be one-to-one. We may use the following test to specify whether or not a function is one-to-one.
A function is one-to-one if and only if each horizontal line $y=c$ intersects the graph of $y=f(x)$ at most once. Note that in the above example, although $f$ is not a one-to-one function on its entire natural domain $\mathbb{R}$, if we restrict the domain to $x\geq0$ , i.e. $f:[0,\infty)\to\mathbb{R}$ with $f(x)=x^{2}+1$, then the horizontal line test is passed and the function becomes one-to-one. Remark that the original and restricted functions are not the same functions because their domains are different. However, the two functions assume the same values on $[0,\infty)$. We can figure out whether or not a function is one-to-one just by looking at their graphs. In the following table, we have investigated some common functions:
function
natural domain
1-1 on natural domain?
Graphs
$f(x)=x^n$
($n$ is even)$\mathbb{R}$
no
$f(x)=x^n$
($n$ is odd)$\mathbb{R}$
yes
$f(x)=\sqrt[n]{x}$
($n$ is even)$[0,\infty)$
yes
$f(x)=\sqrt[n]{x}$
($n$ is odd)$\mathbb{R}$
yes
$f(x)=\dfrac{1}{x^n}$
($n$ is even)$\mathbb{R}-{0}=\{x|\ x\neq 0\}$
no
$f(x)=\dfrac{1}{x^n}$
($n$ is odd)$\mathbb{R}-{0}=\{x|\ x\neq 0\}$
yes