The question is-

Make the function $f:R\rightarrow$$R$, $f(x)=x^2$ invertible by making suitable adjustments to the domain and range.

So, here is what my teacher said-

Since we have to make the function onto, we must make the range equal to co-domain.

Range of y=$x^2$ is $[0\rightarrow \infty]$.

Also, the function must be one-one. So, the domain of the function must be ahead of the minima of the function.

So, finally the function becomes $f:[0\rightarrow \infty]\rightarrow [0 \rightarrow \infty]$.

So, the graph looks like this

[1]: https://i.stack.imgur.com/OkkHg.jpg

But, why isn't this part of the graph also included in the answer

[2]: https://i.stack.imgur.com/Y0S6R.jpg