# surjective/onto

• Oct 1st 2009, 07:45 AM
ibnashraf
surjective/onto
(1) The function f is defined by f:x $\mapsto$ 1 - 4x, x $\in$ R. Show that f is surjective (onto Z)

(2) The function g is defined by g:x $\mapsto$ 3x - 4, x $\in$ Z. Show that g is not surjective (not onto Z)

I need help in understanding the term surjective/onto . I am aware that it means when the range of a function is the same as its co-domain, but how do i apply this in solving the above questions? Furthermore what exactly is the difference between the range of a function and the co-domain of a function?
• Oct 1st 2009, 08:02 AM
TheEmptySet
Quote:

Originally Posted by ibnashraf
(1) The function f is defined by f:x $\mapsto$ 1 - 4x, x $\in$ R. Show that f is surjective (onto Z)

(2) The function g is defined by g:x $\mapsto$ 3x - 4, x $\in$ Z. Show that g is not surjective (not onto Z)

I need help in understanding the term surjective/onto . I am aware that it means when the range of a function is the same as its co-domain, but how do i apply this in solving the above questions? Furthermore what exactly is the difference between the range of a function and the co-domain of a function?

The range of a function is the actual values that the out put takes. Here is an example:

Define $f:\mathbb{R} \to \mathbb{R}$
where the domain and codomain are the set of all real numbers

by $f(x)=x^2$

The Range of this function is $[0,\infty)$ becuase there are no Real numbers that map to a negative value. Note that the Range is always a subset of the codomain.

So for part 1 we need to show that for every Integer there is a real number that maps to it

$f(x)=1-4x=N$

$1-4x=N \iff X=\frac{1-N}{4}$

Notice that for any Integer N $\frac{1-N}{4} \in \mathbb{R}$ So this is in the domain of the function.

Now for part 2

$g(x)=3x-4$ Note that the domain and codomin are the integers

Suppose now that the function is surjective then

$3x-4=N,\forall N \in \mathbb{Z}$

Solving for x gives

$x=\frac{N+4}{3}$ but this gives a contadiction because

$\frac{N+4}{3} \not \in \mathbb{Z} \text{ } \forall N \in \mathbb{Z}$

i.e here is a specific counter example

claim:

$0 \not \in \text{Range}(g)$

If it is then

$0=3x-4$ for some integer x

solving we get

$x=\frac{4}{3}$ but this is not an integer and the function is not onto because $\frac{4}{3}$ is not in the domain.
• Oct 1st 2009, 08:11 AM
pomp
EDIT: Tooooo sloooow

Quote:

Originally Posted by ibnashraf
(1) The function f is defined by f:x $\mapsto$ 1 - 4x, x $\in$ R. Show that f is surjective (onto Z)

(2) The function g is defined by g:x $\mapsto$ 3x - 4, x $\in$ Z. Show that g is not surjective (not onto Z)

I need help in understanding the term surjective/onto . I am aware that it means when the range of a function is the same as its co-domain, but how do i apply this in solving the above questions? Furthermore what exactly is the difference between the range of a function and the co-domain of a function?

When you define a function, you define it going from a domain to a codomain. The set of values the come out of the function is the range. For example,

$f : \mathbb{Z} \rightarrow \mathbb{Z}$

Is a function going from the integers to the integers. Here both the domain and the codomain are the set of integerss.

Now suppose that our f was, f(x)=2x, again going from integers to integers. Then the range in this case is the set of even integers, which is different from the codomain, which is the entire set of integers.

Let $f : X \rightarrow Y$

Then f is a surjection if for every y in Y, there exists a corresponding x in X such that f(x)=y.

Now for the first question, we have X=R and Y=Z. So to see if f is a surjection, it must hold that for all z in Z there exists some x in R such that f(x) = z i.e 1-4x=z. Thus all we have to do is for any z in Z, define x = (1-z)/4, that way we can see that f(x)=z and x is in R, which implies f IS a surjection.

Hope this helps, you should be able to try number 2 now.

pomp.
• Oct 1st 2009, 08:19 AM
Hello ibnashraf
Quote:

Originally Posted by ibnashraf
(1) The function f is defined by f:x $\mapsto$ 1 - 4x, x $\in$ R. Show that f is surjective (onto Z)

(2) The function g is defined by g:x $\mapsto$ 3x - 4, x $\in$ Z. Show that g is not surjective (not onto Z)

I need help in understanding the term surjective/onto . I am aware that it means when the range of a function is the same as its co-domain, but how do i apply this in solving the above questions? Furthermore what exactly is the difference between the range of a function and the co-domain of a function?

You'll find that this is a useful page. Here's a quick summary:

• What can go in to a function is called the domain

• What may possibly come out of a function is called the codomain

• What actually comes out of a function is called the range

A function is said to be surjective (or onto) if the range and the codomain are one and the same set. In other words, all the things that could come out of the function do come out.

In question 1, the codomain is $\mathbb{Z}$ = the set of integers. So we're only allowing integers to come out. So we're not interested in any input which produces a non-integer output.

The question is: can we find enough inputs in the domain to ensure that every integer can be produced as an output? If we can, then the range and the codomain are the same, and the function is surjective.

To answer this question, suppose that we want the integer $n$ (where $n$ is any old integer!) to be output. Can we find a suitable input that will generate $n$ as an output? If other words, can we find an $x$, such that $1- 4x = n$, whatever integer $n$ represents?

The answer is yes. Solving for $x$, we get:

$x=\tfrac14(1-n)$

which is a real number for all integers $n$.

Now let's repeat the question for #2, noting that this time the input values are restricted to integers, rather than the reals. So, for any $n$, can we find an integer $x$ for which $3x-4 = n$?

Solving for $x$, we get

$x = \tfrac13(4+n)$

and obviously there are lots of values of $n$ (in fact, infinitely many of them) that will make $x$ a non-integer. For example, $n=1$.

So this time the function is not surjective.