What's an example of a function f(x) such that g(f(x))=x for some g but there is no h such that f(h(x))=x? I came up with a proof that showed that there is no such function f, but I relied on the fact that a function that is one to one has an inverse. Apparently a function must also be onto. What is the definition of inverse and what guarantees the existence of an inverse such that f(g(x))=g(f(x))=x? What function is one to one but not onto and does not have an inverse?