Show that $f:\{1,2,...,n\}\times\{1,2,...,m\} \rightarrow \{1,2,...,nm\}$
given by $f(p,q)=(p-1)m+q$
is biyective.
My try:
Inyectivite:
Let $$f(p,q) = f(p´,q´)$$ $$(p-1)m + q = (p'-1)m+q'$$ $$mp+q=mp'+q'$$
Now let $p=0$, then $\quad q=q'$
Now let $q=0$, then $$mp=mp'$$ $$p=p'$$
So $f$ must be inyective.
Surjectivity:
So we need to find $s\in \{1,2,...,nm\}$ then exists $p,q$ such that $f(p,q)=s$
Let $p=1\quad$ and $\quad q =s\quad$ then $f(p,q)=(1-1)m+s=s$
Then $f$ must be surjetive.