Given, function f(x)=x−12x and domain of f(x) is (−∞,0]
Now f′(x)=(x−1)2(x−1)2−2x(1−0)
f′(x)=(x−1)2−2<0
⇒f is always decreasing in the given domain.

Clearly, given function is one-one or injective.
Since, codomain (−∞,∞)= Range (0,2) , hence f is into.