How to check that given relation is a function?

40 Views Asked by At

If f is defined from set of integers to set of natural numbers, f(x)=|x| Then is f a function? Obviously it's not one-one but is it even a function? I got confused because 0 belongs to integers and f(0)=0 but 0 does not belong to natural numbers so 0 has no image under f, hence f is not a function. Thanks in advance.

1

There are 1 best solutions below

1
On

The answer depends on whether or not $0$ is included in the natural numbers. There are two conventions, one that is all positive integers and one that is all non-negative integers (see this question for more information). If you are taking the natural numbers to not include $0$ then you are correct that $f$ is not a function. This is because a function is a binary relation between two sets that associates every element of the first set to exactly one element of the second set. In your example, the $0$ in your domain is not associated with any element in the second set so it is not a function.