Let f be the set of all ordered pairs (x,y) such that x and y belong to R and y = x2. Is this a function?

The same question, for f be the set of all ordered pairs (x,y) such that x and y belong to R and x=y2. Is this a Function?

I think for the first one y=x2 it is a function because there is a unique y value for every x value that is given.

For the second one, I think that x=y2 is not a function because there is not a unique y value for every x. Because if x=2 then y can = -2 and 2.

Is this right?

Thanks for the help!