How to determine if a function is one-to-one?

I am looking for the "best" way to determine whether a function is one-to-one, either algebraically or with calculus. I know a common, yet arguably unreliable method for determining this answer would be to graph the function. However, this can prove to be a risky method for finding such an answer at it heavily depends on the precision of your graphing calculator, your zoom, etc...

What is the best method for finding that a function is one-to-one?

In your description, could you please elaborate by showing that it can prove the following:

  • $\frac{x-3}{x+2}$ is one-to-one.

  • $\frac{x-3}{x^3}$ is not one-to-one.


Solution 1:

To show that $f$ is 1-1, you could show that $$f(x)=f(y)\Longrightarrow x=y.$$ So, for example, for $f(x)={x-3\over x+2}$:

Suppose ${x-3\over x+2}= {y-3\over y+2}$. Then: \begin{align*} &{x-3\over x+2}= {y-3\over y+2} \\ \Longrightarrow& (y+2)(x-3)= (y-3)(x+2)\\ \iff& yx+2x-3y-6= yx-3x+2y-6\\ \iff&2x-3y =-3x+2y\\ \iff&2x+3x =2y+3y\\ \iff&5x =5y\\ \iff&x=y \end{align*} So $f(x)={x-3\over x+2}$ is 1-1.

I'll leave showing that $f(x)={{x-3}\over 3}$ is 1-1 for you.

Alternatively, to show that $f$ is 1-1, you could show that $$x\ne y\Longrightarrow f(x)\ne f(y).$$

Or, for a differentiable $f$ whose derivative is either always positive or always negative, you can conclude $f$ is 1-1 (you could also conclude that $f$ is 1-1 for certain functions whose derivatives do have zeros; you'd have to insure that the derivative never switches sign and that $f$ is constant on no interval).


You would discover that a function $g$ is not 1-1, if, when using the first method above, you find that the equation is satisfied for some $x\ne y$. For example, take $g(x)=1-x^2$. Then

$$ \eqalign{ &g(x)=g(y)\cr \iff&{1-x^2}= {1-y^2} \cr \iff&-x^2= -y^2\cr \iff&x^2=y^2\cr} $$ The above equation has $x=1$, $y=-1$ as a solution. So, there is $x\ne y$ with $g(x)=g(y)$; thus $g(x)=1-x^2$ is not 1-1.

Of course, to show $g$ is not 1-1, you need only find two distinct values of the input value $x$ that give $g$ the same output value.


Although you rightfully point out that the graphical method is unreliable; it is still instructive to consider the methods used and why they work:

Graphically, you can use either of the following:

  1. Use the "Horizontal Line Test":

$f$ is 1-1 if and only if every horizontal line intersects the graph of $f$ in at most one point. Note that this is just the graphical interpretation of "if $x\ne y$ then $f(x)\ne f(y)$"; since the intersection points of a horizontal line with the graph of $f$ give $x$ values for which $f(x)$ has the same value (namely the $y$-intercept of the line).

  1. Use the fact that a continuous $f$ is 1-1 if and only if $f$ is either strictly increasing or strictly decreasing. This, of course, is the case if $f$ is differentiable and the derivative is always positive or always negative (with perhaps being zero at "isolated" points). (Note this method applies to only the green function below.)

enter image description here

Solution 2:

A one-to-one function is an injective function. A function $f:A\rightarrow B$ is an injection if $x=y$ whenever $f(x)=f(y)$.

Both functions $f(x)=\dfrac{x-3}{x+2}$ and $f(x)=\dfrac{x-3}{3}$ are injective.

Let's prove it for the first one

$$ \begin{eqnarray*} f(x) &=&f(y)\Leftrightarrow \frac{x-3}{x+2}=\frac{y-3}{y+2} \\ &\Rightarrow &\left( y+2\right) \left( x-3\right) =\left( y-3\right) \left( x+2\right) \qquad(\text{for }x\neq-2,y\neq -2)\\ &\Rightarrow &xy-3y+2x-6=xy+2y-3x-6 \\ &\Rightarrow &-3y+2x=2y-3x\Leftrightarrow 2x+3x=2y+3y \\ &\Rightarrow &5x=5y\Rightarrow x=y. \end{eqnarray*}$$

So we concluded that $f(x) =f(y)\Rightarrow x=y$, as stated in the definition.

As for the second, we have $$ \begin{eqnarray*} f(x) =f(y)\Leftrightarrow \frac{x-3}{3}=\frac{y-3}{3} \Rightarrow &x-3=y-3\Rightarrow x=y. \end{eqnarray*} $$

An example of a non injective function is $f(x)=x^{2}$ because $$ \begin{eqnarray*} f(x) =f(y)\Leftrightarrow x^{2}=y^{2} \Rightarrow x=y\quad \text{or}\quad x=-y. \end{eqnarray*} $$

Solution 3:

For your modified second function $f(x) = \frac{x-3}{x^3}$, you could note that $$f(x) - f(y) = \frac{(x-y)((3-y)x^2 +(3y-y^2) x + 3 y^2)}{x^3 y^3}$$ As a quadratic polynomial in $x$, the factor $ (3-y)x^2 +(3y-y^2) x + 3 y^2$ has discriminant $y^2 (9+y)(y-3)$. So when either $y > 3$ or $y < -9$ this produces two distinct real $x$ such that $f(x) = f(y)$.