# Surjectivity of a function

1. Oct 14, 2009

### DPMachine

1. The problem statement, all variables and given/known data

I'm trying to show that the function below is surjective

$$f: Z^2 \rightarrow Z, f((n,m))=nm$$

2. Relevant equations

3. The attempt at a solution

1. Suppose $$z\in Z$$.

2. Then $$z=nm$$.

3. So $$n=\frac{z}{m}$$ and $$m=\frac{z}{n}$$

4. So $$f((n,m))=\frac{z^2}{mn}=\frac{n^2m^2}{mn}=nm=z$$

I'm mostly wondering about step 2... Am I allowed to assume that? (z=nm?)

2. Oct 14, 2009

### aPhilosopher

Why are you solving for z? Why not just use the fact that f(m, n) = mn = z?

3. Oct 14, 2009

### DPMachine

Right.. but what's the (n, m) in that case?

I'm trying to prove that for any arbitrary z in the codomain, there exists some (n, m) in the domain that satisfies the function. I'm trying to find (n, m) in terms of z.

Sorry if I didn't get your point.

4. Oct 15, 2009

### aPhilosopher

I meant solving for n and m in terms of z in my previous post.

If you know that f(a, b) = ab and you know that z = mn then you have f(m, n) = z. You dont need it more complicated than that.

And you can assume that there's always a factorization z=mn, just choose z = 1*z.

5. Oct 15, 2009

### HallsofIvy

Staff Emeritus
Uhh, Given any integer z, aren't both (z,1) and (1,z) mapped into z? Isn't that enough?