Answer:
In order for f
to have an inverse, it must be a bijection. That is, it must be an injection and a surjection. So we must restrict the domain and codomain appropriately. It is standard that the square root operation returns positive values, so we use that as the basis for our restriction.