Compact space and Hausdorff space

Combine the following facts:

1) A closed subspace of a compact space is compact.

2) A continuous map always maps compact spaces onto compact spaces.

3) Compact subspaces of Hausdorff spaces are closed.


If $f:X\to Y$ is continuous and $K\subseteq X$ is compact then $f(K)$ is compact.

Now use that closed subsets of compact sets are compacts and that compact subsets of Hausdorff spaces are closed.