# Is $f$ surjective?

Let $A=\{ a \in \Bbb{N} : a \text{ even}\}$ and $B=\{b \in \Bbb{N} : b \text{ odd}\}$ Define a funtion $f:A \times B \to \Bbb{N}$ by $f(a,b)=(a+2b)/2$.

How do you show this function is surjective?

-
you should learn Latex. Look how nice it looks now, and I think it is easier than writing all the symbols. –  Beni Bogosel Apr 10 '12 at 7:40
Yojito: Any luck with my answer below? –  Did May 7 '12 at 12:27

It is not.

If the convention is that $\mathbb N=\{1,2,3,\ldots\}$, then, for every $(a,b)$ in $A\times B$, $a\geqslant2$ and $b\geqslant1$ hence $f(a,b)\geqslant2$. One sees that $1$ is not in $f(A\times B)$.

If the convention is that $\mathbb N=\{0,1,2,\ldots\}$, then, for every $(a,b)$ in $A\times B$, $a\geqslant0$ and $b\geqslant1$ hence $f(a,b)\geqslant1$. One sees that $0$ is not in $f(A\times B)$.

In both cases, $f(A\times B)\ne\mathbb N$ and, in fact, $f(A\times B)=\mathbb N+1=\mathbb N\setminus\{n\}$ with $n=\min\mathbb N$.

Edit More generally, define the function $f:(2\mathbb Z)\times(2\mathbb Z+1)\to\mathbb Z$ by $f(2i,2j+1)=i+2j+1$ and, for every $n$ in $\mathbb Z$, the sets $N_n=\{k\in\mathbb Z\mid k\geqslant n\}$, $A_n=N_n\cap(2\mathbb Z)$ and $B_n=N_n\cap(2\mathbb Z+1)$.

Then, $f$ is trivially surjective but, for every $n$ in $\mathbb Z$, one sees that $f(A_{2n}\times B_{2n})=N_{3n+1}$ and $f(A_{2n+1}\times B_{2n+1})=N_{3n+2}$.

Hence, $f(A_n\times B_n)\subset N_n$ with $f(A_n\times B_n)\ne N_n$ if $n\leqslant-3$, $f(A_n\times B_n)=N_n$ if $n=-1$ or $n=-2$, and $N_n\subset f(A_n\times B_n)$ with $N_n\ne f(A_n\times B_n)$ if $n\geqslant 0$.

-
You mean $f(A\times B)\neq\mathbb N$ in that last line. –  Asaf Karagila Apr 10 '12 at 8:27
@Asaf: Indeed. Thanks. –  Did Apr 10 '12 at 8:29

By definition: $f(a,b)=\frac{a}{2}+b$

The function f is surjective if for every element $n \in \mathbb{N}$ there is a corresponding pair of even and odd integers $(a,b)$ where $f(a,b)=n$.

Taking $b=1$ and $a=2(n-1)$, for $n \in \mathbb{N}-\{1\}$ gives:

$f\left(2(n-1),1\right)=n$ where $n \in \mathbb{N}-\{1\}$.

However, as rightfully pointed out, no pair of even and odd natural numbers $(a,b)$ map to the least element under $f$, and hence $f$ is not surjective.

-
If $n=\min\mathbb N$ then $n-1\notin\mathbb N$ and neither is $2(n-1)$. –  Asaf Karagila Apr 10 '12 at 7:50

It is not True.

Counter Example: There are no a and b such that f(a,b)=1.

-
If $0\in\mathbb N$ (as it should be!) then $f(0,1)=1$ (but there is no pair giving $0$). –  Asaf Karagila Apr 10 '12 at 10:28
0∈ℕ ?? Is 0 a natural number?? –  Prasad G Apr 10 '12 at 10:36
Of course it is. Otherwise when we say that "$A$ is a finite set if and only if there exists a natural number $n$ such that $|A|=n$" is wrong, since $\varnothing$ would not be finite. –  Asaf Karagila Apr 10 '12 at 10:57
What is difference between whole number and natural number? –  Prasad G Apr 10 '12 at 11:11
Integers (whole numbers) can be negative as well. Natural numbers are not negative. Zero is not negative. –  Asaf Karagila Apr 10 '12 at 11:15