# One to one Function (Definition, Graph & Examples)

Contents

## Revision of basics (Function, Domain and Range)

Function: Function is a special relation, a relation which maps an input to only a single output. For example, the relation {(1,3),(2,3),(3,4),(8,-2)} represents a function since each input has only a single output. It can be noted that, however, two different inputs (‘1’ and ‘2’ in this case) may be mapped to the same output number (i.e., ‘3’). On the other hand, the relation {(1,3),(2,3),(5,6),(2,4)} does not represent a function because now a single input i.e., ‘2’ maps to two different outputs i.e., ‘3’ and ‘4’. Therefore, the condition that makes a relation able to be called a function is that an input must only have a single output.

The input of a function represented by a variable is called the independent variable (usually symbolized as x). The output of a function represented by a variable is called the dependent variable (usually symbolized as y).

Domain and Range: The set containing all the input numbers at which a function is defined is called the set of domain. It is represented by the symbol X. The set containing all the elements that are the images of elements of the set of domain is called the set of range. It is usually represented by the symbol Y.

## The idea of one-one function

One to one function, or one-one function or Injective function is a function with a special condition. The condition is that each element in set Y (or set of Range) is an image of not more than one element in set X (or set of Domain). In other words, no two elements in the set of domain map to the same element in the set of range. For example, the relation {(10,20),(12,24),(15,30)} represents a function with domain {10,12,15} and range {20, 24, 30} (because each element in domain does not map to more than one element in range). Also, the function is one-one function because no two elements in domain map to the same element in set of range (You may have to read the last lines again to fully understand. Make sure that you are comfortable with the idea).

One the other hand, the relation {(10,20),(12,24),(15,20)} represents a function but this function is not one-one because both 10 & 15 (in the set of domain) map to the same number 20 (in the set of range).

In form of equation, the function $f(x) = \sqrt{x}$ (domain and range is set of positive real numbers) is an example of one-one function because only positive real numbers are allowed as input, and no two positive real numbers have equal value of their square roots.

The function $f(x) = (x-1)^{2}$ (domain is set of all real numbers and range is set of positive real numbers only) is an example of a function that is not one-one. Can you see why? Because observe that $f(2)=1$ and $f(0)=1$ i.e., same output for two different input values. Similarly, $f(3)=4$ and $f(-1)=4$. In fact, there are infinitely many points at which this function violates the condition for being a one-one function. Therefore, $f(x) = (x-1)^{2}$ is not a one-one function. Remember, only a single case of violation is enough to declare a function not one-one.

One-one functions have great significance as they help identify whether a function is invertible or not (an invertible function is the one whose inverse is also a function).

Exercise: Try to classify the following functions as either one-one or not one-one. We will see a better way of identifying one-one functions.

• $f(x) = \frac{1}{x^{2}}$
• $g(x) = \frac{1}{x-1}$
• $h(x) = x^{3} - x^{2}$
• $l(x) = x^{3}$

## How to identify one-one function?

After looking at the above exercise, you may have come to know that it becomes difficult sometimes to confidently predict whether a function is one-one or not. Consider the functions $f(x) = x^{3} + x^{2} + x$ and $g(x) = x^{3} + x^{2} - x$. Can you guess the nature of both functions? It might surprise you that f(x) is a one-one function whereas g(x) is not a one-one function. How do we know when we encounter such complicated functions? What should be done now? Maybe we should see how their graphs look like.

Figure 1 Graph of $f(x) = x^{3} + x^{2} + x$

Figure 2 Graph of $g(x) = x^{3} + x^{2} - x$

The differences between the graphs are visible. But has any of the difference any relation with f(x) being a one-one function and g(x) being not a one-one function?

Let us ‘invent’ our own technique using whatever we have learnt so far. Following are some important facts that will be utilized.

• We know that it is a characteristic of a one-one function that no two values in domain can map to single value in range.
• It is also known that the range is represented along the vertical, y-axis in a graph of a function (and domain along the horizontal, x-axis).
• Third fact, a single constant value of y (i.e., output of function) can be represented as a horizontal line at that value of y on the graph. Therefore, the x-axis can be considered as the line y = 0. Similarly, y = 1 would represent a horizontal line at y = 1, y = 5 would represent a horizontal line at y = 5.

Now, consider this. If a curve intersects any horizontal line at more than one point, what does it mean? (You may refer to the above two graphs). It means that a single value of y (i.e., output of the function) occurs at more than two different values of x (i.e., input). Does it sound familiar? Yes, this is actually the violation of the condition for a function to be one-one function (or Injective function). This is the famous Horizontal line test. It is reiterated below.

Horizontal line test: If the graph of a function intersects any horizontal line at more than a single point on the curve, then the curve does not represent a one-one function. Otherwise, if no horizontal line intersects the curve at more than a single point, then the curve represents a one-one function.

Keeping this fact in mind, now try to see how the equation $f(x) = x^{3} + x^{2} + x$ represents a one-one function whereas the equation $g(x) = x^{3} + x^{2} - x$ does not qualify as one-one function. You can observe that the curve for f(x) is monotonic it is just increasing in one direction. Therefore, it is not possible for any horizontal line to intersect the curve at more than a single point. On the other hand, it can be observed that the x-axis i.e., the line y = 0 intersects the curve at three different values of x. In other words, at three different values of x (element of domain), we have the same output y = 0. Thus, g(x) fails the horizontal line test and is not a one-one function. It can also be learnt that whenever a curve changes direction from increasing to decreasing or from decreasing to increasing, it will always fail the horizontal line test. Therefore, if there is any hump in the graph of a function, then it fails to become a one-one function (See there are several ways of looking at something in maths. Also, graphs are indeed powerful).

Exercise: Graph the functions mentioned in the last exercise. Then identify which of the functions represent one-one and which of them do not.

Algebraic method: There is also an algebraic method that can be used to see whether a function is one-one or not. It goes like this, substitute $x = x_{1}$ and $x = x_{2}$ in the expression of the given function and equate the two expressions. Solve the equation. If $x_{1}$ and $x_{2}$ come out to be equal then the function is one to one function (It would simply mean that $f(x_{1}) = f(x_{2}) \,at \, x_{1}=x_{2}$ i.e., at only a single value of x).

For example, for $f(x) = \frac{1}{x}$, solve for $f(x_{1}) = f(x_{2})$ i.e., $\frac{1}{x_{1}} = \frac{1}{x_{2}}$ or, $x_{1}= x_{2}$. In other words, $f(x_{1}) = f(x_{2})$ at only a single value of x. For the function, $f(x) = \frac{1}{x^{2}}$, solve for $f(x_{1}) = f(x_{2})$ i.e., $\frac{1}{x_{1}^{2}} = \frac{1}{x_{2}^{2}}$ or $x_{1}^{2} = x_{2}^{2}$, or $x_{1}= \pm x_{2}$. Thus, at $x_{1} = x_{2}$ and $x_{1} = -x_{2}$ (at more than a single x value), the function has single output value. Therefore, $f(x) = \frac{1}{x^{2}}$ is not a one-one function.

Algebraic method can be difficult to work with when the expression of the function involves several terms with higher exponents.

## Properties of one-one function

One-one functions have some unique properties that you should keep in mind.

• Given that two functions g(x) and h(x) are one-one functions. Their composition i.e., $(g\, o\, h)(x)=g(h(x))$ and $(h\, o\, g)(x)=h(g(x))$ are also one-one functions. For example, for $g(x) = (x-1)^{3}$ and $h(x) = \frac{1}{x}$, being two one-one functions, their two separate compositions i.e., (g o h)(x) and (h o g)(x) represent two individual one-one functions (As an exercise find these composite functions and try to verify whether they are one-one).
• If a function is one-one function, then its inverse is also a function (we will discuss it in next section). Conversely, an invertible function (a function whose inverse is also a function) is one-one function also.
• Graph of one-to-one function is monotonic i.e., either increasing or decreasing.
• If a composite function (g o h)(x) is one-one, then h(x) is necessarily one-one also (not the outer function g(x)). Note that if (h o g)(x) is one-one, then g(x) is necessarily one-one function i.e., the inner function of the composition holds the qualification for being one-one.
• Graph of a one-one function intersects any vertical as well as any horizontal line at not more than a single point.
• The curve of inverse of one-one function is its mirror image along y = x line.

## Relation between one-one function and invertible function

An invertible function is a function whose inverse is also a function. For example, the function f(x) = 3x + 10 is an invertible function. An invertible function always satisfies the horizontal line test. A one-one function also satisfies the horizontal line test always. This means that a one-one function is also an invertible function. This should make sense because the domain of a function is range of its inverse, and its range is the domain of its inverse. Therefore, the range of an invertible function has to be composed of uniquely (one-one) mapped elements (because it is the domain of the inverse function).

It should be noted that the graph of inverse of one-one function is just the mirror image of the graph of one-one function itself along the line y = x. For example, observe the following graph of an exponential function $e^{x}$.

First of all, it can be seen that the curve of the given function (in purple colour) does not intersect any horizontal line at more than a single point (yeah it may seem that as x approaches negative infinity, the curve becomes horizontal. But the fact is that it still has non-zero slope always and therefore a horizontal line does not intersect it at more than a single point). In other words, the function passes the horizontal line test and therefore, is a one-one function.

Can you find its domain? As a matter of fact, the domain of this function is the set of all real numbers (since the graph exists and is continuous for the entire length of the x-axis). What is its range? Is it set of all real numbers also? The answer is “No”. The range is only the set of positive real numbers because the curve of f(x) (in purple) does not exist for negative values of y.

Is this function invertible? Indeed, it is invertible since it is a one-one function. Note that the graph of the inverse of the function is truly its reflection along the y=x line.

What are the domain and range of the inverse of one-one function? Looks difficult? In reality, this is easiest of the questions. The domain of the inverse function is the range of the original one-one function i.e., set of positive real numbers only (it is also evident from the graph). Similarly, the range of the inverse function is the domain of the original one-one function i.e., set of all real numbers.

The reader is highly encouraged to solve the entire exercise presented next. It has been specifically designed to summarize, and test your understanding of this entire topic.

Exercise: Identify whether the function $f(x) = \sqrt{x}$ is one-one or not. If it is one-one function then find whether the composite function (f o f)(x) is one-one or not. Find the inverse of the  function (Hint: Replace f(x) by the symbol y and isolate the variable x on left hand side. Then swap the symbols x and y. You have the expression for inverse function). Graph the original function and its inverse (by utilizing the reflection technique). Also, find the domain and range of f(x) and its inverse.

Sources: