I'm doing an intro course on set theory and have the question if the inverses of the surjective functions in the sets $A=\{a, b\}$ and $B= \{c, d, e\}$ are also functions.
So far, I thought that the inverse of a function $f(x)$ for example, is $f^{-1}(y)$, meaning that every function also has an inverse (which is also a function). Given that this would make the question rather redundant, I'm not quite sure in my assumption anymore, so I would be glad if someone could verify or falsify (and explain it properly) it.
A relation is a set of ordered pairs, and it's inverse is the following relation: $$R^{-1}:=\{(y,x)|(x,y)\in R\}$$ And $R$ is called a function if $\forall x,y_1,y_2$, $(x,y_1)\in R \land (x,y_2)\in R \implies y_1=y_2$. In the case of functions, we can always define a formal inverse, and we call a function $f$ injective if it's formal inverse is also a function. And not all of the surjections are injections, for example let $$f:=\{(a,c),(b,d),(a,e)\}$$ Now, $f$ is a surjection from $A$ to $B$, but it's not an injection, because it's inverse is not a function.