Why is $f(x)=\sqrt x $ not a function? 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. 
 A: $$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.
A: 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.
A: 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.: 
  
  
*
  
*$y$ is determined for every value of $x$; 
  
*to each value of $x$ for which $y$ is given corresponds one and only one value of $y$;
  
*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". 
A: 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}$.
A: 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.
A: 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$.
