What's the algebraic definition of the inverse of a function?

57 Views Asked by At

I have a function $f(x)$, using the logic it's relatively easy to formally define what the inverse should be like, relatively to domain and codomain elements, especially using the surjective and injective definitions; my problem is how I can algorithmically find the inverse of a function given the definition $f(x)=y$ where $y$ is the set of algebraic steps I take to compute $f(x)$ ?