If a function has an inverse then it is bijective? 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?
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 particular, $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$.
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.