7

I have some trouble finding the answer to this, can someone help me out:

If I have a general function $f$ with domain $X$ and codomain $Y$, I know nothing about the function (injective, surjective). Say I have found and inverse that is, there is a function $g$ such that for $f(x) = y$, $g(y) = x$ (is this enough for an inverse). Then the function is bijective?

Asaf Karagila
  • 393,674
john
  • 1,470
  • 6
    If you have both $f\circ g = \text{Id}_Y$ and $g\circ f = \text{Id}_X$ then yes, $f$ is bijective. You do need both though. – James Aug 04 '15 at 15:36
  • 1
    @James Ah ok that makes sense otherwise the function is only surjective/injective right? – john Aug 04 '15 at 15:39
  • 4
    You got it. What you have written in the question is that $g \circ f = \text{Id}_X$ which implies $f$ is injective (and $g$ surjective). We sometimes talk about one-sided inverses, when you have both sides, you have a bijection. – James Aug 04 '15 at 15:41

4 Answers4

11

If you have $f: X \to Y$, $g : Y \to X$ with $g(f(x)) = x$ for all $x \in X$, it is still possible for $f$ to not be bijective. However, $f$ will be a bijection onto its image; i.e., $f$ is a bijection from $X$ to $f(X)$. In other words, $f$ is injective.

If you additionally require that $f(g(y)) = y$ for all $y \in Y$ (i.e. $g$ is a "two-sided inverse"), then $f$ is a bijection from $X$ to $Y$.

2

Not necessarily. Simply, the fact that it has an inverse does not imply that it is surjective, only that it is injective in its domain.

Take for example the functions $f(x)=1/x^n$ where $n$ is any real number. As $x$ approaches infinity, $f(x)$ will approach $0$, however, it never reaches $0$, therefore, though the function is inyective, and has an inverse, it is not surjective, and therefore not bijective.

zickens
  • 316
1

This is not true in general. The fact that $f$ has an inverse means the function is injective but for it to be bijective it needs to be surjective as well.

Let's see a simple example where $f$ is discrete. Let the domain and codomain be $X:=\{1,2\}$ and $Y:=\{2,4,6\}$. Define the function $f: X\mapsto Y$ as follows $$f(1) = 2, f(2)=4$$ The inverse function is simple: $$f^{-1}(2) = 1, f^{-1}(4)=2$$ but $f$ is not a bijection because $X$ and $Y$ do not have equal cardinality.

Remember that the function $f: X \mapsto Y$ is bijective iff for all $y \in Y$, there is a unique $x \in X$ such that $f(x) = y$.

Kuai
  • 1,493
-2

If you have f:X→Y,f:X→Y, g:Y→X ,g:Y→X with g(f(x))=x g(f(x))=x for all x∈X x∈X, it is still possible for ff to not be bijective. However, ff will be a bijection onto its image; i.e., ff is a bijection from XX to f(X)f(X). In particular, ff is injective.

If you additionally require that f(g(y))=yf(g(y))=y for all y∈Yy∈Y (i.e. gg is a "two-sided inverse"), then ff is a bijection from XX to YY.