# Homework Help: How do you prove that a function is surjective?

1. Dec 25, 2006

### sara_87

how do you prove that a function is surjective ?

i know that surjective means it is an onto function, and (i think) surjective functions have an equal range and codomain?

Last edited by a moderator: Jan 7, 2014
2. Dec 25, 2006

### Hurkyl

Staff Emeritus
There are lots of ways one might go about doing it. The most direct is to prove every element in the codomain has at least one preimage. i.e. for a function $f:X \to Y$, to show

$$\forall y \in Y :\exists x \in X: f(x) = y$$

3. Dec 25, 2006

### sara_87

how can i prove if f(x)= x^3, where the domain and the codomain are both the set of all integers: Z, is surjective or otherwise...the thing is, when i do the prove it comes out to be surjective but my teacher said that it isn't.

this is what i did:

y=x^3

and i said that that y belongs to Z and x^3 belong to Z so it is surjective

this is obviously wrong, but i don't know what i'm doing wrong!

4. Dec 25, 2006

### Hurkyl

Staff Emeritus
Because, to repeat what I said, you need to show for every y, there exists an x such that f(x) = y!

You claim f is surjective -- that means (for example) that you can find an x such that f(x) = 2.

5. Dec 25, 2006

### sara_87

'Because, to repeat what I said, you need to show for every y, there exists an x such that f(x) = y!'
okay, easy! lol
i read that ten thousand times already! just give it time to sink in...okay it has sunk in

i guess it is not surjective then...thanx for opening up my eyes

6. Dec 26, 2006

### HallsofIvy

Does there exist x in Z such that, for example, f(x)= x3= 2?