This site is a work in progress. New lessons are added regularly. Contact us

Graphs of Inverse Functions

Learning goals

  • Reflect a graph across y=xy = x to draw its inverse
  • Swap the coordinates of any point you can read off
  • Trade domain for range when the axes swap
  • Recognize a fixed point where the graph meets the diagonal
  • Turn the horizontal line test into the vertical one by reflecting
  • Restrict to a one-to-one branch before inverting y=x2y = x^2

The swap of coordinates is a reflection

Recall the one idea the whole inverse rests on: f1f^{-1} reverses ff by swapping each input with its output. On a graph that swap has a precise meaning. A point (a,b)(a, b) on the graph of ff records the single fact that the input aa produces the output bb, that is, b=f(a)b = f(a). The inverse reverses that fact: it takes the input bb back to the output aa, which is the point (b,a)(b, a) on the graph of f1f^{-1}. So each point of ff has a partner on f1f^{-1} with the two coordinates switched.

Written as a chain of equivalent statements, the correspondence is exact:

(a,b) on the graph of f    b=f(a)    a=f1(b)    (b,a) on the graph of f1.\begin{aligned} (a, b) \text{ on the graph of } f &\iff b = f(a) \iff a = f^{-1}(b) \\ &\iff (b, a) \text{ on the graph of } f^{-1}. \end{aligned}

The middle step is just the definition of the inverse: b=f(a)b = f(a) says exactly the same thing as a=f1(b)a = f^{-1}(b), because applying f1f^{-1} to both sides of b=f(a)b = f(a) gives f1(b)=af^{-1}(b) = a. Read end to end, the chain says a point is on the graph of ff exactly when its coordinate-swap is on the graph of f1f^{-1}.

That leaves one geometric question: what does switching the two coordinates of a point do to its position in the plane? It reflects the point across the line y=xy = x. The line y=xy = x is the set of points whose two coordinates are equal, the perfect diagonal through the origin at forty-five degrees. Swapping the coordinates of a point that is not on that line carries it to the mirror-image spot on the other side, the same distance away.

Swapping coordinates reflects a point across y = xThe points (a, b) and (b, a) on opposite sides of the line y = x, joined by a segment whose midpoint lies on the line.xy1414y = x(a, b)(b, a)
Swapping the coordinates of a point reflects it across the dashed line y = x. The point (a, b) and its swap (b, a) sit the same distance from the line on opposite sides, and the segment joining them is cut in half at a right angle by y = x, which is exactly what it means for the line to be their mirror.

Swapping coordinates reflects a point across y=xy = x#

Take a point P=(a,b)P = (a, b) with aba \ne b, so PP is not on the diagonal, and let Q=(b,a)Q = (b, a) be its coordinate-swap. To show the line y=xy = x is the mirror that sends PP to QQ, it is enough to show that line is the perpendicular bisector of the segment PQPQ. The perpendicular bisector is the line that meets PQPQ at a right angle through its midpoint.

First, the midpoint of PQPQ is

(a+b2, a+b2),\left( \frac{a + b}{2},\ \frac{a + b}{2} \right),

whose two coordinates are equal, so the midpoint lies on y=xy = x.

Second, the segment PQPQ runs from (a,b)(a, b) to (b,a)(b, a), so its slope is

abba=1,\frac{a - b}{b - a} = -1,

while the line y=xy = x has slope 11. Two slopes whose product is 1-1 mark perpendicular lines, and (1)(1)=1(1)(-1) = -1, so PQPQ crosses y=xy = x at a right angle.

The diagonal passes through the midpoint of PQPQ and is perpendicular to it, so it is the perpendicular bisector of PQPQ. Reflecting PP across y=xy = x therefore lands exactly on QQ. A point already on the diagonal has a=ba = b, so its swap (b,a)=(a,b)(b, a) = (a, b) is itself and it does not move. Either way, switching the coordinates of a point is the same as reflecting it across y=xy = x.

The graph of an inverse is the mirror image across y = x

Put the two halves together. Every point (a,b)(a, b) on the graph of ff corresponds to the point (b,a)(b, a) on the graph of f1f^{-1}. Moving from (a,b)(a, b) to (b,a)(b, a) is a reflection across the line y=xy = x. Apply that reflection to every point at once, and the entire graph of ff is carried onto the entire graph of f1f^{-1}. This is the central fact of the lesson.

The graph of f1f^{-1} is the reflection of the graph of ff across the line y=xy = x.

Nothing about the reflection depends on having a formula for ff. Whatever the shape of ff, its inverse is the same shape flipped across the diagonal. If you can draw ff, you can draw f1f^{-1}: reflect it across y=xy = x.

A line and its inverse reflected across y = xThe line y = 2x minus 1 and its inverse y = (x plus 1) over 2, mirror images across y = x, with the point (2, 3) reflecting to (3, 2).xy24-224-2y = x(2, 3)(3, 2)y = f(x)y = f-1(x)
The line y = f(x) with slope 2 (dark) and its inverse (blue) with slope one half are mirror images across the dashed line y = x. The point (2, 3) on f reflects to (3, 2) on the inverse, and the short dashed segment joining them meets y = x at a right angle. Reading the inverse is reading f with the two coordinates swapped.

The figure shows it for a line. The function f(x)=2x1f(x) = 2x - 1 has a steep graph of slope 22; its inverse f1(x)=x+12f^{-1}(x) = \dfrac{x + 1}{2} has the gentle graph of slope 12\tfrac{1}{2}. The two lines are mirror images across the dashed diagonal. The point (2,3)(2, 3) sits on ff because f(2)=2(2)1=3f(2) = 2(2) - 1 = 3, and its reflection (3,2)(3, 2) sits on f1f^{-1} because f1(3)=3+12=2f^{-1}(3) = \dfrac{3 + 1}{2} = 2.

Worked example 1 Sketch the inverse of a line from its graph

The graph of f(x)=2x+2f(x) = 2x + 2 is a line through (1,0)(-1, 0), (0,2)(0, 2), and (1,4)(1, 4). Sketch the graph of f1f^{-1} without first finding a formula for it.

By the reflection rule, each point of ff reflects across y=xy = x to a point of f1f^{-1} with its coordinates swapped. Swap the coordinates of the three known points:

(1,0)(0,1),(0,2)(2,0),(1,4)(4,1).(-1, 0) \to (0, -1), \qquad (0, 2) \to (2, 0), \qquad (1, 4) \to (4, 1).

Plot (0,1)(0, -1), (2,0)(2, 0), and (4,1)(4, 1) and draw the line through them. That line is the graph of f1f^{-1}, the mirror image of ff across the diagonal.

As a check, find the formula the algebraic way: from y=2x+2y = 2x + 2, swap to x=2y+2x = 2y + 2, and solve for y=x22y = \dfrac{x - 2}{2}. Then

f1(0)=22=1,f1(2)=0,f1(4)=1,f^{-1}(0) = \frac{-2}{2} = -1, \qquad f^{-1}(2) = 0, \qquad f^{-1}(4) = 1,

which are exactly the three reflected points. The graph and the formula agree.

Reading an inverse straight off a graph

The reflection rule turns graphing an inverse into a mechanical task: take points you can read off ff and swap each one’s coordinates. You never need the formula for f1f^{-1}, and often you never even need the formula for ff. That is what makes the graphical view so useful. A function given only by a curve, with no equation at all, still has an inverse you can plot point by point.

Worked example 2 Read four points of an inverse off a graph

A function gg is given only by its graph, a curve passing through (2,3)(-2, -3), (0,1)(0, 1), (1,3)(1, 3), and (3,4)(3, 4). The curve rises steadily from left to right, so it passes the horizontal line test and has an inverse. Find four points on the graph of g1g^{-1}.

Swap the coordinates of each known point, since g1g^{-1} is the reflection of gg across y=xy = x:

(2,3)(3,2),(0,1)(1,0),(1,3)(3,1),(3,4)(4,3).(-2, -3) \to (-3, -2), \quad (0, 1) \to (1, 0), \quad (1, 3) \to (3, 1), \quad (3, 4) \to (4, 3).

So g1g^{-1} passes through (3,2)(-3, -2), (1,0)(1, 0), (3,1)(3, 1), and (4,3)(4, 3). Each new point is the mirror of an old one. For instance, g(1)=3g(1) = 3 becomes g1(3)=1g^{-1}(3) = 1: the input and output trade roles, and no formula was needed anywhere.

Check your understanding

The point (4,7)(-4, 7) lies on the graph of ff. Which point must lie on the graph of f1f^{-1}?

Answer choices

Domain and range trade places by swapping the axes

The reflection also explains, in a single picture, why the domain and range swap when you invert. Reflecting across y=xy = x does more than move the curve. It swaps the two axes themselves: the horizontal axis (every point (t,0)(t, 0)) reflects to the vertical axis (every point (0,t)(0, t)), and the reverse. So a horizontal extent of a graph becomes a vertical extent after the flip, and a vertical extent becomes horizontal.

Now recall how a graph shows domain and range. The domain is the horizontal spread of the curve, read along the xx-axis; the range is its vertical spread, read along the yy-axis. When the graph of ff reflects to the graph of f1f^{-1}, its horizontal spread becomes the new curve’s vertical spread. Likewise the vertical spread of ff becomes the new curve’s horizontal spread. In other words,

This is exactly the domain-range swap you proved algebraically for inverses, now visible as the geometric fact that reflecting across y=xy = x trades the two axes.

Worked example 3 Track the domain and range through the reflection

The function f(x)=x+1f(x) = \sqrt{x} + 1 has domain x0x \ge 0 (the square root needs a nonnegative input) and range y1y \ge 1 (the smallest output is 0+1=1\sqrt{0} + 1 = 1). Find the domain and range of f1f^{-1} from the reflection.

Reflecting across y=xy = x swaps the horizontal and vertical spreads, so the domain and range trade:

domain of f1=range of f,range of f1=domain of f.\text{domain of } f^{-1} = \text{range of } f, \qquad \text{range of } f^{-1} = \text{domain of } f.

The range of ff was y1y \ge 1, so the domain of f1f^{-1} is x1x \ge 1. The domain of ff was x0x \ge 0, so the range of f1f^{-1} is y0y \ge 0.

A check against the formula agrees: from y=x+1y = \sqrt{x} + 1, swap to x=y+1x = \sqrt{y} + 1, so y=x1\sqrt{y} = x - 1 and y=(x1)2y = (x - 1)^2 for x1x \ge 1. That inverse accepts only x1x \ge 1 and returns values y0y \ge 0, matching the swapped domain and range.

Check your understanding

A function hh has domain 2x82 \le x \le 8 and range 1y5-1 \le y \le 5. What are the domain and range of h1h^{-1}?

Answer choices

Fixed points stay on the mirror

A point that already lies on the line y=xy = x has equal coordinates, (c,c)(c, c), so swapping them changes nothing: its reflection is itself. Such a point is called a fixed point of the reflection. This has a handy consequence for sketching. Wherever the graph of ff crosses the diagonal y=xy = x, that crossing point is shared with the graph of f1f^{-1}. That is because a point on the mirror is its own image.

Concretely, suppose f(c)=cf(c) = c for some input cc, so that (c,c)(c, c) is on the graph of ff. Reflecting fixes that point, so (c,c)(c, c) is on the graph of f1f^{-1} as well, meaning f1(c)=cf^{-1}(c) = c. A value the function leaves unchanged is left unchanged by the inverse too. When you sketch an inverse, marking where ff meets y=xy = x gives you anchor points that do not move, which pins down the reflected curve.

The horizontal line test becomes the vertical line test

Back in the Inverse Functions lesson you saw that a function has an inverse only when it is one-to-one. On a graph that condition is the horizontal line test: no horizontal line may cross the graph more than once. The reflection across y=xy = x shows why that is exactly the right test.

Reflecting across the diagonal turns a horizontal line into a vertical line. A horizontal line y=cy = c is the set of points at height cc; swapping coordinates sends each point (t,c)(t, c) to (c,t)(c, t), and those make up the vertical line x=cx = c. So horizontal lines and vertical lines are mirror images of each other across y=xy = x.

Now watch what that does to the two line tests. Suppose some horizontal line crosses the graph of ff twice, so ff fails the horizontal line test and is not one-to-one. Reflect the whole picture. The graph of ff becomes the graph of f1f^{-1}, and the offending horizontal line becomes a vertical line that crosses the reflected curve twice. A curve that some vertical line meets twice is not the graph of a function, by the vertical line test. So when ff fails the horizontal line test, its reflection fails the vertical line test and cannot be a function. The reflection is a function exactly when ff passed the horizontal line test to begin with. The two tests are mirror images, which is why one-to-one is precisely the condition for an inverse function to exist.

The reflection of y = x squared fails the vertical line testThe upward parabola y = x squared and its reflection x = y squared across y = x; a horizontal line crosses the parabola twice and the mirror vertical line crosses the reflection twice.xy1212y = xy = 2x = 2y = x²x = y²
Why a function that fails the horizontal line test has no inverse graph. The solid curve y = x squared (dark) and its reflection across the dashed line y = x (blue) are mirror images. The horizontal line y = 2 crosses the parabola at two points, so the parabola fails the horizontal line test. Its mirror image, the vertical line x = 2, crosses the reflected curve at the two mirror points, so the reflection fails the vertical line test and is not the graph of a function.

Worked example 4 Which reflections are graphs of functions?

Compare f(x)=x3f(x) = x^3 and g(x)=x2g(x) = x^2, both reflected across y=xy = x.

The cube f(x)=x3f(x) = x^3 always rises: as xx increases, x3x^3 increases, so every horizontal line meets its graph exactly once and ff is one-to-one. Reflecting its graph across y=xy = x gives a curve that every vertical line meets exactly once. So that reflection is the graph of a genuine function, the inverse (the cube-root curve y=x3y = \sqrt[3]{x}). No restriction is needed.

The square g(x)=x2g(x) = x^2 is different. The horizontal line y=4y = 4 meets its graph twice, at (2,4)(-2, 4) and (2,4)(2, 4), because

(2)2=22=4.(-2)^2 = 2^2 = 4.

Reflecting, those two points become (4,2)(4, -2) and (4,2)(4, 2), both on the reflected curve, so the vertical line x=4x = 4 meets the reflection twice. The reflected sideways parabola is not the graph of a function, which is the picture of the fact that x2x^2 on all inputs has no inverse. The next section repairs it.

Check your understanding

The graph of a function pp is reflected across the line y=xy = x. The reflection is itself the graph of a function exactly when pp...

Answer choices

Graphing the inverse of a restricted function

When a function fails the horizontal line test, you cannot reflect its whole graph and get a function. The fix from the Inverse Functions lesson was to shrink the domain until the rule is one-to-one, then invert that piece. Graphically, that means reflecting only the surviving branch.

Take f(x)=x2f(x) = x^2 again, and restrict it to x0x \ge 0. The graph is now just the right half of the parabola, the branch in the first quadrant. That branch passes the horizontal line test: each height is reached by a single nonnegative input. Reflect that single branch across y=xy = x. Because the branch lives in the first quadrant, its reflection also lives in the first quadrant, and it is the graph of y=xy = \sqrt{x}. Restricting first, then reflecting, produces the square-root curve, exactly the inverse you found by algebra.

The right branch of y = x squared reflects to y = square root of xThe branch of y = x squared for x at least 0 and its reflection y = square root of x across the line y = x, with (2, 4) reflecting to (4, 2).xy12341234y = x(2, 4)(4, 2)y = x²y = √x
Reflecting one branch of a parabola gives a square root. Restricting y = x squared to inputs x greater than or equal to 0 keeps only the right branch (dark), which passes the horizontal line test. Reflecting that branch across the dashed line y = x gives the solid blue curve y = square root of x, the inverse. The point (2, 4) on the parabola reflects to (4, 2) on the square root.

Worked example 5 Graph the inverse of f(x)=x2f(x) = x^2 on x0x \ge 0

With the domain restricted to x0x \ge 0, plot a few points on the branch and swap coordinates. Three easy points on y=x2y = x^2 with x0x \ge 0 are

(0,0),(1,1),(2,4).(0, 0), \qquad (1, 1), \qquad (2, 4).

Reflect each across y=xy = x by swapping coordinates:

(0,0)(0,0),(1,1)(1,1),(2,4)(4,2).(0, 0) \to (0, 0), \qquad (1, 1) \to (1, 1), \qquad (2, 4) \to (4, 2).

The points (0,0)(0, 0) and (1,1)(1, 1) sit on the diagonal, so they are fixed and do not move, while (2,4)(2, 4) reflects to (4,2)(4, 2). Draw a smooth curve through (0,0)(0, 0), (1,1)(1, 1), and (4,2)(4, 2): it rises steeply at first and then flattens, the shape of y=xy = \sqrt{x}. The reflection of the restricted parabola is the square-root graph, so f1(x)=xf^{-1}(x) = \sqrt{x}, matching the algebra where x=y2x = y^2 with y0y \ge 0 solves to y=xy = \sqrt{x}.

Had you tried to reflect the entire parabola instead, the left branch would have reflected to the lower half of a sideways parabola. The reflection of the whole parabola would fail the vertical line test. Restricting to one branch is what keeps the reflection a function.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

A secret message is worth nothing if the person waiting for it cannot get the message back out again. Every code has to carry its own undoing.

Around 1467 Leon Battista Alberti, an Italian architect and scholar, built a tidy device for the job. He cut two metal disks, one slightly smaller, and pinned them together at the center. The outer ring carried the plain letters and the inner ring carried the code letters. Set the rings once, and each plain letter sits against exactly one code letter.

Now watch what the receiver does. No second device is needed. The same pairing is simply read from the inner ring outward, rather than from the outer ring inward. One object, two directions of reading. The disk also shows why no two plain letters may ever share a code letter. A reader who arrived at that letter would have no way to choose between them.

Both of those facts are this lesson in other clothing. Swapping the two coordinates of every point reads one pairing from the opposite side, and that swap is exactly the reflection across y=xy = x. A curve that some horizontal line meets twice is a disk with two letters stamped on one mark. Reflect it and the vertical line test fails, which is why only a one-to-one function earns an inverse.