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

• Composition of 1-1 functions is also 1-1. Jan 24 '12 at 15:19
• Jan 24 '12 at 15:38
• I think the kernal of the function can help determine the nature of a function. There's are theorem or two involving it, but i don't remember the details. Feb 5 '19 at 22:37

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

• 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? 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$). Jul 17 '14 at 9:43
• The second function given by the OP was $f(x) = \frac{x-3}{x^3}$ , not $f(x) = \frac{x-3}{3}$
– john
Nov 9 '18 at 22:22
• $f(x)=x^3$ is a 1-1 function even though its derivative is not always positive. More precisely, its derivative can be zero as well at $x=0$. Aug 10 at 8:07
• @WhoSaveMeSaveEntireWorld Thanks. I edited the answer for clarity. Aug 10 at 8:59

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! Jan 24 '12 at 17:30
• @spryno724: Thanks! Jan 24 '12 at 20:49
• The second function given by the OP was $f(x) = \frac{x-3}{x^3}$ , not $f(x) = \frac{x-3}{3}$
– john
Nov 9 '18 at 22:20

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

Before putting forward my answer, I would like to say that I am a student myself, so I don't really know if this is a legitimate method of finding the required or not. It would be a good thing, if someone points out any mistake, whatsoever.

$f(x)$ is the given function.
$f'(x)$ is it's first derivative.
By equating $f'(x)$ to 0, one can find whether the curve of $f(x)$ is differentiable at any real x or not.
$CaseI:$ $Non-differentiable$ - $One-one$
$CaseII:$ $Differentiable$ - $Many-one$

• Note that the first function isn't differentiable at $02$ so your argument doesn't work. Jan 9 '18 at 19:28
• A function doesn't have to be differentiable anywhere for it to be 1 to 1. Consider the function given by f(1)=2, f(2)=3. It is defined only at two points, is not differentiable or continuous, but is one to one. Feb 27 '18 at 21:18
• @JonathanShock , i get what you're saying. thank you for pointing out the error. i'll remove the solution asap. Feb 28 '18 at 3:03
• @Thomas , i get what you're saying. thank you for pointing out the error. i'll remove the solution asap. Feb 28 '18 at 3:03
As far as I remember a function $$f$$ is 1-1 it is bijective thus
$$f$$ is surjective $$f$$ is injective
By definition let $$f$$ a function from set $$X$$ to $$Y$$. $$f$$ is surjective if for every $$y$$ in $$Y$$ there exists an element $$x$$ in $$X$$ such that $$f(x)=y$$.
$$f$$ is injective if the following holds $$x=y$$ if and only if $$f(x) = f(y)$$.