Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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$.


share|cite|improve this question
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
up vote 2 down vote accepted

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$.

share|cite|improve this answer
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$?

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.