To determine if a function has an inverse, we can use the horizontal line test with its graph. If any horizontal line drawn crosses the function more than once, then the function has no inverse. For a function to have an inverse, each output of the function must be produced by a single input. Look at the following examples to fully understand this idea.

## Definition of inverse function

Before we start with the inverses of functions, we have to briefly review the functions.

Let’s consider the function . We know how to evaluate the function *f* at 2, . We can think of the function *f* as something that transforms 2 into 1 and 4 into 5:

Therefore, since the function *f* is acting on the numbers and transforming them, we can think of the inverse of *f* as something that “reverses” the effect of the function *f*. That is, the inverse of *f* must take 1 as input and produce 2 and take 5 to produce 4.

Suppose we have the function . When evaluating it with input 1, it results in and when evaluating it with input 5, it results in . We can see that function *g* seems to reverse the effect of function *f*.

To prove that the function *g* is the inverse of *f*, we must show that this is true for any value of *x* in the domain of *f*. That is, the function *g* must take and return *x*. Then must be true for all values of *x* in the domain of *f*.

One way to verify this is simply by checking if returns *x*:

Using to denote the inverse of *f*, we have just shown that .

## Graph of inverse functions

We know that the reflection of a point (*a, b*) with respect to the *x*-axis is (*a, -b*) and that the reflection of (*a, b*) with respect to the *y*-axis is (-*a, b*). Now, we want to reflect with respect to the line .

The following graph illustrates the reflection of the point (*a, b*) with respect to the line to form the point (*b, a*):

If we have the function , then we have and the point (1, 2) is on the graph of *f*. The inverse function of *f* must take 2 as input and produce 1 as output, that is, and the point (2, 1) is on the graph of .

The point (2, 1) is the reflection of the point (1, 2) with respect to the line . The same happens with the rest of the points in the graph of *f*, so the inverse is the graph that results when reflecting the graph of *f* about the line :

Start now: Explore our additional Mathematics resources

## How to know if a function has an inverse?

Some functions do not have inverses. For example, suppose we have the function . The function can take two different numbers and produce the same output, for example, and . If *f* had an inverse, this would mean that this function would take 9 to produce both 3 and -3.

However, this runs contrary to the definition of a function, which states that each input should produce only one output. Therefore, there is no function that is the inverse of *f*.

In terms of graphs, if *f* had an inverse, then its graph would be a reflection of the graph of *f* with respect to :

We can see that the reflected graph does not pass the vertical line test, which means that the graph does not represent a function. We can generalize this as follows:

**A function f has an inverse only if when its graph is reflected with respect to y = x, the result is a graph that does pass the vertical line test. But we can simplify this. We can determine before reflecting the graph whether the function has an inverse or not by using the horizontal line test.**

### Horizontal line test

We have the function *f*. The horizontal line test tells us that:

- If any horizontal line intersects the graph of
*f*more than once, then*f*does not have an inverse. - If any horizontal line does not intersect the graph of
*f*more than once, then*f*does have an inverse.

### EXAMPLES

- Using the horizontal line test with the function , we can see that the function does pass this test, which means that it has an inverse.

- Using the horizontal line test with the function , we can see that the function does not pass this test, so it does not have an inverse.

## Finding inverse functions – Method and examples

Let’s start by considering a simple function .

The graph of *f* is a line with slope 2, therefore, it passes the horizontal line test and has an inverse.

There are two steps required to evaluate *f* at a number *x*. First, we multiply the *x* by 2 and then we add 3.

To get the inverse of the function, we must reverse those effects in reverse order. Therefore, to form the inverse function , we start by reversing the sum of 3 by subtracting 3. Then, we reverse the multiplication by 2 by dividing by 2. Then, we have:

### Steps to find the inverse of a function *f*

**Step 1:** Replace by *y* in the equation of the function.

** Step 2:** Swap the

*x*‘s and

*y*‘s.

** Step 3:** Solve for

*y*.

** Step 4:** Replace

*y*by .

### EXAMPLE 1

Find the inverse of .

**Step 1:**

**Step 2:**

**Step 3:**

**Step 4:**

### EXAMPLE 2

Find the inverse of .

**Step 1:**

**Step 2:**

**Step 3:**

**Step 4:**

### Try solving the following practice problems

## See also

Interested in learning more about functions? Take a look at these pages:

### Learn mathematics with our additional resources in different topics

**LEARN MORE**