Recently, I was learning about square-root function which has domain [0,∞) and range is [0,∞).
I understand that domain has to be positive numbers but why range is restricted to positive numbers?
Recently, I was learning about square-root function which has domain [0,∞) and range is [0,∞).
I understand that domain has to be positive numbers but why range is restricted to positive numbers?
Functions typically return a single output for each input.
For nonnegative $x,$ the $n^\text{th}$ root function of $x$ is defined as the principal (nonnegative) $n^\text{th}$ root of $x,$ i.e., $$\sqrt[n] {x^n}=|x|.$$
So, while $4$ has two square roots $(-2$ and $2),$ and seven $7^\text{th}$ roots, and so on, the square root function returns only a single value $2$ when the input is $4:$ $$\sqrt4=2\neq\pm2.$$
Sometimes we would consider that while solving some equations like $x^{2}=4$, the solution looks like $x=±2$.
The functions that we learned in high school, however, were almost a single input and an output(That's how we defined a function). Thus these redundancies are required to delete.
Similarly, for some functions like $f(x) = arcsin(x)$ and $f(x)=sin(x)$, we draw them in the same way but a 90° rotation for $arcsin(x)$. Since we already have a 'One input one output' in mind, by deleting the redundancy, only left a codomain of $[-\frac{\pi}{2},\frac{\pi}{2}]$.