Gregory Jones

2022-01-12

Does the function $f\left(x\right)=\frac{1}{x}$ have an inverse function?

otoplilp1

Step 1
The horizontal line test only tells us the function is injective. Anyway, before we start talking about injectivity/surjectivity/biijectivity, we should always specify domains and target spaces.
The function
${f}_{1}:\frac{\mathbb{R}}{\left\{0\right\}}\to \mathbb{R}$
${f}_{1}\left(x\right)=\frac{1}{x}$
is injective, but not surjective.
The function
${f}_{2}:\frac{\mathbb{R}}{\left\{0\right\}}\to \frac{\mathbb{R}}{\left\{0\right\}}$
${f}_{2}\left(x\right)=\frac{1}{x}$
is bijective, and
${\left({f}_{2}\right)}^{-1}={f}_{2}$
The function
${f}_{3}:\left(0,\mathrm{\infty }\right)\to$
${f}_{3}\left(x\right)=\frac{1}{x}$
is injective but not surjective.
The function
${f}_{4}:\left(0,\mathrm{\infty }\right)\to 0,\mathrm{\infty }\right)$
${f}_{4}\left(x\right)=\frac{1}{x}$
is bijective, and
${\left({f}_{4}\right)}^{-1}={f}_{4}$
And so on. But note that typically, if we have a function $f:A\to B$ which is injective, it usually doesn't hurt to restrict it's target space to equal the image, and then that resulting function will be bijective.

Andrew Reyes

Step 1
The horizontal line test you mention only checks if f is injective. The correct test would be: every horizontal line crosses the graph exactly once. (This is assuming the codomain is $\mathbb{R}$. Otherwise, the horizontal lines should be restricted to the appropriate codomain.)
Indeed, f has an inverse when considered as a function from $\frac{\mathbb{R}}{\left\{0\right\}}$ to $\frac{\mathbb{R}}{\left\{0\right\}}$ (And not when the codomain is considered to be $\mathbb{R}$)
But there's a more general phenomenon to be considered here: Suppose $f:A\to B$ is a function. The codomain is not so ''inherent'' to the function as much as its image (range). You could always just take a superset of the codomain and still have the ''same function''.In particular, if $f:A\to B$ is an injective function, then the ''restriction'' $f:A\to f\left(A\right)$ is a bijection and it has an inverse. (f(A) denotes the image of f.)
In this sense, you only need an injection to have an inverse, which is what the original horizontal line test says.

alenahelenash

Step 1 First of all, the domain of the function f described by $f\left(x\right)=\frac{1}{x}$ is $\frac{\mathbb{R}}{\left\{0\right\}}$ (you can plug anything but 0 into this function). The range of the function is also $\frac{\mathbb{R}}{\left\{0\right\}}$ because the equation $y=\frac{1}{x}$ is solvable iff $y\ne 0$ Because the solution of $y=\frac{1}{x}$ is unique for any $y\ne 0$, the function is injective (which corresponds to the horizontal line check). You could also see this by $\frac{1}{x}=\frac{1}{y}⇔1=\frac{x}{y}⇔x=y$ because $y\ne 0$ and $x\ne 0$ Any injective function has an inverse if you reduce the codomain (which becomes the domain of the inverse) so that the function is also surjective (just make the range of the function the codomain). Therefore $f:\frac{\mathbb{R}}{\left\{0\right\}}\to \mathbb{R}$ $f\left(x\right)=\frac{1}{x}$ would not be invertible - but if we manipulate the codomain and change it to $f:\frac{\mathbb{R}}{\left\{0\right\}}\to \frac{\mathbb{R}}{\left\{0\right\}}$ $f\left(x\right)=\frac{1}{x}$ is invertible and $y=\frac{1}{x}⇔x=\frac{1}{y}$ tells us that the inverse of f is f itself.

Do you have a similar question?