show that there exists a bijection between $A_{1} \times A_{2}$ and $\prod_{i\in\{1,2\}}A_{i}$ could someone help me out with the following problem:
Show that show that there exists a bijection between $A_{1}\times A_{2}$ and $\prod_{i\in\{1,2\}}A_{i}$.
I know that elements of $A_{1}\times A_{2}=\{\{a_{1}\},\{a_{1},a_{2}\}\}$ where $a_{1}\in A_{1}$ and $a_{2}\in A_{2}$ and elements the other set are functions
$f:\{1,2\}\to A_{1}\cup A_{2}$ where $f(i)\in A_{i}$,for each $i\in \{1,2\}$.
But I don't know how to show that
$\theta:\prod_{i\in\{1,2\}}A_{i}\to A_{1}\times A_{2} $ defined by
$\theta(f)=(f(1),f(2))$
 A: You need to show that $$\theta:\prod_{i\in\{1,2\}}A_i\to A_1\times A_2:f\mapsto\langle f(1),f(2)\rangle$$ is a bijection, so you need to show that it is both injective and surjective.


*

*Injective: Assume that $\theta(f)=\theta(g)$, and show that $f=g$. Depending on just how formal you have to be, this could be trivial, or it could be straightforward but a bit tedious. At the tedious end, you have $f=\{\langle 1,f(1)\rangle,\langle 2,f(2)\rangle\}$, which you can further expand using your definition of ordered pair. Similarly, $g=\{\langle 1,g(1)\rangle,\langle 2,g(2)\rangle\}$, and the assumption that they’re equal implies that $f(1)=g(1)$ and $f(2)=g(2)$. At the informal level this is immediate; at a more formal level you’ll have to go chasing through the definition of ordered pairs. Finally, this in turn implies that $\langle f(1),f(2)\rangle=\langle g(1),g(2)\rangle$, the amount of detail again depending on the level of formality required.

*Surjective: Pick an arbitrary $\langle a_1,a_2\rangle\in A_1\times A_2$; for what $f\in\prod_{i\in\{1,2\}}A_i$ do you have $\theta(f)=\langle a_1,a_2\rangle$?
