If it's defined on the whole real axis, then [tex]f^{-1}(\{4\}) = \{ +2, -2 \}[/tex].
If we restrict it to the positive axis, then If it's defined on the whole real axis, then [tex]f^{-1}(\{4\}) = \{ 2 \}[/tex].
But now the function is injective, so invertible (you can in fact write down an explicit inverse, namely [itex]g(x) = \sqrt{x}[/itex]. The inverse satisfies [tex]g(4) = 2[/tex]. Actually, the inverse in a point is the pre-image of that point (which consists of just one element).

It's not? Look at my example. The inverse image of y contains all the points that get mapped by f to y. A function has an inverse if it's injective, that is: the inverse image contains just one point x_y. If we define the inverse [itex]f^{-1}[/itex] as the function that satisfies
[tex] f^{-1}f = f f^{-1} = \mathrm{id}[/tex] ([itex]\ast[/itex])
we must assign x_y to y. We could also define the inverse function as the map that does this, and then it's almost trivial to check that ([itex]\ast[/itex]) is satisfied.

If it's defined on the whole real axis, then [tex]f^{-1}(\{4\}) = \{ +2, -2 \}[/tex].
If we restrict it to the positive axis, then If it's defined on the whole real axis, then [tex]f^{-1}(\{4\}) = \{ 2 \}[/tex].
But now the function is injective, so invertible (you can in fact write down an explicit inverse, namely [itex]g(x) = \sqrt{x}[/itex]. The inverse satisfies [tex]g(4) = 2[/tex]. Actually, the inverse in a point is the pre-image of that point (which consists of just one element).

Just wanted to point out that a function has to be bijective to be invertible. So it has to be both injective and surjective. So if we have the function [tex] f: \mathbb{R}^{+} \to \mathbb{R}^{+} [/tex] defined by [tex] f(x) = x^{2} [/tex], then [tex] f^{-1}(x) = \sqrt{x} [/tex] (positive square root) is bijective.

So if [tex] f [/tex] is a bijection with inverse [tex] f^{-1} [/tex], then [tex] f(x) = y_0 [/tex] iff [tex] x = f^{-1}(y_0) [/tex] so that [tex] \overleftarrow{f}(\{y_0\}) = \{f^{-1}(y_0)\} [/tex]. So the RHS could contain more than 1 element, or none at all for certain values of [tex] y [/tex].

A function doesn't have to be bijective to be invertible, only injective. Essentially, one-to-one means that [itex]f^{-1}[/itex] is a function with domain Im(f). Surjectiveness will tell you that the domain of the inverse (exists if f is one-to-one) is precisely the codomain.

Just look at any analysis text that needs to use inverses: they will show that [itex]f[/itex] is one-to-one and then start invoking [itex]f^{-1}[/itex], since it exists.

So the function [tex] \sin: [-\pi/2, \pi/2] \to [-1,1] [/tex] is bijective and thus invertible. But [tex] \sin: \mathbb{R} \to \mathbb{R} [/tex] is not invertible. It essentially hits the image, and is one-to-one (first one). Usually we say that the inverse of [tex] \sin(x) [/tex] is [tex] \arcsin(x) [/tex]. But we make assumptions about the domain and codomain (i.e restrictions).

Just wanted to point out that a function has to be bijective to be invertible. So it has to be both injective and surjective. So if we have the function [tex] f: \mathbb{R}^{+} \to \mathbb{R}^{+} [/tex] defined by [tex] f(x) = x^{2} [/tex], then [tex] f^{-1}(x) = \sqrt{x} [/tex] (positive square root) is bijective.

So if [tex] f [/tex] is a bijection with inverse [tex] f^{-1} [/tex], then [tex] f(x) = y_0 [/tex] iff [tex] x = f^{-1}(y_0) [/tex] so that [tex] \overleftarrow{f}(\{y_0\}) = \{f^{-1}(y_0)\} [/tex]. So the RHS could contain more than 1 element, or none at all for certain values of [tex] y [/tex].

Nice post. Extending your remarks a bit, the following is a useful theorem about inverses:

Let f:A->B, with A not empty. Then

f is injective iff f has a left-inverse,
f is surjective iff f has a right-inverse,
f is bijective iff f has a two-sided inverse (a left and right inverse that are equal).

Nice theorem.
A function is a special type of relation R in which every element of the domain appears in exactly one of each x in the xRy. A relation is a subset of a Cartesian product. A Cartesian product AXB is a set of (a,b) tuple where a belongs to A, and b belongs to B. A (a,b) tuple is actually the set {a,{a,b}}.