Skip to content

Function Analysis

How to Graph an Inverse Function and Reflect Across y = x

An inverse function reverses the input-output relationship of the original function. If \(f(a)=b\), then \(f^{-1}(b)=a\). On a coordinate plane, the graphs of \(f\) and \(f^{-1}\) are reflections of each other across the line \(y=x\).

1. Find an inverse algebraically

For \(f(x)=2x+3\):

  1. Write \(y=2x+3\).
  2. Swap x and y: \(x=2y+3\).
  3. Solve for y: \(y=(x-3)/2\).

Therefore

\[f^{-1}(x)=\frac{x-3}{2}.\]

2. Graph the function, inverse, and mirror line

In the Graphing Calculator, add three objects:

  • 2*x+3
  • (x-3)/2
  • x

Use a dashed style for \(y=x\). A point such as \((1,5)\) on the original corresponds to \((5,1)\) on the inverse.

3. Check by composition

A correct inverse satisfies

\[f\bigl(f^{-1}(x)\bigr)=x\qquad\text{and}\qquad f^{-1}(f(x))=x\]

on the appropriate domains. For the linear example:

\[2\left(\frac{x-3}{2}\right)+3=x.\]

4. Not every function has an inverse function on its full domain

The function \(f(x)=x^2\) is not one-to-one on all real numbers because \(f(2)=f(-2)=4\). Its reflected relation is \(x=y^2\), which has two branches and fails the vertical-line test.

Restrict the original domain to \(x\ge0\). Then

\[f^{-1}(x)=\sqrt{x},\qquad x\ge0.\]

Graph only the right half of \(y=x^2\) together with \(y=\sqrt{x}\) and \(y=x\).

5. Domain and range exchange roles

If \(f:A\to B\) is one-to-one and onto its range, then

  • the domain of \(f^{-1}\) is the range of \(f\);
  • the range of \(f^{-1}\) is the domain of \(f\).

This exchange is easy to see after reflecting the graph.

6. Inverses of exponential and logarithmic functions

The functions \(y=a^x\) and \(y=\log_a x\) are inverses for \(a>0\), \(a\ne1\). Their graphs reflect across \(y=x\); the horizontal asymptote \(y=0\) of the exponential becomes the vertical asymptote \(x=0\) of the logarithm.

Common mistakes

  • Confusing \(f^{-1}(x)\) with \(1/f(x)\).
  • Swapping x and y but not solving completely for y.
  • Ignoring a required domain restriction.
  • Graphing the inverse without the reference line \(y=x\).
  • Forgetting that endpoints and asymptotes also reflect.

Review function transformations and domain and range for related graph-reading skills.