Consider a function $f : A → B$ and assume that its inverse $f^{-1}$ is a function as well. Give an example of $A, B$, and $f$ such that $f$ is not injective but $f^{-1}$ is surjective.
These are the details of the question.
Is it possible? I do not know how to come up with an example of this.
Does anyone have any idea? Thanks!