I have to prove the following:
We have two metric spaces $(X_1,d_1)$ and $(X_2,d_2)$ and their product-space $X=X_1 \times X_2$ with metric $d=d_1 \times d_2$ (so $d(x)=d(x_1,x_2)=d_1(x_1)+d_2(x_2)$ ). We have a projection $\pi_i$ which projects $X$ on $X_i$ for $i=1,2$.
First question was proofing the projection is continuous, which was fairly simple.
The next question was where I got stuck upon:
$\\$
Let $K=K_1 \times K_2$ with $K_i \subset X_i$. Proof:
$K$ is compact in $X$ $\iff$ $K_i$ is compact in $X_i$ for $i=1,2$.
"$\Rightarrow$" gave no problems: Let $K$ compact in $X$, $\pi_i$ is continuous, which implies that $\pi_i(K)=K_i$ is then compact. (Weierstrass)
"$\Leftarrow$" This is the problem. I tried with collection of open sets, but this went wrong. I hope someone can give a nice proof for this.
Proof by contrapositive: Suppose $K$ is not compact in $X$. Then there is an open cover $\mathcal{C} = \{C_\alpha \}_{\alpha \in \lambda}$ with no finite subcover. Each cover element is of the form $C_\alpha = C_{1_{\alpha}} \times C_{2_{\alpha}}$ where $C_{1_{\alpha}} \subset X_1$ and $C_{2_{\alpha}} \subset X_2$ are open sets. Now for the sake of contradiction, suppose $K_1$ and $K_2$ are compact. We know $\{C_{1_\alpha} \}_{\alpha \in \lambda}$ and $\{C_{2_\alpha} \}_{\alpha \in \lambda}$ are open covers of $K_1$ and $K_2$ respectively, so each has a finite subcover, say $$\{C_{1_i} \}_{i=1}^N \quad \text{and } \quad \{C_{2_j} \}_{j=1}^M$$ Further, for each $C_{1_{i}}$ we know there exists $C_{\alpha_{i}} \in \mathcal{C}$ such that $C_{\alpha_{i}} = C_{1_{i}} \times U$ for some open set $U \subset X_2$ (U is not important here.) Now we can make two finite subsets of $\mathcal{C}$ which we'll call $$\mathcal{C}_1 =\left\{ C_{\alpha_{i}} \in \mathcal{C}: C_{\alpha_{i}}=C_{1_{i}} \times U \space \text{where} \space C_{1_i} \in \{C_{1_i} \}_{i=1}^N\right\}_{i=1}^N$$and $$\mathcal{C}_2 =\left\{ C_{\alpha_{j}} \in \mathcal{C}: C_{\alpha_{j}}=V\times C_{2_{j}} \space \text{where} \space C_{2_j} \in \{C_{2_j} \}_{j=1}^M\right\}_{j=1}^M$$ By construction $\mathcal{C}_1 \cup \mathcal{C}_2 \subset \mathcal{C}$ and it can easily be shown that $\mathcal{C}_1 \cup \mathcal{C}_2$ is a finite subcover of $K$. Once you show that, you will have reached your contradiction.