# Is $\mathbb{N}\rightarrow \mathbb{N\times N},f(x)=(x,x)$ onto?

Is $\mathbb{N}\rightarrow \mathbb{N\times N},f(x)=(x,x)$ onto?

I am not sure how to tell. Say $b\in N\times N$ this means the codomain is all the different combinations of the natural numbers.

But the domain is only the natural numbers multiplied, like $3\times 7$

• Hint: consider (0,1) – Kyle Jul 12 '14 at 21:27
• Is there an $n$ such that $f(n)=(3,14)$? – André Nicolas Jul 12 '14 at 21:27
• @FernandoMartinez There is no multiplication in this scenario. The $\times$ in $\mathbb{N} \times \mathbb{N}$ denotes the Cartesian product of the two sets. – Austin Mohr Jul 12 '14 at 21:31
• @FernandoMartinez In André's comment, $(3,14)$ means the pair: first element $3$, second element $14$. – egreg Jul 12 '14 at 21:32
• I see so it means the pair cannot be in the range. Because N in the domain is a single natural and not two different naturals. – Fernando Martinez Jul 12 '14 at 21:35

Firstly, $\mathbb{N} \times \mathbb{N}$ denotes the set of pairs of natural numbers. That is, $$\mathbb{N} \times \mathbb{N} = \{ (a,b) \mid a, b \in \mathbb{N} \}.$$ It does not denote the set of products of numbers in $\mathbb{N}$.
Secondly, the definition of "onto" is that all elements of the codomain are in the range. That is, for any $(a,b) \in \mathbb{N}\times\mathbb{N}$ it is possible for $f(x) = (a,b)$ for some $x$.
If $a \neq b$, this is not possible, so it's not onto.