Graphs of Inverse Functions Advanced. This lesson goes beyond core Algebra I. You can skip it.

Learning goals

  • Reflect a graph across y=xy = x by swapping the coordinates of any point you can read off
  • Trade domain for range when the axes swap
  • 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

Let ff be one-to-one, so it has an inverse defined on its range. The inverse f−1f^{-1} reverses ff by swapping each input with its output. Suppose f(1)=4f(1) = 4. Then f−1(4)=1f^{-1}(4) = 1: the point (1,4)(1, 4) on the graph of ff becomes the point (4,1)(4, 1) on the graph of f−1f^{-1}, its coordinates swapped. If you plot both points, you can see that they sit on opposite sides of the diagonal y=xy = x, the line through the origin at forty-five degrees when both axes use the same scale, like mirror images.

Swapping coordinates reflects a point across y = xThe points (1, 4) and (4, 1) on opposite sides of the line y = x, joined by a segment whose midpoint lies on the line.xy1414y = x(1, 4)(4, 1)
Swapping the coordinates of a point reflects it across the dashed line y = x. The point (1, 4) and its swap (4, 1) 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.

The diagram suggests a mirror. To prove it for any point, use the midpoint formula from The Equation of a Circle (average the endpoint coordinates) and perpendicular slopes from Graphing Lines.

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

First take P=(2,4)P=(2,4) and its swap Q=(4,2)Q=(4,2). Their midpoint is (3,3)(3,3), on y=xy=x. The segment’s slope is (2−4)/(4−2)=−1(2-4)/(4-2)=-1, perpendicular to the diagonal’s slope 11. Thus the diagonal cuts the joining segment in half at a right angle: it is the mirror between them.

Now take a point P=(a,b)P = (a, b) with a≠ba \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

a−bb−a=−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.

For a one-to-one function, b=f(a)b=f(a) means f−1(b)=af^{-1}(b)=a, and the converse holds too. Thus (a,b)(a,b) is on the graph of ff exactly when (b,a)(b,a) is on the graph of f−1f^{-1}. The proof shows that this coordinate swap is a reflection across y=xy=x.

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

For a one-to-one function, the graph of f−1f^{-1} is the reflection of the graph of ff across y=xy=x. Every old point has a coordinate-swapped point on the inverse, and every inverse point comes from this swap. Reflect the whole graph, using equal scales on the axes. You do not need a formula for f−1f^{-1}.

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. To read the inverse, read f and swap the two coordinates.

The figure shows it for a line. The function f(x)=2x−1f(x) = 2x - 1 has a steep graph of slope 22; its inverse f−1(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 f−1f^{-1} because f−1(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 f−1f^{-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 f−1f^{-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 f−1f^{-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=x−22y = \dfrac{x - 2}{2}. Then

f−1(0)=−22=−1,f−1(2)=0,f−1(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.

Reading an inverse straight off a graph

If a function is given by a one-to-one curve, read points from that curve and swap their coordinates. Use these points to guide the sketch; to get the shape between them, reflect the entire curve.

A curve given only by its graph, reflected across y = xThe curve g through (-2, -3), (0, 1), (1, 3), (3, 4) and its reflection g inverse through (-3, -2), (1, 0), (3, 1), (4, 3), mirror images across y = x.xyy = x(-2, -3)(0, 1)(1, 3)(3, 4)(-3, -2)(1, 0)(3, 1)(4, 3)y = g(x)y = g-1(x)
The curve y = g(x) (dark), given only by its graph, rises through (-2, -3), (0, 1), (1, 3), and (3, 4). It passes the horizontal line test, so reflecting it across the dashed line y = x gives the curve y = g inverse of x (blue) through the coordinate-swapped points (-3, -2), (1, 0), (3, 1), and (4, 3).

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

The graph above shows a function gg given only by its curve, no formula, 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 g−1g^{-1}.

Swap the coordinates of each known point, since g−1g^{-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 g−1g^{-1} passes through (−3,−2)(-3, -2), (1,0)(1, 0), (3,1)(3, 1), and (4,3)(4, 3). For instance, g(1)=3g(1) = 3 becomes g−1(3)=1g^{-1}(3) = 1: the input and output trade roles.

Check your understanding

ff is one-to-one, and the point (−4,7)(-4, 7) lies on its graph. Which point must lie on the graph of f−1f^{-1}?

Answer choices

Domain and range trade places by swapping the axes

The domain lists the graph’s input coordinates and the range lists its output coordinates. This gives a picture of the domain-range exchange proved algebraically in Inverse Functions. When (a,b)(a,b) becomes (b,a)(b,a), each old output becomes an input and each old input becomes an output:

Geometrically, reflecting across y=xy=x swaps horizontal and vertical directions. For example, (t,0)(t,0) reflects to (0,t)(0,t), so the x-axis reflects to the y-axis. The graph’s horizontal and vertical spreads trade places in the same way.

Worked example 3 Track the domain and range through the reflection

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

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

domain of f−1=range of f,range of f−1=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 y≥1y \ge 1, so the domain of f−1f^{-1} is x≥1x \ge 1. The domain of ff was x≥0x \ge 0, so the range of f−1f^{-1} is y≥0y \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=x−1\sqrt{y} = x - 1 and y=(x−1)2y = (x - 1)^2 for x≥1x \ge 1. That inverse accepts only x≥1x \ge 1 and returns values y≥0y \ge 0, matching the swapped domain and range.

Check your understanding

A one-to-one function hh has domain 2≤x≤82 \le x \le 8 and range −1≤y≤5-1 \le y \le 5. What are the domain and range of h−1h^{-1}?

Answer choices

Fixed points stay on the mirror

A point (c,c)(c,c) on y=xy=x stays put when its coordinates swap: it is a fixed point of the reflection. If f(c)=cf(c)=c, then f−1(c)=cf^{-1}(c)=c too, so mark (c,c)(c,c) as a shared point of the two graphs. Other intersections can occur away from this diagonal. For example, f(x)=2−xf(x)=2-x is its own inverse: swapping y=2−xy=2-x gives x=2−yx=2-y, or y=2−xy=2-x again. The two graphs share (0,2)(0,2) and (2,0)(2,0), even though those points exchange places under reflection rather than staying fixed.

For a strictly increasing function, however, every shared point is on the diagonal. An increasing graph rises from left to right, whereas two distinct coordinate-swapped points lie downhill from one another. They cannot both lie on that increasing graph.

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. Reflecting across y=xy = x shows why this test works.

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.

If a horizontal line meets ff at two distinct points, the reflected vertical line meets the reflected graph at two distinct points. That gives two outputs for one input, so the reflection is not a function.

Conversely, if every horizontal line meets ff at most once, every vertical line meets the reflection at most once. The reflected graph is then a function: f−1f^{-1}. Thus the horizontal line test for ff becomes the vertical line test for its reflection.

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 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 fixes this by restricting the domain.

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 x≥0x \ge 0. The graph is now just the right half of the parabola, the branch in the first quadrant together with the origin. 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 lies in the first quadrant or at the origin, its reflection does too, and it is the graph of y=xy = \sqrt{x}, the same 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 x≥0x \ge 0

With the domain restricted to x≥0x \ge 0, plot a few points on the branch and swap coordinates. Three easy points on y=x2y = x^2 with x≥0x \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). These three points are anchors, but by themselves they do not pin down the curve: many different curves pass through the same three points. Reflect the entire right branch across y=xy = x, not just a few points on it. The reflected curve rises steeply at first and then flattens. It is the square-root graph, so f−1(x)=xf^{-1}(x) = \sqrt{x}, matching the algebra where x=y2x = y^2 with y≥0y \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. That is why you restrict to one branch before reflecting.

Check your understanding

j(x)=x2j(x) = x^2 restricted to x≥0x \ge 0 is the right branch of the parabola, passing through (0,0)(0, 0), (1,1)(1, 1), and (3,9)(3, 9). Which curve is the graph of j−1j^{-1}?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

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

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems 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.

Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

Why an increasing graph meets its inverse only on the diagonal

Why an increasing graph meets its inverse only on the diagonal#

Try two unequal inputs, 2<52<5. If (2,5)(2,5) were on both the graph and its inverse, the original function would have to satisfy f(2)=5f(2)=5 and f(5)=2f(5)=2. Its output would fall from 55 to 22 as the input rose, so the function could not be strictly increasing.

Now suppose (a,b)(a,b) is on both graphs of a strictly increasing function and its inverse. Then f(a)=bf(a)=b and f(b)=af(b)=a. Assume first that a<ba<b. Strict increase would give

b=f(a)<f(b)=a,b=f(a)<f(b)=a,

which contradicts a<ba<b. If a>ba>b, strict increase instead gives f(a)>f(b)f(a)>f(b), or b>ab>a, contradicting a>ba>b. Both unequal cases fail, leaving a=ba=b: the shared point lies on y=xy=x.

A bit of history (optional)

A secret message needs a way back: the receiver must recover the original from the code. A device described by Leon Battista Alberti, an Italian architect and scholar, shows how such a reversal can work.

Around 1467, Alberti devised a cipher disk with two metal circles joined at the center. The smaller inner disk could turn against the outer one. Symbols on the two rings formed pairs according to their alignment. With the alignment held fixed, a sender could read a pair from the outer ring inward, and a receiver could read the same pair from the inner ring outward.

Think of one fixed alignment as an input-output table. If two distinct original symbols shared one code symbol, that symbol alone would not tell the receiver which original to choose. Distinct symbols need distinct partners for that table to be reversible. Alberti’s full method could change the alignment during a message, so the receiver also needed to track those changes; it was more than one fixed substitution.

The fixed-alignment view illustrates this lesson’s one-to-one condition. Reading each pair in reverse swaps input and output, just as (a,b)(a,b) becomes (b,a)(b,a) on an inverse graph. If two inputs shared an output, the swapped pairs would give one input two outputs. That is the same problem you see when a reflected graph fails the vertical line test.

The University of New England museum describes Alberti’s disk.

Your progress

See all your progress →