Let $$ I_N = \{n \in \mathbb N \mid 1 \leq n \leq N \}=\{1,2,3, \ldots, N \}.$$I want to show that $I_n \times I_m \sim I_{nm}$. For that, I defined $ \psi: I_n \times I_m \to I_ {nm} $ by $$ \psi (i, j) = i + n (j-1) $$ for all $ (i, j) \in I_n \times I_m $. It is trivially apparent that $ \ psi $ is well defined.
Now let's show that $ \psi $ is injective, for that let's suppose that $ \psi (i, j) = \psi (i ', j') \Rightarrow i + n (j-1) = i '+ n (j' -1) \Rightarrow n (j-j ') = i-i' $. Since $ 1 \leq i, i '\leq n \Rightarrow | i-i' | <n \Rightarrow n (j-j ') $ is an element of the set $ \{- n + 1, -n + 2, \ldots, n-2, n-1 \} $. On the other hand, $ n (j-j ') $ is a multiple of $ n $, that is, an element of the set of numbers $ \{0, \pm n, \pm 2n, \ldots \}. $ The only one of these numbers that satisfy that $ | i-i '| <n $ is $ 0 $. Which implies that $ i'-i = n (j-j ') = 0 $ and from there it is easily obtained that $ i = i' $ and $ j = j '$. Therefore $ \psi $ is injective.
To show that it is surjective. Let $ k \in I_{nm} $ and write $ k-1 = r + ns $ with $ r, s \in \mathbb N $ and $ 0 \leq r <n $. So for $ i = r + 1, j = s + 1 $ we have $ k = i + n (j-1) $, and also $ 1 \leq i \leq n \Rightarrow i \in I_n $. Then $ s \geq 0 \Rightarrow j = s + 1 \geq 1 $ and $ i + n (j-1) = k \leq nm \Rightarrow n (j-1) \leq nm-i \leq nm- 1 \Rightarrow j-1 \leq m-1 / n \Rightarrow j-1 \leq m-1 \Rightarrow j \leq m \Rightarrow j \in I_m \Rightarrow (i, j) \in I_n \times I_m $.
That way $ \psi $ is bijective. Knowing that, someone can tell me if that is correct and can explain to me how to get the inverse of said function.