# Changing a non-function into a function by changing the codomain/range?

My test book says that $y=\sqrt{x}, x\in\ \Bbb R$ is not a function because x values less than zero are not mapped onto anything, and that it can be made into a function by restricting the domain to $x\in \Bbb R, x\geqslant 0$.

I was wondering if you could make it into a function by changing the range instead, to $y=\sqrt{x}, x\in \Bbb R, y\in \Bbb C\;?$

Then each element of the domain does have an output...

[NOTE: I am also unsure about the distinction between range and codomain. I think- though I really am not sure- that the term codomain should be used here instead, and the range is smaller than the codomain because the possible outputs exist solely on the real axis or imaginary axis, but not elsewhere on the complex plane?]

• You are correct.
– J126
Sep 17, 2016 at 15:12

You are right on both points. However, there is another obstacle to "$\sqrt{x}$" being a function - namely, multivaluedness. Is $\sqrt{-1}$ the complex number $i$, or the complex number $-i$? So you also want to fix some way of deciding which of the two possible complex roots of $x$ we decide to call "$\sqrt{x}$," if you want to make $\sqrt{x}$ a function.
Note that this already applies to the case where $x$ is a positive real, it's just that in this case choosing the "right" value is much easier, intuitively.