Functions – If a Function Has an Inverse, is it Bijective?

functionsinverse

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?

Best Answer

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$.