# Why can't you have multiple domains in one function? [duplicate]

Let's say we have function $y=\sqrt x$. For natural numbers it has two solutions. For example $\sqrt 4 = \pm2$. Wouldn't it make sense then to graph a sideways parabola with more than one points in vertical lines? Why mathematics say you can't do this when it is very obvious the square root of $x$ is only reflection of $x^2$ along the $y=x$ line?

• Careful: $\sqrt x$, as a function, is taken by convention to mean the positive square root: so $\sqrt 4 \neq -2$, even though $(-2)^2=4$. This "restriction to the principal branch" (as Henry says) is done precisely so that the symbol $\sqrt x$ will be a function. – Eric Stucky Feb 28 '16 at 3:42
• No-one says you can't do it. What they say is that the bare, unadorned word "function" is the wrong word for this concept. But there are other words, e.g. in the answer of @HenryW. – Lee Mosher Feb 28 '16 at 3:42
• $\sqrt{4} \ne \pm 2$ – zz20s Feb 28 '16 at 3:44
• I describe the reason $y = \sqrt{x}$ is considered a function here. – N. F. Taussig Feb 28 '16 at 13:22

This is called a multi-valued function. The principal branch, or the positive part of $\sqrt{x}$ is usually taken to be its definition.

A multi-valued function does not satisfy the criterion of many-to-one(every element in its domain is associated to exactly one element in its range), so it is not a function. By restriction the range of $\sqrt{x}$, every positive real number can be associated to one element in $\mathbb{R}$, which turns $\sqrt{x}$ into a function.