Our professor gave a study guide for final exam and one of the problems is the following:
If $X\times Y$ and $X$ are compact, prove that $Y$ is compact.
Proof: Consider the projection $\pi_2:X\times Y\to Y$ since the projection is surjective and continuous function it follows that $Y$ is compact since it is the image of compact $X\times Y$ under continuous map, right?
I believe that this reasoning is correct but as you see the condition that $X$ is compact is redundant, right?
Would be very thankful for any comments!
As pointed out by Eric, the proof remains as long as $X$ is non-empty.
If you wanted a proof without using the result, proceed as follows :
Consider an arbitrary open cover $\{U_i\}$ of $Y$.
Show that $\{X \times U_i\}$ is an open cover of $X \times Y$.
This has a finite subcover, say $\{X \times U_1 , ..., X \times U_n\}$.
Show that $\{U_1,...U_n\}$ cover $Y$.
Conclude from the arbitrary nature of the initial $\{U_i\}$.
We used nothing about $X$ here(except non-emptiness : where did we use that?).