3

Why is $f(x)=\sqrt x$ not a function? I understand that the definition of a function states that every "input" must be related to exactly one "output", but I am curious as to the WHY.

Empty
  • 13,012
  • 1
    It's a function, actually. I supposed you want to ask "why f(x)=x^2 is not invertible" – Michael Galuza Aug 06 '15 at 16:48
  • 1
    Did you mean $f(x) \pm \sqrt x$? Without the $\pm$ it is a function from the nonnegative real numbers to the nonnegative real numbers. – coldnumber Aug 06 '15 at 16:48
  • 1
    To elaborate on the above replies: while every positive real number $x$ has two different numbers $y$ with $y^2 = x$, we typically define $\sqrt{x}$ to explicitly be the nonnegative number $y$ with $y^2 = x$, of which there is only one. – Gregory J. Puleo Aug 06 '15 at 16:50
  • 1
    and I suppose @coldnumber actually means $f(x) =\pm \sqrt x $(which I find reasonable), so now it's time for you to clarify some things – user190080 Aug 06 '15 at 16:53
  • @user190080 Yup, typo. Thanks – coldnumber Aug 06 '15 at 17:28

6 Answers6

5

$$f(x)=\sqrt{x}$$ is indeed a function, if your domain is (a subset of) the nonnegative real numbers. However if your domain is all of $\mathbb{R}$, then $f(x)$ is not defined on the entire domain and hence is not a function.

Note that if we allow complex numbers, then there is a more complicated answer, in which $f(x)$ can be a function but we need to specify more information.

vadim123
  • 82,796
4

To define a function properly you must specify:

  • The domain, that is, the set of all inputs.
  • The codomain, that is, a set where the outputs lie.
  • The set of relations, which is often given by an equation, like $f(x)=\sqrt x$.

Therefore, if you don't specify the domain and the codomain it is impossible to say if that equation is of a function.

For example, $f:[0,\infty)\to\Bbb R$, $f(x)=\sqrt x$, is a function. But $f:\Bbb R\to\Bbb R$, $f(x)=\sqrt x$ it is not.

Remark: Note that the codomain needn't be the set of outputs, since it can have elements that are not the output for any input. But the codomain must contain every output.

ajotatxe
  • 65,084
4

It is interesting in this context to read, e.g. G. H. Hardy's great text A Course of Pure Mathematics. After giving simple examples where $y$ is a function of $x$, he adds

...we must point out that the simple examples of functions mentioned above possess three characteristics which are by no means involved in the general idea of a function, viz.:

  1. $y$ is determined for every value of $x$;
  2. to each value of $x$ for which $y$ is given corresponds one and only one value of $y$;
  3. the relation between $x$ and $y$ is expressed by means of an analytical formula, from which the value of $y$ corresponding to a given value of $x$ can be calculated by direct substitution of the latter.

It is indeed the case that these particular characteristics are possessed by many of the most important functions. But the consideration of the following examples will make it clear that they are by no means essential to a function. All that is essential is that there should be some relation between $x$ and $y$ such that to some values of $x$ at any rate correspond values of $y$.

[Examples 3] Let $y^2 = x$. Then if $x$ is positive this equation defines two values of $y$ corresponding to each value of $x$, viz. $\pm\sqrt x$. If $x = 0, y = 0$. Hence to the particular value $0$ of $x$ corresponds one and only one value of $y$. But if $x$ is negative there is no value of $y$ which satisfies the equation. That is to say, the function $y$ is not defined for negative values of $x$. This function therefore possesses the characteristic (3), but neither (1) nor (2).

So Hardy cheerfully allows many valued functions, and would treat the one defined by $f(x)^2 = x$ or, in one usage, $f(x) = \sqrt x$ as a perfectly good function which is two-valued on $x > 0$.

The modern practice of demanding that functions be single valued is just fine of course: it makes some (many?) things go more tidily. But Hardy is arguably right that it isn't part of the "general idea of a function".

Peter Smith
  • 54,743
1

This is a matter of notation, as Gregory J. Puleo explains in the comments. If $x$ is a non-negative real number, then the notation $\sqrt{x}$ is taken by convention to mean the unique non-negative square root of $x$. In this way the ambiguity of a positive real number possessing both a positive and a negative square root is eliminated. Without having a convention of this type, the notation $\sqrt{x}$ for $x$ a positive real number is inherently ambiguous. But when we fix the choice of the non-negative root, we get a perfectly well-defined (continuous, etc.) function from $[0,\infty)$ to $\mathbf{R}$.

1

It is considered as a function in many case, but theoretically the word "function" means the different things.

In a rigorous sense, a function is a relation between the set of all possible inputs, called domain $X$, and the set of all possible outputs, called range, $f(X)$. $f(X)$ is a subset of the codomain $Y$. So we write $f: X \to Y$. For example, all possible inputs and outputs in your equation are real numbers (let's just accept it for convenience), so we write $f: \mathbb R_{> 0} \to \mathbb R$.

In the sense of set theory, your equation defines a function as follows:

$$ f = \left\{ (x, y) \in \mathbb R^2 : y = \sqrt{x} \right\}. $$

See? The function $f$ is a set not only carries all $y$ but also all possible $x$.

In this way, $f(x)$ or $\sqrt{x}$ is not a function, but a value of $f$ at point $x$.

Above all, I think I answered your question briefly. If you want to know more about functions, check binary relations, that I believe it is written in the beginning part of the most of Mathematical Analysis or Real Analysis.

0

In some rather old high school italian books we used to write $$ \sqrt{x} = \{ y \mid y^2=x\}. $$ We used to call this the algebraic square root of $x$, while the unique non-negative number $y$ such that $y^2=x$ was called the arithmetic square root of $x$. I believe that in your mind the square root is the algebraic one: in this case you are right, it is a set-valued function.

However be warned that nowadays the symbol $\surd$ is reserved to the function that assigns to $x \geq 0$ the unique $y \geq 0$ with $y^2=x$.

Siminore
  • 35,136