# why union and Cartesian product of infinitely many compact sets is not compact

I'm aware that the union and Cartesian product of finitely many compact sets is compact, but why we can't generalize it to the union and Cartesian product of infinitely many of them? for example for union, we can set $A= \bigcup A_i$ where each $A_i$ is compact, then if $x_n\in A \Rightarrow \exists A_i , x_n\in A_i \Rightarrow A_i$ has a subsequence like $x_{n_{k}}$ which is convergent in $A_i$. so $x_{n_{k}}$ is convergent in $A$. so, what is false in this proof? why we can't say that the union and Cartesian product of infinitely many compact sets is compact? Do them have any simple counterexample?

What fails in your suggested proof is that it might be the case that each $x_n$ lies in a different compact set. In general, $X\subseteq A\cup B$ does not mean that $X\subseteq A$ or $X\subseteq B$.
Consider the union of all $[-n,n] \subset \mathbb R$ for $n \in \mathbb N$. This is not compact. Arbitrary products are indeed compact by Tychonoff.