# Is the function $\sqrt x$ onto in its domain?

The domain of $\sqrt x$ is $0\le x<\infty$

And its co-domain is $0\le y<\infty$

We know that the square root function is one-to-one since there exist only a unique $y$ such that $y^2=x$ since $y^2$ is a strictly increasing function. That is, $z>y \implies z^2>y^2$.

But my question is whether the function $y=\sqrt x$ is surjective (onto) or not. Please explain it. Thanks.

• I do not understand what is being asked. Could you elaborate on what you mean by "whether the function is onto its domain or not (cis)?" – Simply Beautiful Art Aug 28 '16 at 12:27
• Well, the domain is $[0, \infty)$. Can you show that for all $y \in [0, \infty)$ you can find some $x$ such that $y= \sqrt{x}$? – Crostul Aug 28 '16 at 12:28
• The notion of ‘onto’ involves the codomain, not the domain. Simply, it happens, in the present case, that the range, not the codomain, is also the domain. – Bernard Aug 28 '16 at 12:30
• Is sqrt function is surjective? – Sathasivam K Aug 28 '16 at 12:30
• This depends what you consider the codomain: if it's $\mathbf R$, it's not onto. – Bernard Aug 28 '16 at 12:32

## 1 Answer

For $f:[0,+\infty)\to [0,+\infty), \;\;f(x) = \sqrt x$ to be onto its domain (or "surjective"), you must prove that for every $y \in [0, +\infty)$ (the co-domain of $f$) there is at least one $x \in [0,+\infty)$ (the domain of $f$) so that $f(x) = y$. And indeed, such an $x$ exists, namely $x = y^2$.

• But in the question, codomain is not mentioned. – Rajat Aug 28 '16 at 12:34
• The codomain (or target) of $f$ is not the range in general. The domain is the source of $f$. – Bernard Aug 28 '16 at 12:34
• In general, codomain and range are different. For onto map, you have to prove indeed both are same. – Rajat Aug 28 '16 at 12:35
• OK, I guess I forgot the English terminology. I will correct my answer. – mathguy Aug 28 '16 at 12:36