Question: I have been reading the proof of a continuous function mapping compact sets to compact sets.

Let $f: X \to Y$ be continuous and onto where $X$ is compact. Let $\{U\_{\alpha}\}\_{\alpha}$ be an open cover of $Y$. Then $\{f^{-1}(U\_{\alpha})\}\_{\alpha}$ covers X. 

Why is it true that$\{f^{-1}(U\_{\alpha})\}\_{\alpha}$ covers X? 

Couldn't there be $x\in X$ such that $x \notin \{f^{-1}(U\_{\alpha})\}\_{\alpha}$ for some $\alpha$?

Answer: 
Nope. No problem. 

Suppose $x \in X$, then because $x$ lies in the domain of the function $f$, $f(x)$ is defined and in fact (by definition) $f(x) \in Y$. 

Now since $U\_\alpha$'s cover $Y$, there exists some $\alpha$ such that $f(x) \in U\_\alpha$. Thus $x \in f^{-1}(U\_\alpha)$.
Select $x \in X$. Then $x$ is in the domain of $f$. This means there is a $y \in Y$ with $f(x) = y$. Since $\{ U\_{\alpha} \} $ is an open cover of $Y$. For some $\alpha$ we have $y \in U\_{\alpha}$. But then $x \in f^{-1}(U\_{\alpha})$.