Is every injective function invertible?
Solution 1:
You have to be precise: $f:A \to B$ is invertible if and only if it is bijective. If it is injective still you can invert $f$ but viewed as a mapping $f:A \to f(A)$. If you choose some $y \in B \setminus f(A)$ there is no $x \in A$ such that $f(x)=y$ therefore $f^{-1}(y)$ does not make sense
Solution 2:
A function is invertible if and only if it is bijective (i.e. both injective and surjective). Injectivity is a necessary condition for invertibility but not sufficient.
Example:
Define $f: [1,2] \to [2,5]$ as $f(x) = 2x$. Clearly this function is injective.
Now if you try to find the inverse it would be $f^{-1}(y) = \frac{y}{2}$. But notice that for $y \in (4,5]$, $f^{-1}(y)$ does not exists as $f^{-1}(y): [2,5] \to [1,2]$. So the inverse is not a function.
Additional: This is not the case in maps. Injectivity is sufficient for invertibility (as the inverse need not be a function, just a map)