Given question:
Define a function f : $\ D \to \mathbb{Z}$ by $\ f(x) = x^2 + 5 $, where $\ D = \{-4, -3, -2, -1, 0\} $.
Find $\ f^{-1} $.
My answer is that there isn't an inverse of function f because f is not bijective, as per I was taught and stated in my lecture notes. While f is one-to-one (injective), f is not onto (surjective) since set D only has 5 elements and the co-domain is the set of integers - not every element in the co-domain has a preimage.
However, the model answer given is such:
$\ y = x^2 + 5 \to x^2 = y - 5 \to x = \sqrt{y - 5} $
$\ f^{-1}(x) = -\sqrt{x-5} $
I have tried searching on this and everywhere seems to say the same thing E.g. link1, link2, link3 - that for a function to be invertible, it must be bijective.
I am rather confused at the moment... am I wrong and the model answer is correct?
Thanks!