@JeffM
You are right to be perturbed.
When in doubt about what something is, test it against the definition.
A function is a set of ordered pairs, and a set, such that [MATH] ( (x,y)\in f \text{ and }(x,y') \in f ) \rightarrow y=y'[/MATH]
Is the inverse of [MATH]f: (f \text{ being defined by) } f(x)=\sqrt{x}, x≥0[/MATH] a function?
The function [MATH]f=\{ (x,\sqrt{x}): x≥0\}[/MATH][MATH]f^{-1}=\{ (\sqrt{x},x): x≥0\}[/MATH]
Is [MATH]f^{-1}[/MATH] a function?
It is a set of ordered pairs. Is it true that for each first number there is a unique second number? (To express it informally).
Yes! (For, otherwise [MATH]\hspace1ex \exists \text{ distinct } [MATH][/MATH] x\text{ and } y ≥0: \sqrt{x}=\sqrt{y} )[/MATH]
Therefore [MATH]f^{-1}[/MATH] is a function.
That decides the issue.
Now that we know, we can look back at:
That simply means that [MATH]f[/MATH] is not the inverse of [MATH]g[/MATH], not that [MATH]g[/MATH] doesn't have an inverse.
[MATH]f(x)=x^2[/MATH] is not a function (It's not a set of ordered pairs...)
[MATH]f=\{(x,f(x)): f(x)=x^2, x\in \mathbb{R}\}[/MATH] is presumably the function
[MATH]g=\{(x,g(x)): g(x)=\sqrt{x}, x≥0\}[/MATH] (presumably)
(We can easily check that f is not the inverse of g, by reversing the elements of g to get [MATH]g^{-1}[/MATH]. Now f has elements where the first value is negative. No such elements exist in [MATH]g^{-1}[/MATH], therefore they are different sets. [MATH]f ≠ g^{-1}[/MATH]. The question is settled).
Now looking at the issue from the perspective of composite functions:
[MATH]f\circ g=\{(x,x): x≥0\}[/MATH][MATH]g\circ f=\{(x,|x|): x\in \mathbb{R}\}[/MATH][MATH]g\circ f[/MATH] has elements of the form (x,-x), when x is negative, therefore f, g
fail this test for being inverses
(i.e. that [MATH]f \circ g (x)=x= g \circ f (x)[/MATH] for values of x in their respective domains).
However the function [MATH]h=\{(x,h(x): h(x)=x^2, x≥0\}[/MATH]
is the inverse function of [MATH]g=\{(x,g(x)): g(x)=\sqrt{x}, x≥0\}[/MATH](We can very easily check that by writing the inverse - reversing the pairs - and seeing that it is the other function).
However looking at the issue of [MATH]h \circ g \text{ and } g \circ h[/MATH]
[MATH]h\circ g=\{(x,x): x≥0\}\\
g\circ h=\{(x,x): x≥0\}\\
h \circ g (x)=x= g \circ h (x)[/MATH] for their respective domains.
(They also happen to be identical functions).