No, it isn't a function because -2 has to values.
To be a functin, the values of x must have only 1 value.
The second one, it is a function
4.6m questions
5.9m answers