The following is the definition of the product $\sigma$-algebra given in Gerald Folland's Real Analysis: Modern Techniques and Their Applications (pg. 22) (note that $\mathcal{M}(X)$ denotes the smallest $\sigma$-algebra generated by the set $X$):
"Let $\{X_{\alpha}\}_{\alpha \in A}$ be an indexed collection of nonempty sets, $X=\prod_{\alpha \in A} X_{\alpha}$, and $\pi_{\alpha}: X \to X_{\alpha}$ the coordinate maps. If $\mathcal{M}_{\alpha}$ is a $\sigma$-algebra on $X_{\alpha}$ for each $\alpha$, the product $\sigma$-algebra on $X$ is the $\sigma$-algebra generated by \begin{equation} \{\pi_{\alpha}^{-1}(E_{\alpha}): E_{\alpha} \in \mathcal{M}_{\alpha}, \alpha \in A \} \end{equation} We denote this $\sigma$-algebra by $\otimes_{\alpha \in A} \mathcal{M}_{\alpha}$."
With $A=\{1,2\}$, the wikipedia definition says that the product $\sigma$-algebra is given by: \begin{equation} \mathcal{M}_{1} \times \mathcal{M}_{2} = \mathcal{M}\left(\{E_{1} \times E_{2} : E_{1} \in \mathcal{M}_{1}, E_{2} \in \mathcal{M}_{2} \} \right) \end{equation}
I understand the Wikipedia definition. However, I am new to measure theory and am having trouble reconciling Folland's definition with the Wikipedia definition.
Assuming $A=\{1,2\}$ for simplicity, can someone show me why the two definitions of the product $\sigma$-algebra are the same?