Give example of a function f: ℝ→ℝ that hits all the negative real numbers but not the nonnegative real numbers.

245 Views Asked by At

If a function hits all the negative real numbers but not any of the nonnegative real numbers, then the function must be surjective? Can it still be injective?

1

There are 1 best solutions below

1
On

I'm assuming that by the term "hits" you mean "maps to". In order for a function to be surjective it must map to every element in it's domain. A function $f: \mathbb{R} \to \mathbb{R} $ that only maps to negative real numbers doesn't map to any positive number so violates the requirements of being surjective.

The function can be either injective (like $f(x) = -e^x$) or non injective (like $f(x) = -e^x - \sin(x) -1)$).