Not a function despite passing vertical line test? I'm confused with something once again in my notes. The question is,

$R$ on $\mathbb R$, $R = \{ (x, y): y = \sqrt{x} \}$ is not a function

how is the graph $y = \sqrt{x}$ not a function?

$ y = \sqrt{x} $
$ x = y^2 $
Dom of $R = \{ x \in \mathbb R : x \ge 0 \} $

This is what the graph should be accordingly to the condition above

Then i got another question that says

R on $\mathbb R$, $ R = \{ (x, y): x = y^2 \} $ is a function

which isn't it the same as the above?
Can anyone kindly explain?
 A: The question you include seems to be asking:

Is $\{(x,y):y=\sqrt{x}\}$ a function $\mathbb R\rightarrow \mathbb R$?

You are correct both in that $\{(x,y):y=\sqrt{x}\}$ is a function and that the domain of this function is $\{x\in \mathbb R:x\geq 0\}$. However, the answer is therefore "No" because the domain of the function is not $\mathbb R$, as would be required of a function $\mathbb R\rightarrow\mathbb R$.
If you are given the domain, then when you apply the vertical line test, you require that, for each $x$ in the domain there is exactly one $y$ such that $(x,y)$ is in the function. Here, the function fails, for instance taking $x=-1$ where no pairs $(-1,y)$ are included in the given relation.

For the second question, note that $x=y^2$ has two solutions for $y$ for positive $x$, which are $\sqrt{y}$ and $-\sqrt{y}$. Thus, if you choose any positive $x$, you can relatively easily find that two pairs are included of the form $(x,y)$, so it fails the vertical line test. Try plotting the set of pairs like you did with the square root function.
A: A relation being considered a function has as much to do with the domain and codomain as it does the relationship itself.
A visual interpretation of the definition of a function, $f$, with domain $X$ and codomain $Y$ is as a directed graph with a vertex representing each point in the domain on the left, a vertex representing each point in the codomain on the right, and a directed edge between a point on the left to a point on the right if they are related.

For example, with domain $\{a,b,c\}$ and codomain $\{\text{apple},\text{banana},\text{cherry}\}$ and relation a letter is related to a word if the letter begins that word.
We have the image:


To be a function: EVERY vertex from the domain must have exactly one arrow leaving it going to the codomain.  There cannot be zero arrows and there cannot be more than one arrow.

The above example satisfies what it means to be a function then.

If we change the example somewhat, and have domain $\{a,b,c,d\}$, codomain $\{\text{apple, banana, cherry}\}$ and the same relation (a letter is related to a word if the letter begins that word)

This is no longer a function because the letter $d$ in the domain does not have an arrow leaving it.  It fails to be "everywhere defined"

If we change it in a different way, suppose that the domain is $\{a,b,c\}$ and the codomain is $\{\text{apple, banana, blueberry, cherry}\}$ with the same relation: a letter is related to a word iff the letter begins that word.  We have:

This fails to be a function because there is more than one arrow leaving $b$.  It fails to be "well defined."

Notice that in the above example, the relation did not change at all.  The only things that changed were the domain and the codomain.  In the same way, the examples in your question will either be or not be functions depending upon what the domain and codomain are.  The domain and codomain are only what they tell you they are, an image of the graph by itself will not tell you what they intend the domain or codomain to be.  Even though the image only pictures non-negative numbers, the problem statement implies that the domain is in fact $\Bbb R$.
If the domain is all real numbers and the codomain is a subset of the reals (possibly all reals), then it fails to "have an arrow leaving every vertex", it won't be everywhere defined, because there are numbers such as $-10$ for which no real number squared will equal.  Alternatively worded, $\sqrt{-10}$ is non-real.  (same issue as when I added the letter $d$ to the domain)
If the domain is non-negative real numbers and the codomain is all real numbers, then for the relation $\{(x,y)~:~x=y^2\}$ it is not a function because "some vertices have more than one arrow leaving them", it is not well defined, because there are numbers like $4$ which have multiple outputs.  $4=(-2)^2$ and also $4=2^2$ so both $(4,2)$ and $(4,-2)$ are included in the relation.  (same issue as when I added the word blueberry to the codomain)
If the domain was non-negative real numbers and the codomain is non-negative real numbers, then it will indeed be a function in both problems.  If the domain was non-negative real numbers and the codomain is all real numbers, only the first will be a function since $\sqrt{x}$ only outputs non-negative numbers there will be only one arrow leaving each.
