Showing $F^{-1}(C)$ is compact when $C$ is compact. $f : X → Y$  is  a map. 
If  f is closed, and  $f^{−1}(y)$ is compact in $X$ for each $y ∈ Y$ then show that $f^{−1} (C)$ is compact in $X$ for any compact subset $C$ of $Y$ . 
How does the proof go ? I tried using the fact that $C$ contains some $Y$ and for each $y$ it is compact. But I would like to know exact proof. 
When I was trying to prove this I was also wondering if the condition $f$ closed is a necessary condition. 
Explnation : By $f^{−1}(y)$ is compact in $X$  I think it is $\lbrace f^{−1}(y) \vert y \in Y \rbrace $ is compact. This is my interpretation I might be wrong. 
 A: One way to do it: show that if $f$ is closed then for each $y \in Y$, and for each open set $O$ such that $f^{-1}[\{y\}] \subset O$, there is some open subset $V$ of $Y$ that contains $y$ and $f^{-1}[V] \subset O$. (Consider $V = Y \setminus f[X \setminus O]$).
Now if $C$ is compact, let $(O_i)_{i \in I}$ be an open cover for $f^{-1}[C]$. For every $y \in C$, we have that $f^{-1}[\{y\}] \subset f^{-1}[C]$ and the former set is compact and so covered by finitely many $O_i$, say by $O_y = \cup \{O_i: i \in F(y)\}$ where $F(y) \subset I$ is finite. Find $V_y$ containing $y$ with $f^{-1}[V_y] \subset O_y$. Now note that the $V_y, y \in C$ cover the compact set $C$...
That closedness is necessary can be shown by trivial examples: $f$ is the identity between the natural numbers in the discrete ($X$) to the same set in the indiscrete topology ($Y$). This is continuous and inverse images of singletons are singletons hence compact. But $Y$ is compact while $X$ is not.
A: Let $f: X \to Y$ be a continuous closed map, such that $f^{-1}(y)$ is compact (in $X$) for all $y \in Y$. Let $K$ be a compact subset of $Y$. We need to show that $f^{-1}(K)$ is compact.
Let $\{ U_{\lambda} \vert \lambda\ \in\ \Lambda \}$ be an open cover of $f^{-1}(K)$. Then for all $k\ \in K$ this is also an open cover of $f^{-1}(k)$. Since the latter is assumed to be compact, it has a finite subcover. In other words, for all $k\ \in K$ there is a finite set $\gamma_k \subset \Lambda$ such that $f^{-1}(k) \subset \cup_{\lambda \in \gamma_k} U_{\lambda}$. The set $X \setminus \cup_{\lambda \in \gamma_k} U_{\lambda}$ is closed. Its image is closed in $Y$, because $f$ is a closed map. Hence the set
$V_k = Y \setminus f(X \setminus \cup_{\lambda \in \gamma_k} U_{\lambda})$ is open in $Y$. It is easy to check that $V_k$ contains the point $k$. Now $K \subset \cup_{k \in K} V_k$ and because $K$ is assumed to be compact, there are finitely many points $k_1,\dots , k_s$ such that $K \subset \cup_{i =1}^s V_{k_i}$. Furthermore the set $\Gamma = \cup_{i =1}^s \gamma_{k_i}$  is a finite union of finite sets, thus $\Gamma$ is finite.
Now it follows that $f^{-1}(K) \subset f^{-1}(\cup_{i=1}^s V_{k_i}) \subset \cup_{\lambda \in \Gamma} U_{\lambda}$ and we have found a finite subcover of $f^{-1}(K)$, which completes the proof.
