Consider two metric spaces, X and Y with X being compact. Let f:X --> Y and define graph(f)=set of all points (x, f(x)) with x inside X. Then f is continuous iff it's graph is compact. Well my main question is how do we make sense of open sets in the space in which the graph is contained? I'm aware that since because this is a finite product the product topology is equivalent to the inherited topology on the product (that is defining an open set to be the product of open sets in each X and Y) - that being said my book (Rudin) doesn't go that far in fact he doesn't MENTION metric spaces that are products of other metric spaces (except for n-space of course) Can I just assume a finite Cartesian product of compact sets is compact? Or does Rudin want me to solve it for euclidean spaces only?!