# How to determine if this function is one-to-one, onto, or bijection?

I have a function $f_2: \mathbb Z \times \mathbb Z \to \mathbb Z$ defined by $f_2(m,n)=m^2+n$.

How do I know if it is one-to-one, onto or both?

What I am most confused about is what $\mathbb Z \times \mathbb Z \to \mathbb Z$ means and how that is different from just $\mathbb Z \to \mathbb Z$.

I know one-to-one means every $x$ has a unique $y$ and onto means for all $y$, there exists an $x$ such that $f(x)=y$.

Thanks!

-
Your explanation of one-to-one is very misleading (I cannot make out if you understood the definition of the term or not). A function $f: X \to Y$ is one-to-one if $f(x_1) = f(x_2) \implies x_1 = x_2$ for all $x_1, x_2 \in X$. You can think of it as: distinct $x$'s in $X$ are mapped to distinct images in $Y$. –  Srivatsan Oct 21 '11 at 14:40
That's exactly what I meant. You made it much clearer though, thanks! –  switz Oct 21 '11 at 14:42
For one-to-one, informally, you could say that for any $y$, there is at most one $x$. –  André Nicolas Oct 21 '11 at 18:30

This notation means that the "x" in your function is a pair of integers $(m,n)$.

So the question is: Do you know two pairs $(m_1,n_1)$ and $(m_2,n_2)$ of integers that give the same $m_1^2+n_1=m_2^2+n_2$?

The two pairs count as distinct if at least one element changes.

1. one-to-one?

Choose two different $m$s and try to find $n$s such that the image of the function is the same for the two pairs.

1. onto?

Try $m=0$.

-
Okay, that makes sense. So does that mean it will be onto? I'm not sure how to actually prove which one it is. –  switz Oct 21 '11 at 14:36

For "onto" you need to answer this: Given any integer $y$, can you find a pair $(m,n)$ so that $m^2+n = y$?

-
m = 0, n = y -- so yes. therefore it is onto. –  switz Oct 21 '11 at 14:50