Let $(X,\tau),(Y,\eta)$ be topological spaces. If $f:X\to Y$ is continuous, $f(X)=Y$ and $X$ is compact, then $Y$ is compact.
We want to show that for every open cover for $Y$ there exist a finite open subcover. So let $\{U_\alpha:\alpha\in I\}$ be ab open cover for $Y$. Thus $Y=\bigcup_{\alpha\in I} U_\alpha$
Now how can I use the hypothesis that $f$ is continuous?
I was thinking about this property of continuity: $\forall U\in\eta,f^{-1}(U)\in\tau$ but I don't know how to make a relation with the compactness of $X$.
As $X$ is compact, then $\forall U\subset\tau,X\subset\bigcup U$ and $\exists u_1,...,u_n\in U:U\subset\bigcup_iU_i$.
Could anyone help me please?