If f: X ---> Y is a continuous map of topological spaces and X is compact, then f(X) is compact.

Suppose that

is an open cover of f(X) by sets open in Y.

By continuity of f,

is open in X for every U in

The collection

is an open cover of X, since for any x in X, f(X) must belong to some U in

By compactness of X, there is a finite subcover,

hence

is a finite subcover of

for f(X).

I'm preparing proofs for my exam, and I was just wondering if anyone could please explain how this proof would alter if the question was:

Show that if K is a compact subset of X and f is continuous, then f(K) is compact in Y.

I'm thinking the proof would just stay the same since it is just a subset?

Thanks in advance!