0

https://math.stackexchange.com/a/2561091/955560

I was reading this and he said that f:N→N, f(x) = 17 is neither surjective or injective.

Why is this the case?

If f(x) always equals 17 that would be mean co-domain is only 17 and every domain value would map to that co-domain, so wouldn't that make it surjective?

2 Answers2

1

Some definitions might be useful here. I'm writing from my phone, so apologies for the lack of TeX. Let f be a function from a space X to space Y.

A function is injective if for every point in your domain there is a unique point, say y, in your codomain such that the preimage of y is a single element of x. Each point of your domain has exactly one unique point corresponding to it. Written out, a function is injective iff f(a)=f(b) implies a=b for a,b in X.

A function is surjective if for every point y in Y there exists an x in X such that f(x) = y

So looking at this function, f(x) = 17, notice that is in fact a constant function.

Is it injective? No. Because f(1)=f(2)=17. So there is no unique point corresponding to f(1), f(2), and obviously 1 is not equal to 2.

Is it surjective? No. Because our target space Y is the natural numbers. So not every element of NN is mapped to by f.

Hopefully this clarifies any doubts you might have!

0

You seem to be confusing the range of a function with its codomain.

When we define a function using the notation $f:X\to Y$, we are specifying that for every pair of numbers $(x,y)$ such that $f(x)=y$, we have $x\in X$ and $y\in Y$. The set $X$ is called the domain of $f$, and $Y$ is called the codomain.

The range of $f$ is the set of numbers $b$ for which there is a number $a$ such that $f(a)=b$. In other words, it is the set of all of the outputs of $f$. This means that the range is a subset of the codomain, though not necessarily a proper subset. If the range equals the codomain, then $f$ is said to be surjective.

In your example of the function $f:\Bbb{N}\to\Bbb{N}$ given by $f(x)=17$, the codomain of $f$ is $\Bbb{N}$, whereas its range is $\{17\}$. Since the range is unequal to the codomain, $f$ is not surjective.

Joe
  • 19,636