# 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:

This is one-to-one: $\frac{x-3}{x+2}$

This is not one-to-one: $\frac{x-3}{x^3}$

-
Composition of 1-1 functions is also 1-1. –  Nick Alger Jan 24 '12 at 15:19
–  Arturo Magidin Jan 24 '12 at 15:38

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: \eqalign{ &{x-3\over x+2}= {y-3\over y+2} \cr \Longrightarrow& (y+2)(x-3)= (y-3)(x+2)\cr \iff& yx+2x-3y-6= yx-3x+2y-6\cr \iff&2x-3y =-3x+2y\cr \iff&2x+3x =2y+3y\cr \iff&5x =5y\cr \iff&x=y. } 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, to show that a differentiable $f$ is 1-1, you could show that its derivative $f'$ is either always positive or always negative.

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).

2. 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 equivalent to the derivative being always positive or always negative in the case where $f$ is differentiable. (Note this method applies to only the green function below.)

-
Thank you for your time! Points up and answer accepted! –  Oliver Spryn Jan 24 '12 at 17:30
What if the equation in question is the square root of x? Obviously it is 1:1 but I always end up with the absolute value of x being equal to the absolute value of y. What have I done wrong? –  louie mcconnell Jul 17 '14 at 9:37
@louiemcconnell The domain of the square root function is the set of non-negative reals. Keep this in mind when solving $|x|=|y|$ (you actually solve $x=|y|$, $x\ge 0$). –  David Mitra Jul 17 '14 at 9:43

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*}$$

-
Excellent answer. Points up! –  Oliver Spryn Jan 24 '12 at 17:30
@spryno724: Thanks! –  Américo Tavares Jan 24 '12 at 20:49
Since your answer was so thorough, I'll +1 your comment! –  Oliver Spryn Jan 24 '12 at 21:45

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)$.

-

## protected by Community♦Jun 30 '14 at 20:16

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?