While reading about inverse functions I found a statement showing "$f\{f^{-1}(x)\}=x$". I know it is correct but I tried to prove it by taking an simple example.
Suppose there is a function $y=f(x)$ given as, $f:$ $\ce{A=B}$. Here $A$ and $B$ represents domain and range respectively and are sets given as $A=\{1\}$ & $B=\{2\}$, then $f(x)$ can be also written as $f(x)=\{(1,2)\}$. So for $x=1$ (domain), $y=2$ (range). Where $1$ belongs to $A$ and $2$ belongs to $B$.
Also $f^{-1}(x)=\{(2,1)\}$. Now $f\{f^{-1}(x)\}=\{(2,2)\}$, i.e. identity function of range $y$, i.e. set $B$. As in identity function range $=$ domain. Therefore $y=x$. Hence $f\{f^{-1}(x)\}=x$ Am I correct in explaining this? As I think my method of explanation is wrong. Please tell me the right one & please point out my mistakes.