In order for a function f: X → Y to have an inverse, it must have the property that for every y in Y there must be one, and only one x in X so that f(x) = y. This property ensures that a function g: Y → X will exist having the necessary relationship with f.
so,here,domain is all real numbers and range is only positive real numbers.
so,-1 and 1 will map to 1 only.similarly -2 and 2 will map to 2 only,
so,here for y=1 ,we will get 2 values (1 and -1).and similarly for others.
and this function is not invertible.
but if we restrict our domain to positive real numbers only then this function would be invertible.