Source: algebrica.org - CC BY-NC 4.0 https://algebrica.org/inverse-function/ Fetched from algebrica.org post 14110; source modified 2025-11-22T19:07:43.
What is an inverse function
In the introduction to functions, we saw that a function $f: X \to Y$ is called bijective if it is both injective and surjective, that is, for every $y \in Y$, there exists a unique $x \in X$ such that $f(x) = y$.
- $X$ is the domain.
- $Y$ is the codomain.
- A function is called injective if for every $x_1, x_2 \in X$, with $x_1 \ne x_2$, we have $f(x_1) \ne f(x_2)$. In other words, for every $y \in Y$, there exists at most one $x \in X$ such that $f(x) = y$.
- A function is called surjective if for every $y \in Y$, there exists at least one $x \in X$ such that $f(x) = y$.
A function $f : X \to Y$ is bijective if and only if there exists a function $g : Y \to X$ such that:
- $(g \circ f)(x) = g(f(x)) = x$ for every $x \in X$
- $(f \circ g)(y) = f(g(y)) = y$ for every $y \in Y$
In this case, the function $g$ is unique and is called the inverse function of $f$, denoted by:
$(g \circ f)(x) = g(f(x))$ is called the composite function, which means applying $f$ to $x$ first, and then applying $g$ to the result.
Making a function invertible by restricting its domain
Consider the function $f(x) = x^2$, defined on $\mathbb{R}$. This is a quadratic function, represented by a parabola with its vertex at the origin of the Cartesian plane. On its full domain $\mathbb{R}$, the function is not invertible, since it is not injective: distinct inputs can produce the same output, for example $f(-2) = f(2)$.
However, if we restrict the domain to $[0, +\infty)$, the function becomes bijective and therefore invertible. In this case, the inverse function is:

The graph of a function and that of its inverse are symmetric with respect to the line $y = x$, which is the diagonal bisecting the first and third quadrants of the Cartesian plane.
If a function $f$ is composed with its inverse $f^{-1}$, the result is the identity function, which maps each element of a set to itself:
How to find the inverse of a general function
Check whether the function is bijective, or determine a restriction of its domain that makes it bijective.
Replace $f(x)$ with $y$, so that you work with the equation $y = f(x)$.
Swap the variables $x$ and $y$: write $x = f(y)$. This reflects the idea of inverting input and output.
Solve the equation for $y$, isolating it explicitly.
Rewrite the result as $f^{-1}(x) = \ldots$, using $x$ as the input variable for the inverse.
Example
We want to find its inverse of the function $f(x) = \dfrac{2x - 1}{x + 3}$.
The function $f$ is bijective on its domain $\mathbb{R} \setminus {-3}$, because it is strictly increasing: its derivative is always positive. This ensures that $f$ is injective, and since the image of $f$ covers all real numbers except a single point, it is also surjective onto its codomain.
Write the function as an equation:
Swap $x$ and $y$
Solve for $y$. Multiply both sides by $y + 3$:
Distribute the left-hand side:
Bring all terms to one side and factor $y$ on the left-hand side:
Solve for $y$:
The inverse function is:
Inverse function theorem
A useful result from basic analysis is the one–dimensional version of the inverse function theorem. The idea is quite intuitive: if a function behaves regularly on an interval, then it can be inverted without difficulty. More precisely, suppose a function $f$ is continuous and differentiable on an interval $I$, and its derivative never vanishes:
Under these conditions, the function is strictly monotonic on $I$, which guarantees that it is invertible on that interval. As a consequence, an inverse function $f^{-1}$ exists on $f(I)$. This inverse is not only continuous but also differentiable, and its derivative is given by the relation:
This result shows how a local condition (the derivative never becomes zero) ensures a global property such as invertibility.