Let $f:A\to B$ be a function such that
$A= \{1,2,3\}, B=\{1,2,3\}$
$f(1)=1 , f(2)=1, f(3)=2$
Then is the inverse image of $f^{-1}(B) = \{1,2,3\}$?
And, $f^{-1}(1) = \{1, 2\}$ but is it okay because it is not a function?
and then the inverse image of the (well-defined)function is always domain of $f$?
I'm confused...
Your first question is no. Since $f$ is not one-to-one, the inverse of $f$ does not exist.
However for your second question is yes.
Since for a function, every object will have an image. So the pre-image of $B$ under function $f$,denoted by $f^{-1}(B)$ is always equal to $A$.